纯html 超简易 弹性布局
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="box">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
<div class="item">1</div>
<div class="item">2</div>
</div>
</body>
<style>
.box {
display: flex;
flex-wrap: wrap ;
justify-content: center;
align-items: center
}
.item {
width: 30%;
height: 50px;
border-radius: 20px;
margin: 20px;
background-color: beige;
}
</style>
</html>
作者:人间春风意
扫描左侧的二维码可以赞赏

本作品采用署名-非商业性使用-禁止演绎 4.0 国际 进行许可。

浙公网安备 33010602011771号