CSS3 多列布局 All In One
CSS3 多列布局 All In One
CSS Multi-column Layout Module
W3C Candidate Recommendation 12 April 2011
https://www.w3.org/TR/css3-multicol/
https://github.com/w3c/html/issues/587
CSS3 多列属性
下表列出了所有 CSS3 的多列属性:
属性 描述 column-count 指定元素应该被分割的列数。 column-fill 指定如何填充列 column-gap 指定列与列之间的间隙 column-rule 所有 column-rule-* 属性的简写 column-rule-color 指定两列间边框的颜色 column-rule-style 指定两列间边框的样式 column-rule-width 指定两列间边框的厚度 column-span 指定元素要跨越多少列 column-width 指定列的宽度 columns 设置 column-width 和 column-count 的简写
1
1
demo:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172<!
DOCTYPE
html>
<
html
lang="en">
<
head
>
<
meta
charset="UTF-8">
<
title
>CSS3-Multi-column</
title
>
<
style
>
img{
width: 100px;
height: 100px;
}
.table{
margin: 5px;
border: 5px solid green;
}
.table tr{
margin: 5px;
border: 3px solid blue;
}
.table td{
margin: 5px;
border: 1px dashed red;
width: 100px;
height: 100px;
overflow: hidden;
}
</
style
>
</
head
>
<
body
>
<
div
class="div-multi-columns">
<!-- <img src="../../images/icon.png" alt="icon.png" title="icon.png"> -->
</
div
>
<
table
cellspacing="3" cellpadding="2" contenteditable="" contextmenu="" class="table">
<
thead
>
<
tr
>
<
td
>thead-td</
td
>
<
td
>thead-td</
td
>
<
td
>thead-td</
td
>
</
tr
>
</
thead
>
<
tbody
>
<
caption
>caption</
caption
>
<
tr
>
<
td
>
<
img
src="../../images/icon.png" alt="icon.png" title="icon.png">
</
td
>
<
td
>
ppppppppppppppppppppppppppppppppp<
br
>
ppppppppppppppppppppppppppppppppp<
br
>
ppppppppppppppppppppppppppppppppp<
br
>
</
td
>
<
td
>
ppppppppppppppppppppppppppppppppp<
br
>
ppppppppppppppppppppppppppppppppp<
br
>
ppppppppppppppppppppppppppppppppp<
br
>
</
td
>
</
tr
>
<
tr
>
<
td
>
?? Are you ready? Special announcement: Write code for a real autonomous vehicle & learn from top industry partners!<
br
>
</
td
>
<
td
>
?? Are you ready? Special announcement: Write code for a real autonomous vehicle & learn from top industry partners!<
br
>
</
td
>
<
td
>
?? Are you ready? Special announcement: Write code for a real autonomous vehicle & learn from top industry partners!<
br
>
</
td
>
</
tr
>
</
tbody
>
</
table
>
<!-- -->
</
body
>
</
html
>
refs
©xgqfrms 2012-2020
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/5873136.html
未经授权禁止转载,违者必究!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)