实例
<h3>8. 小案例: 结合主轴, 实现空间全部平均分配</h3> <div class="container flex wrap wrap-space-evenly all-align"> <span class="item">item1</span> <span class="item">item2</span> <span class="item">item3</span> <span class="item">item4</span> <span class="item">item5</span> <span class="item">item6</span> <span class="item">item7</span> <span class="item">item8</span> <span class="item">item9</span> <span class="item">item10</span> </div> css: /*实战: 元素的水平垂直全部平均对齐*/ .all-align { justify-content: space-around; align-content: space-around; }
运行实例 »
点击 "运行实例" 按钮查看在线实例