首页 前端知识 flex竖向布局,每列2个

flex竖向布局,每列2个

2024-05-10 08:05:05 前端知识 前端哥 596 139 我要收藏
<!DOCTYPE html>
<html>
<head>
<meta chatset="utf-8">
<title>flex 布局</title>
</head>
<style>
* { margin: 0; padding: 0;}
ul {
display: flex;
flex-flow: column wrap;
align-content: flex-start;
height: 440px;
background: teal;
}
li {
width: 200px;
height: 200px;
background: yellowgreen;
list-style:none;
margin: 10px;
font-size: 100px;
display: inline-flex;
justify-content: center;
align-items: center;
}
</style>
<body>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
</ul>
</body>
</html>
复制

效果图

转载请注明出处或者链接地址:https://www.qianduange.cn//article/7925.html
标签
display flex
评论
还可以输入200
共0条数据,当前/页
发布的文章

JQuery中的load()、$

2024-05-10 08:05:15

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!