108 lines
2.0 KiB
HTML
108 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Document</title>
|
||
</head>
|
||
<style>
|
||
body,
|
||
ul,
|
||
li,
|
||
h1,
|
||
h2,
|
||
h3,
|
||
h4,
|
||
h5,
|
||
h6,
|
||
p,
|
||
input {
|
||
padding: 0;
|
||
margin: 0;
|
||
}
|
||
|
||
|
||
input {
|
||
border: none;
|
||
outline: none;
|
||
}
|
||
|
||
a {
|
||
text-decoration: none;
|
||
}
|
||
|
||
.search {
|
||
width: 654px;
|
||
height: 44px;
|
||
margin: 50px auto;
|
||
}
|
||
|
||
.search .left {
|
||
width: 546px;
|
||
height: 44px;
|
||
float: left;
|
||
position:relative;
|
||
|
||
}
|
||
|
||
.left input {
|
||
width: 100%;
|
||
height: 100%;
|
||
border: 2px solid #c4c7ce;
|
||
border-radius: 10px 0 0 10px;
|
||
box-sizing: border-box;
|
||
border-right: none;
|
||
padding-left: 15px;
|
||
font-size: 16px;
|
||
|
||
}
|
||
|
||
.img {
|
||
width: 24px;
|
||
height: 20px;
|
||
background-color: black;
|
||
position:absolute;
|
||
right: 22px;
|
||
top: 50%;
|
||
margin-top: -10px;
|
||
background: url(https://dss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/searchbox/nicon-10750f3f7d.png);
|
||
background-position: 0px -51px;
|
||
}
|
||
.img:hover{
|
||
background-position: 0px -75px;
|
||
}
|
||
|
||
.submit {
|
||
width: 108px;
|
||
height: 100%;
|
||
background: #4e6ef2;
|
||
color: #fff;
|
||
float: left;
|
||
border-radius: 0 10px 10px 0;
|
||
font-size: 17px;
|
||
|
||
}
|
||
.left input :focus {
|
||
border: 2px solid #4e6ef2;
|
||
box-sizing: border-box;
|
||
}
|
||
.keyword:focus{
|
||
border: 2px solid #4e6ef2;
|
||
border-right: none;
|
||
|
||
}
|
||
</style>
|
||
|
||
<body>
|
||
<div class="search">
|
||
<div class="left">
|
||
<input type="text" class="keyword">
|
||
<div class="img"></div>
|
||
</div>
|
||
<input type="button" value="百度一下" class="submit">
|
||
</div>
|
||
</body>
|
||
|
||
</html> |