css 多行多列_CSS中的多列

css 多行多列 CSS | 多列 (CSS | Multiple Columns)This CSS property allows to define column layout of contents and wrap them into multiple columns with gap and rules between them. 此CSS属性允许定义内容的列布局,并将它们包装成具有...
摘要由CSDN通过智能技术生成

css 多行多列

CSS | 多列 (CSS | Multiple Columns)

This CSS property allows to define column layout of contents and wrap them into multiple columns with gap and rules between them.

此CSS属性允许定义内容的列布局,并将它们包装成具有间隔和规则的多个列。

There are multiple column properties which are listed below,

下面列出了多个列属性

  1. column-count

    列数

  2. column-gap

    列间隙

  3. column-rule-style

    列规则样式

  4. column-rule-width

    列规则宽度

  5. column-rule-color

    列规则颜色

  6. column-rule

    列规则

  7. column-span

    列跨度

  8. column-width

    列宽

Let's discuss each property one by one.

让我们逐一讨论每个属性。

1)列数属性 (1) column-count property)

The column-count property is used to count the number of columns an element should be divided into.

column-count属性用于计算元素应划分为的列数。

Syntax:

句法:

Element {
   
    column-count: 4;
}

Example:

例:

<!DOCTYPE html>
<html>

<head>
    <style>
        div {
   
            column-count: 4;
        }
    </style>
</head>

<body>
    <div>
        this is multiple column CSS property this is multiple column CSS property this is multiple column CSS property this is multiple column CSS property this is multiple column CSS property this is multiple column CSS property this is multiple column CSS property this is multiple column CSS property
    </div>
</body>

</html>

Output

输出量

CSS Multiple Columns | Example 1

In the above example, the content is divided into 4 columns.

在上面的示例中,内容分为4列。

2)列间隙属性 (2) column-gap property)

The column-gap property is used to specify the space or gap between the columns.

column-gap属性用于指定列之间的间隔或间隙。

Syntax:

句法:

Element
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值