flex 井字布局(两竖列布局)
2021-04-28 本文已影响0人
coderfl

<!DOCTYPE html>
<html>
<head></head>
<meta charset="utf-8">
<style type="text/css">
.con{
width:102px;
border:solid 1px red;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.conlist {
width:50px;
background: blue;
height: 50px;
margin-bottom:2px;
}
</style>
<body>
<div class="con">
<div class="conlist"></div>
<div class="conlist"></div>
<div class="conlist"></div>
<div class="conlist"></div>
<div class="conlist"></div>
<div class="conlist"></div>
</div>
</body>
</html>