B2B商务网

微信扫一扫

微信小程序
天下好货一手掌握

扫一扫关注

扫一扫微信关注
天下好货一手掌握

HTML使用栅格布局实现六种筛子样式的代码详解

   2023-03-23 IP属地 广东佛山建站助手190
核心提示:HTML使用栅格布局实现六种筛子样式的代码详解:这篇文章主要介绍了HTML使用栅格布局实现六种筛子的样式,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下先上效果图下面附上代码 <!DOCTYPE html><html><head> <meta charset="UTF-8"> <title></title> <st
HTML使用栅格布局实现六种筛子样式的代码详解:

这篇文章主要介绍了HTML使用栅格布局实现六种筛子的样式,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

先上效果图下面附上代码

<!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>

总结

到此这篇关于HTML使用栅格布局实现六种筛子的样式的代码详解的文章就介绍到这了,更多相关html 栅格布局 内容请搜索脚本之家以前的文章或继续浏览下面的相关文章,希望大家以后多多支持脚本之家!

来源:脚本之家

链接:https://www.jb51.net/web/728714.html

 
举报收藏 0打赏 0评论 0
免责声明
• 
本文源自建站助手发布的内容,本站会员编辑发布。
本网站对站内所有资讯的内容、观点保持中立,不对内容的准确性、可靠性或完整性提供任何明示或暗示的保证。
本网站部分内容来源于合作媒体、企业机构、网友提供和互联网的公开资料,版权归原作者所有,如有侵权等问题,请及时联系我们,我们将在收到通知后第一时间妥善处理该部分内容。info@1688b2b.com。

转载请注明原文出处: http://www.1688b2b.com/news/show-13023.html

 
更多>同类资讯文章
推荐图文
推荐资讯文章
点击排行
信息二维码

手机扫一扫

快速投稿

你可能不是行业专家,但你一定有独特的观点和视角,赶紧和业内人士分享吧!

我要投稿

投稿须知

【行业知识,产业动态、产品指南、产品应用等原创性内容优先审核发布。】
1、提交粗糙的广告软文或者对用户无任何帮助、无价值的文章将无法被通过审核。
2、发布内容时请选择合适的栏目归档。
3、严禁类同内容重复发布及标题堆砌关键字。
4、文章内容须与标题有一定相关性。
5、排版精美工整用户才愿意去看
6、以上不合规一律不予审核直接删除
7、审核时间一般24小时内,优质文章优先审核