<!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;
}
body{
display: flex;
flex-direction: column;
/* flex-wrap: wrap-reverse; */
justify-content: center;
height: 800px;
width: 800px;
background-color: lightcoral;
align-items: center;
}
.div{
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
background-color: lightblue;
}
</style>
</head>
<body>
<div class="div" id="div1">div1</div>
<div class="div" id="div2">div2</div>
<div class="div" id="div3">div3</div>
<div class="div" id="div4">div4</div>
<div class="div" id="div5">div5</div>
</body>
</html>
Flex弹性容器容器属性
最新推荐文章于 2024-05-12 14:23:18 发布