Files
ClassContent/历届学生/fontendsix/项目练习/上课项目/简书搜索条/index_two.html
2024-09-27 02:06:13 +08:00

69 lines
1.5 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>简书搜索条 定位</title>
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2880382_7kt93o3bmh2.css">
<style>
li {
list-style: none;
/* 清除li标签的小圆点 */
}
a {
text-decoration: none;
/* 清除a标签的下划线 */
}
body,
ul {
margin: 0;
padding: 0;
}
input {
border: none;
outline: none;
padding: 0;
}
.main {
position: relative;
width: 240px;
height: 38px;
}
.search {
width: 100%;
height: 100%;
padding-left: 20px;
padding-right: 40px;
box-sizing: border-box;
border-radius: 20px;
font-size: 14px;
border: 1px solid #eee;
background: #eee;
}
.icon-sousuo {
color: #969696;
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 10px;
}
</style>
</head>
<body>
<div class="main">
<input class="search" placeholder="搜索" />
<i class="iconfont icon-sousuo"></i>
</div>
</body>
</html>