css column-rule-width属性怎么用


本文摘自PHP中文网,作者silencement,侵删。

css column-rule-width属性定义及用法

在css中,column-rule-width属性是用在多列布局元素中,用来设置列与列之间分割线的宽度。通常与column-count、column-rule-style等多列布局属性一起使用,使用它的前提条件是,通过column-count、column等属性定义了多列布局,并且设置了列与列之间的分割样式(如:column-rule-style属性定义了分割线),单独使用column-rule-width属性是没有效果的;

css column-rule-width属性语法格式

css语法:column-rule-width: thin / medium / thick / length;(例:column-rule-width: 16px;)

JavaScript语法:object.style.columnRuleWidth="18px"

css column-rule-width属性值说明

thin:细的分隔线

medium:中等的分隔线

thick :粗的分隔线

length:自定义宽度的分隔线(如:12px)

实例

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />

<title>css3 column-rule-width属性设置列之间分割线的宽度笔记</title>

<style type="text/css">

body{background: #ddd;}div{width: 400px;border:1px solid blueviolet;margin-top:10px;: ;}

.thin{column-count:3;column-rule-style:solid;column-rule-width:thin;}

.thick{column-count:3;column-rule-style:solid;column-rule-width:thick;}

.length{column-count:3;column-rule-style:solid;column-rule-width:8px;}

</style>

</head>

<body>

<div class="thin">column-rule-width:thin;演示,设置细分割线。这是为了演示效果多写的</div>

<div class="thick">column-rule-width:thick;演示,设置粗分割线。这是为了演示效果多写的</div>

<div class="length">column-rule-width:8px;,设置分割线的宽度为8px。这是为了演示效果多写的</div>

</body>

</html>

运行结果

4fae5e5a1851c450ef8d7fbd3c9c835.png

以上就是css column-rule-width属性怎么用的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

css设置字体粗细的属性是什么

css的属性分为什么类别

html中设置字体的属性有哪些

css规则是什么

jq怎么恢复原来的css样式

css行元素跟块元素有哪些相同点

css怎样把一张图片分割开

css怎么实现表格样式

border-style属性怎么用

css样式的注释怎么写

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




打赏

取消

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

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

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

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

评论

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