百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>CSS教程> css columns属性如何用
分享文章到:

css columns属性如何用

发布时间:09/01 来源:未知 浏览: 关键词:

css ccolumns属性用途

columns:饱含两个属性column-width,column-count

1.column-width 列的宽度

2.column-count 列数

阅读器兼容:

Internet Explorer 10 和 Opera 支撑 column 属性

Firefox 支撑替换的 -moz-column 属性

Safari 和 Chrome 支撑替换的 -webkit-column 属性

示例

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        p{margin:0;padding:5px 10px;background:#eee;}
        h1{margin:10px 0;font-size:16px;}
        .test1{
            width:628px;
            border:10px solid #000;
            -moz-columns:100px 4;
            -webkit-columns:100px 4;
            columns:100px 4;
        }
        .test2{
            border:10px solid #000;
            -moz-columns:400px;
            -webkit-columns:400px;
            columns:400px;
        }
    </style>
</head>
<body>
<h1>列数及列宽牢固:</h1>
<div>
    <p>This module describes multi-column layout in CSS. By using functionality described in this document, style sheets laid out in multiple columns. </p>
    <p>This module describes multi-column layout in CSS. By using functionality described in this document, style sheets laid out in multiple columns. </p>
    <p>On the Web, tables have also been used to describe multi-column layouts. The main benefit of usingn to another on various output devices including speech</p>
    <p>On the Web, tables have also been used to describe multi-column layouts. The main benefit of usingn to another on various output devices including speech synthesizers and small mobile devices.</p>
</div>
<h1>列宽牢固,按照内容主动分布列数:</h1>
<div>
    <p>This module describes multi-column layout in CSS. By using functionality described in this document, style sheets can declare that the content of an element is to be laid out in multiple columns. </p>
    <p>On the Web, tables have also been used to describe multi-column layouts. The main benefit of using CSS-based columns is flexibility; content can flow from one column to another, and the number of columns can vary depending on the size of the viewport. Removing presentation table markup from documents allows them to more easily be presented on various output devices including speech synthesizers and small mobile devices.</p>
</div>
</body>
</html>

运转结果

abaa1dd2f823f3c8b8cadd56dd43fa7.png

以上就是css columns属性如何用的具体内容,更多请关注百分百源码网其它相关文章!

打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有150人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板