第476天 使用flex实现一个自适应的九官格 [3+1官网](http://www.h-camel.com/index.html) [我也要出题](http://www.h-camel.com/contribution.html)
Activity
ruihengChe commentedon Aug 4, 2020
css部分:
*{ margin: 0; padding: 0; } .jiu { position: absolute; margin: 30px 60px; display: flex; width: 450px; height: 459px; background-color: burlywood; justify-content: space-between; flex-wrap: wrap; list-style: none; } .jiu li{ background-color:thistle; width: 33%; height: 33%; }
html部分:
<ul class="jiu"> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> </ul>
carrie-xin commentedon Aug 4, 2020
Supremeyh commentedon Aug 4, 2020
ramwin commentedon Aug 4, 2020
自适应九宫格不难, 大家考虑一下如果只有8个格子, 7个格子也要自适应呢. 类似朋友圈的九图
xyydd commentedon Aug 4, 2020
ramwin commentedon Aug 5, 2020
@xyydd 你这个item的宽度是固定的, 要是能自适应box的宽度就更好了
haizhilin2013 commentedon Aug 6, 2020
不错!!!举一反三