用flex做多行图片排列方法
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
.box{
width:320px;
background-color:yellow;
display:flex;
flex-wrap:wrap;
justify-content: space-between;
align-items:flex-end;
padding:20px;
}
.box div{
width:100px;
height:100px;
background-color:red;
margin-bottom:10px;
}
div.hidden{
height:0;
}
</style>
</head>
<body>
<div class="box">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div class="hidden"></div>
</div>
</body>
</html>
关注微信公众号