包含搜索框,背景图片,搜索按钮,国内版国际版按钮,只包含html和css部分
时间: 2024-03-10 22:50:07 浏览: 8
好的,那么以下是一个简单的 HTML 和 CSS 代码示例,实现了您所需要的功能,您可以在此基础上进行修改和扩展:
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Bing Search</title>
<style type="text/css">
body {
background-image: url("bing_bg.jpg");
background-size: cover;
background-position: center;
font-family: Arial, sans-serif;
margin: 0;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
padding: 20px;
box-sizing: border-box;
}
.logo {
width: 150px;
height: 50px;
background-image: url("bing_logo.png");
background-repeat: no-repeat;
background-size: contain;
margin-bottom: 50px;
}
.form {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
width: 100%;
max-width: 800px;
margin-bottom: 20px;
}
.input {
flex: 1;
height: 40px;
padding: 0 10px;
border: none;
border-radius: 20px;
font-size: 16px;
outline: none;
}
.button {
width: 80px;
height: 40px;
margin-left: 10px;
border: none;
border-radius: 20px;
background-color: #3385ff;
color: #fff;
font-size: 16px;
cursor: pointer;
}
.switcher {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
width: 100%;
max-width: 800px;
}
.switcher label {
font-size: 14px;
margin-right: 10px;
}
.switcher input[type="radio"] {
display: none;
}
.switcher input[type="radio"] + label {
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 5px;
cursor: pointer;
}
.switcher input[type="radio"]:checked + label {
background-color: #3385ff;
color: #fff;
border-color: #3385ff;
}
</style>
</head>
<body>
<div class="container">
<div class="logo"></div>
<form class="form">
<input class="input" type="text" placeholder="请输入搜索内容">
<button class="button" type="submit">搜索</button>
</form>
<div class="switcher">
<input id="radio1" type="radio" name="search-type" checked>
<label for="radio1">国内版</label>
<input id="radio2" type="radio" name="search-type">
<label for="radio2">国际版</label>
</div>
</div>
</body>
</html>
```
需要注意的是,上述示例中的背景图片和 Logo 图片需要自行准备。同时,这只是一个简单的示例,如需进一步定制和扩展,可以参考 Bing 主页的实际情况进行修改和优化。
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)