

Nội dung
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
<link
rel="stylesheet"
href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"/>
</head>
<body>
<img src="https://dribbble.com/shots/15786530-404-Page-illustration" alt="">
<div class="search1">
<i class="fas fa-search search__icon"></i>
<input type="text" placeholder="Search..." class="search-form__input"/>
</div>
</body>
</html>
CSS
html {
box-sizing: border-box;
}
body {
font-family: var(--font);
overflow-x: hidden;
font-weight: 400;
box-sizing: border-box;
background-image: url("https://cdn.dribbble.com/users/2771385/screenshots/15786530/media/adc40896d10e319b9facc2b623edacf6.png?compress=1&resize=1000x750");
background-repeat: no-repeat;
background-size: cover;
}
input{
font-family: var(--font);
font-size: 1.4rem;
font-weight: 300;
outline: none;
border: 0;
margin: 0;
padding: 0;
border-radius: 0;
-webkit-appearance: none;
}
.search1 {
border: 2px solid #eee;
border-radius: 5px;
padding: 2rem;
display: flex;
align-items: center;
margin-top: 22%;
margin-left: 15%;
margin-right: 15%;
font-size: 25px;
}
.search__icon {
color: #fff;
flex-shrink: 0;
}
.search-form__input {
padding: 0 1.5rem;
flex: 1;
background-color: transparent;
border: none;
outline:none;
color: #fff;
font-size: 25px;
font-family: 'Roboto', sans-serif;
}
::placeholder{
color: #eee;
font-family: 'Roboto', sans-serif;
}
Để lại câu trả lời
Xem Bình Luận