css columns属性怎么用


当前第2页 返回上一页

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

<!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属性怎么用的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

css怎么给图片加上下边框

css text-shadow属性怎么用

使用css有什么优势

一招搞定css元素五彩斑斓的背景

css怎么控制文字不换行

css与javascript的区别是什么

css怎么使用外部艺术字

css如何除去最后一个元素样式

css如何改变图片颜色

css中line-height详解(代码实例)

更多相关阅读请进入《css》频道 >>




打赏

取消

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

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

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

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...