代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
padding: 0;
margin: 0;
box-sizing: border-box;
}
body{
background: #e7e5e5;
}
.card{
margin: 50px auto;
width: 600px;
height: 250px;
background: #ffffff;
padding: 30px;
display: flex;
}
.column{
height: 100px;
width: 100%;
}
.search{
display: flex;
width: 450px;
height: 40px;
padding-left: 15px;
padding-right: 15px;
background: #eadede;
border-radius: 20px;
}
input{
flex: 1;
border: none;
outline: none;
background-color: transparent;
}
a{
text-decoration: none;
line-height: 40px;
color: #3a3737;
}
</style>
</head>
<body>
<div class="card">
<div class="column">
<!-- 搜索框 -->
<div class="search">
<input type="text" placeholder="请输入搜索关键词">
<a href="#">搜索</a>
</div>
</div>
</div>
</body>
</html>
效果展示