<!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>
@font-face {
font-family: 'iconfont';
src: url('./font/iconfont.ttf?t=1722477916565') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body{
padding: 0;
margin: 0;
background-color: #F5F5F5;
font-size: 16px;
font-family: Arial, Helvetica, sans-serif;
}
.clearfix::after{
content: "";
display: block;
clear: both;
}
.fl{
float: left;
}
.fr{
float: right;
}
.layer{
margin: 0 auto;
}
#centerlogo{
width: 600px;
height: 200px;
/* border: 1px solid red; */
}
#search{
width: 800px;
height: 100px;
position: relative;
/* border: 1px solid blue; */
}
#search .inputtext{
position: absolute;
left:0px;
top:5px;
height: 33px;
line-height: 33px;
}
#search .placeholder{
border: 2px solid red;
width: 750px;
height: 42px;
line-height: 42px;
border-radius: 20px 0px 0px 20px;
overflow: hidden;
padding-left: 12px;
position:absolute;
box-sizing: border-box;
border-right: none;
}
#search .inputtext{
position:absolute;
width: 700px;
height: 33px;
line-height: 33px;
vertical-align: middle;
background-color: transparent;
outline: none;
border: none;
z-index: 2;
left: 20px;
}
#search .camera{
display: inline-block;
font-size: 20px;
height: 40px;
line-height: 40px;
width: 30px;
text-align: center;
margin-right: 15px;
}
#search .btn{
position: absolute;
left: 750px;
height: 42px;
line-height: 42px;
width: 80px;
background-color: #f40;
border: none;
color:white;
font-size: 20px;
font-weight: bold;
}
</style>
</head>
<body>
<div id="centerlogo" class="layer">
</div>
<div id="search" class="layer clearfix">
<input type="text" class="inputtext">
<div class="placeholder fl">
<span class="iconfont"></span>
<span>搜索一下,世界更精彩</span>
<span class="iconfont camera fr"></span>
</div>
<button class="btn fr">搜索</button>
</div>
</body>
</html>
08-02
824
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-02
112
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-24
683
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-02