<!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>
<style>
* {
margin: 0;
padding: 0;
list-style: none;
}
ul {
width: 300px;
height: 400px;
background: #f0f0f0;
list-style: none;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
padding: 5px;
}
ul li {
width: 90px;
height: 50px;
text-align: center;
line-height: 50px;
background: pink;
border-radius: 10px;
}
ul:after {
content: '';
width: 90px;
}
</style>
</head>
<body>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</body>
</html>
flex布局中 justify-content: space-between方法最后一行排版问题
最新推荐文章于 2025-02-21 11:44:28 发布