<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box{
width: 500px;
height: 500px;
border:2px solid black;
margin:100px auto;
display: flex;
flex-direction: column-reverse;
/* row, column ,row-reverse,column-reverse*/
/* 弹性盒 */
}
.box div{
width: 100px;
height: 100px;
border:1px dashed red;
}
</style>
</head>
<body>
<!-- 弹性盒是一种新的布局方式, 特别适合移动端布局 -->
<div class="box">
<div>1111</div>
<div>2222</div>
<div>3333</div>
<div>4444</div>
</div>
</body>
</html>
CSS 弹性盒 主轴修改
最新推荐文章于 2024-04-15 19:47:33 发布