CSS3 column-rule-style 屬性
實(shí)例
設(shè)置列之間的顏色規(guī)則:
div
{
-moz-column-rule-style:dotted; /* Firefox */
-webkit-column-rule-style:dotted; /* Safari 和 Chrome */
column-rule-style:dotted;
}
頁面底部有更多實(shí)例。
瀏覽器支持
Internet Explorer 10 和 Opera 支持 column-rule-style 屬性。
Firefox 支持替代的 -moz-column-rule-style 屬性。
Safari 和 Chrome 支持替代的 -webkit-column-rule-style 屬性。
注釋:Internet Explorer 9 以及更早版本的瀏覽器不支持 column-rule-style 屬性。
定義和用法
column-rule-style 屬性規(guī)定列之間的樣式規(guī)則。
| 默認(rèn)值: | none |
|---|---|
| 繼承性: | no |
| 版本: | CSS3 |
| JavaScript 語法: | object.style.columnRuleStyle="dotted" |
語法
column-rule-style: none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset;
| 值 | 描述 | 測(cè)試 |
|---|---|---|
| none | 定義沒有規(guī)則。 | 測(cè)試 |
| hidden | 定義隱藏規(guī)則。 | 測(cè)試 |
| dotted | 定義點(diǎn)狀規(guī)則。 | 測(cè)試 |
| dashed | 定義虛線規(guī)則。 | 測(cè)試 |
| solid | 定義實(shí)線規(guī)則。 | 測(cè)試 |
| double | 定義雙線規(guī)則。 | 測(cè)試 |
| groove | 定義 3D grooved 規(guī)則。該效果取決于寬度和顏色值。 | 測(cè)試 |
| ridge | 定義 3D ridged 規(guī)則。該效果取決于寬度和顏色值。 | 測(cè)試 |
| inset | 定義 3D inset 規(guī)則。該效果取決于寬度和顏色值。 | 測(cè)試 |
| outset | 定義 3D outset 規(guī)則。該效果取決于寬度和顏色值。 | 測(cè)試 |
親自試一試 - 實(shí)例
- Column-count
- 把 div 元素中的文本劃分為三列。
- Column-gap
- 將 div 元素中的文本分為三列,并列間 30 像素的間隔。
- Column-rule
- 規(guī)定列之間的寬度、樣式和顏色。
相關(guān)頁面
CSS3 教程:CSS3 多列