Files
ClassContent/历届学生/刘合群/2019-07-23/flex.html
2024-09-27 02:06:13 +08:00

111 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>弹性盒子 flex</title>
<style>
body,ul,li {
margin: 0;
padding: 0;
}
li {
list-style: none;
}
.header {
width: 100%;
overflow-x: scroll;
}
.header ul {
display: flex;
justify-content: space-around;
height: 50px;
align-items: center;
width: 112%;
}
.content {
margin-top: 31px;
}
.content ul {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.content ul li {
width: 25%;
text-align: center;
}
.content ul li img {
width: 50px;
}
.search {
display: flex;
justify-content: space-between;
}
.search input{
flex-grow: 10;
}
.search p{
flex-grow: 1;
text-align: center;
}
</style>
</head>
<body>
<div class="search">
<input type="text" placeholder="小说名称">
<p>分类</p>
</div>
<div class="header">
<ul>
<li>精选</li>
<li>VIP(免费看)</li>
<li>男频</li>
<li>女频</li>
<li>漫画</li>
<li>仙侠</li>
</ul>
</div>
<div class="content">
<ul>
<li>
<img src="./icons.png" alt="">
<p>首页1</p>
</li>
<li>
<img src="./icons.png" alt="">
<p>首页2</p>
</li>
<li>
<img src="./icons.png" alt="">
<p>首页3</p>
</li>
<li>
<img src="./icons.png" alt="">
<p>首页4</p>
</li>
<li>
<img src="./icons.png" alt="">
<p>首页5</p>
</li>
<li>
<img src="./icons.png" alt="">
<p>首页6</p>
</li>
<li>
<img src="./icons.png" alt="">
<p>首页7</p>
</li>
<li>
<img src="./icons.png" alt="">
<p>首页8</p>
</li>
</ul>
</div>
</body>
</html>