先上效果图下面附上代码
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> .big { width: 100px; height: 100px; background: skyblue; display: flex; margin-top: 20px; } .small { width: 10px; height: 10px; background: purple; border-radius: 5px; } .one { display: flex; justify-content: center; /*交叉轴*/ align-items: center; } .two { display: flex; justify-content: space-around; align-items: center; } .two2 { display: flex; flex-direction: column; justify-content: space-around; align-items: center; } .three { display: flex; flex-direction: column; justify-content: space-between; align-items: center; } .four { display: flex; justify-content: space-around; } .four1 { display: flex; justify-content: space-around; align-items: center; } .four2 { display: flex; flex-direction: column; justify-content: space-around; align-items: center; } .five { display: flex; justify-content: space-around; } .five1 { display: flex; flex-direction: column; justify-content: space-around; align-items: center; } .five2 { display: flex; flex-direction: row; align-self: center; } .six { display: flex; justify-content: space-around; } .six1 { display: flex; flex-direction: column; justify-content: space-around; align-items: center; } </style> </head> <body> <div class="big one"> <div class="small"></div> </div> <div class="big two"> <div class="small"></div> <div class="small"></div> </div> <div class="big two2"> <div class="small"></div> <div class="small"></div> </div> <div class="big three"> <div class="small" style="align-self: flex-start;"></div> <div class="small" style="align-self: center;"></div> <div class="small" style="align-self: flex-end;"></div> </div> <div class="big three"> <div class="small" style="align-self: flex-end;"></div> <div class="small" style="align-self: center;"></div> <div class="small" style="align-self: flex-start;"></div> </div> <div class="big four"> <div class="four2"> <div class="small"></div> <div class="small"></div> </div> <div class="four2"> <div class="small"></div> <div class="small"></div> </div> </div> <div class="big five"> <div class="five1"> <div class="small"></div> <div class="small"></div> </div> <div class="five2"> <div class="small"></div> </div> <div class="five1"> <div class="small"></div> <div class="small"></div> </div> </div> <div class="big six"> <div class="six1"> <div class="small"></div> <div class="small"></div> <div class="small"></div> </div> <div class="six1"> <div class="small"></div> <div class="small"></div> <div class="small"></div> </div> </div> <div class="big six"> <div class="six1"> <div class="small"></div> <div class="small"></div> </div> <div class="six1"> <div class="small"></div> <div class="small"></div> </div> <div class="six1"> <div class="small"></div> <div class="small"></div> </div> </div> </body> </html>
总结
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
岱庙资源网 Copyright www.zgmyg.com
暂无“HTML使用栅格布局实现六种筛子样式的代码详解”评论...
更新日志
2024年11月15日
2024年11月15日
- 文章.2004-被遗忘的时光【华博音乐】【WAV+CUE】
- 群星《青葱韶歌》原力计划·毕业季企划合辑[FLAC+分轨][661M]
- 群星《抖烧 DSD》抖音神曲 [WAV分轨][992M]
- 庾澄庆《哈林天堂》索尼音乐[WAV+CUE][1G]
- 英雄联盟全球总决赛多久打一次 全球总决赛举办频率介绍
- 第二届老头杯什么时候开始选人 第二届老头杯选人时间介绍
- 英雄联盟第二届老头杯什么时候开始 老头杯s2赛程时间队伍名单汇总
- AI赋能卓越显示技术共筑数字未来:三星显示器产品矩阵亮相2024进博会
- 技术剖析:天玑9400如何打造移动最强GPU和游戏体验?
- 顶级装备 实力登顶:三星显示器双十一焕新升级最后冲刺
- 陈影《绝色靓声》WAV+CUE
- 龚玥《禅是一枝花(6N纯银SQCD)》原抓WAV+CUE
- 刘德丽《寂寞在唱歌HQCD+A2HD5》[WAV+CUE]
- 萧亚轩《钻石糖》金牌大风[WAV+CUE][989M]
- 王菲《王菲精选-菲卖品》环球唱片SHM-SACD[ISO][1.9G]