实现以上图片中的内容
代码
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>搜索框</title>
<style>
.search-container {
display: flex;
align-items: center;
border: 2px solid red;
border-radius: 5px;
padding: 5px;
width: 1000px;
}
.search-input {
flex: 1;
border: none;
outline: none;
padding: 5px;
font-size: 16px;
}
.search-button {
background-color: red;
color: white;
border: none;
border-radius: 5px;
padding: 5px 10px;
margin-left: 5px;
cursor: pointer;
}
.camera-button {
background-color: transparent;
border: none;
cursor: pointer;
margin-left: auto;
padding: 5px;
}
.camera-button img {
width: 20px;
height: 20px;
}
</style>
</head>
<body>
<div class="search-container">
<input type="text" class="search-input" placeholder="小白熊恒温调奶器">
<button class="camera-button">
<img src="F:\web-前端\屏幕截图 2025-01-12 153808.png" alt="相机图标">
</button>
<button class="search-button">搜索</button>
</div>
</body>
</html>