- CSS 教程
- CSS - 首页
- CSS - 路线图
- CSS - 简介
- CSS - 语法
- CSS - 选择器
- CSS - 包含
- CSS - 测量单位
- CSS - 颜色
- CSS - 背景
- CSS - 字体
- CSS - 文本
- CSS - 图片
- CSS - 链接
- CSS - 表格
- CSS - 边框
- CSS - 块级边框
- CSS - 行内边框
- CSS - 外边距
- CSS - 列表
- CSS - 内边距
- CSS - 光标
- CSS - 轮廓
- CSS - 尺寸
- CSS - 滚动条
- CSS - 行内块
- CSS - 下拉菜单
- CSS - 可见性
- CSS - 溢出
- CSS - Clearfix
- CSS - 浮动
- CSS - 箭头
- CSS - 调整大小
- CSS - 引号
- CSS - 排序
- CSS - 位置
- CSS - 连字符
- CSS - 悬停
- CSS - 显示
- CSS - 聚焦
- CSS - 缩放
- CSS - 平移
- CSS - 高度
- CSS - 连字符字符
- CSS - 宽度
- CSS - 透明度
- CSS - Z-Index
- CSS - 底部
- CSS - 导航栏
- CSS - 叠加层
- CSS - 表单
- CSS - 对齐
- CSS - 图标
- CSS - 图片库
- CSS - 注释
- CSS - 加载器
- CSS - 属性选择器
- CSS - 组合器
- CSS - 根元素
- CSS - 盒模型
- CSS - 计数器
- CSS - 剪裁
- CSS - 书写模式
- CSS - Unicode-bidi
- CSS - min-content
- CSS - all
- CSS - inset
- CSS - isolation
- CSS - overscroll
- CSS - justify-items
- CSS - justify-self
- CSS - tab-size
- CSS - pointer-events
- CSS - place-content
- CSS - place-items
- CSS - place-self
- CSS - max-block-size
- CSS - min-block-size
- CSS - mix-blend-mode
- CSS - max-inline-size
- CSS - min-inline-size
- CSS - offset
- CSS - accent-color
- CSS - user-select
- CSS 高级
- CSS - 网格
- CSS - 网格布局
- CSS - Flexbox
- CSS - 可见性
- CSS - 定位
- CSS - 层
- CSS - 伪类
- CSS - 伪元素
- CSS - @规则
- CSS - 文字效果
- CSS - 分页媒体
- CSS - 打印
- CSS - 布局
- CSS - 验证
- CSS - 图片精灵
- CSS - !important
- CSS - 数据类型
- CSS3 教程
- CSS3 - 教程
- CSS - 圆角
- CSS - 边框图片
- CSS - 多重背景
- CSS - 颜色
- CSS - 渐变
- CSS - 盒阴影
- CSS - box-decoration-break
- CSS - caret-color
- CSS - 文本阴影
- CSS - 文本
- CSS - 2D 变换
- CSS - 3D 变换
- CSS - 过渡
- CSS - 动画
- CSS - 多列
- CSS - 盒子大小
- CSS - 提示框
- CSS - 按钮
- CSS - 分页
- CSS - 变量
- CSS - 媒体查询
- CSS - 函数
- CSS - 数学函数
- CSS - 遮罩
- CSS - 形状
- CSS - 样式图片
- CSS - 特异性
- CSS - 自定义属性
- CSS 响应式
- CSS RWD - 简介
- CSS RWD - 视口
- CSS RWD - 网格视图
- CSS RWD - 媒体查询
- CSS RWD - 图片
- CSS RWD - 视频
- CSS RWD - 框架
- CSS 工具
- CSS - PX 到 EM 转换器
- CSS - 颜色选择器和动画
- CSS 资源
- CSS - 有用资源
- CSS - 讨论
CSS - column-rule 属性
CSS column-rule 属性是用于定义 column-rule-width、column-rule-style 和 column-rule-color 属性值的简写属性,这些属性分别设置多列布局中列之间线条的宽度、样式和颜色。
语法
column-rule: column-rule-width column-rule-style column-rule-color | initial | inherit;
属性值
值 | 描述 |
---|---|
column-rule-width | 用于设置列间规则的宽度。默认值为 medium。 |
column-rule-style | 用于设置列间规则的样式。默认值为 none。 |
column-rule-color | 用于设置列间规则的颜色。默认值为元素的颜色。 |
initial | 将属性设置为其默认值。 |
inherit | 从父元素继承属性。 |
CSS Column Rule 属性示例
以下示例说明了使用不同值的 column-rule 属性。
定义 Column Rule 属性的所有值
要在一个语句中定义规则的宽度、样式和颜色,我们使用 column-rule 属性。必须给出三个值。第一个值为宽度,第二个为样式,第三个为颜色。以下示例显示了这一点。
示例
<!DOCTYPE html> <html> <head> <style> .multicol-col-rule { column-count: 3; column-gap: 40px; column-rule: 5px dashed green; } </style> </head> <body> <h2> CSS column-rule property </h2> <div class="multicol-col-rule"> TutorialsPoint is a versatile online educational platform offering free tutorials across various fields such as programming, web development, data science, and more. It features a wealth of resources including step-by-step guides, practical examples, and interactive tools designed to facilitate learning for beginners and advanced users.The platform also provides coding practice exercises, quizzes, and detailed explanations to reinforce understanding. With its user-friendly interface and diverse content, TutorialsPoint is a valuable resource for anyone looking to expand their knowledge and skills. </div> </body> </html>
Column Rule 属性的组成属性
column-rule 属性是属性 column-rule-width、column-rule-style 和 column-rule-color 的组合。以下示例显示了如何将这些属性一起使用以显示 column-rule 属性效果。
示例
<!DOCTYPE html> <html> <head> <style> .multicol-col-rule { column-count: 3; column-gap: 40px; column-rule-width: 5px; column-rule-style: solid; column-rule-color: lightcoral; } </style> </head> <body> <h2> CSS column-rule property </h2> <div class="multicol-col-rule"> TutorialsPoint is a versatile online educational platform offering free tutorials across various fields such as programming, web development, data science, and more. It features a wealth of resources including step-by-step guides, practical examples, and interactive tools designed to facilitate learning for beginners and advanced users. The platform also provides coding practice exercises, quizzes, and detailed explanations to reinforce understanding. With its user-friendly interface and diverse content, TutorialsPoint is a valuable resource for anyone looking to expand their knowledge and skills. </div> </body> </html>
支持的浏览器
属性 | |||||
---|---|---|---|---|---|
column-rule | 50.0 | 10.0 | 52.0 | 9.0 | 37.0 |
css_properties_reference.htm
广告