标签:元素 port center code class wrap isp round doctype
<!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>
div {
height: 800px;
display: flex;
/* 指定主轴为y */
flex-direction: column;
/* 指定沿着主轴的排列方式 */
/*两侧盒子靠边后平均分配 space-between
元素靠右flex-end
*/
justify-content: center;
/* 设置自动换行 */
flex-wrap: wrap;
/* 设置侧轴排列 */
align-items: center;
/* 设置侧轴排列(有多行元素才生效) */
align-content: space-between;
}
span {
width: 200px;
height: 200px;
background-color: aquamarine;
}
</style>
</head>
<body>
<div><span></span><span></span><span>
</span><span></span><span></span><span></span><span></span></div>
</body>
</html>
标签:元素 port center code class wrap isp round doctype
原文地址:https://www.cnblogs.com/limakilo/p/14939883.html