
- HTML 教程
- HTML - 首頁
- HTML - 路線圖
- HTML - 簡介
- HTML - 歷史與演變
- HTML - 編輯器
- HTML - 基本標籤
- HTML - 元素
- HTML - 屬性
- HTML - 標題
- HTML - 段落
- HTML - 字型
- HTML - 塊
- HTML - 樣式表
- HTML - 格式化
- HTML - 引用
- HTML - 註釋
- HTML - 顏色
- HTML - 圖片
- HTML - 圖片地圖
- HTML - 內聯框架 (iframe)
- HTML - 短語元素
- HTML - 元標籤
- HTML - 類
- HTML - ID
- HTML - 背景
- HTML 表格
- HTML - 表格
- HTML - 表頭和標題
- HTML - 表格樣式
- HTML - 表格 Colgroup
- HTML - 巢狀表格
- HTML 列表
- HTML - 列表
- HTML - 無序列表
- HTML - 有序列表
- HTML - 定義列表
- HTML 連結
- HTML - 文字連結
- HTML - 圖片連結
- HTML - 郵箱連結
- HTML 顏色名稱和值
- HTML - 顏色名稱
- HTML - RGB
- HTML - HEX
- HTML - HSL
- HTML 表單
- HTML - 表單
- HTML - 表單屬性
- HTML - 表單控制元件
- HTML - 輸入屬性
- HTML 多媒體
- HTML - 影片元素
- HTML - 音訊元素
- HTML - 嵌入多媒體
- HTML 頭部
- HTML - Head 元素
- HTML - 新增 Favicon
- HTML - Javascript
- HTML 佈局
- HTML - 佈局
- HTML - 佈局元素
- HTML - 使用 CSS 進行佈局
- HTML - 響應式設計
- HTML - 符號
- HTML - 表情符號
- HTML - 樣式指南
- HTML 圖形
- HTML - SVG
- HTML - Canvas
- HTML API
- HTML - Geolocation API
- HTML - 拖放 API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web 儲存
- HTML - 伺服器傳送事件
- HTML 其他
- HTML - 文件物件模型 (DOM)
- HTML - MathML
- HTML - 微資料
- HTML - IndexedDB
- HTML - Web 訊息傳遞
- HTML - Web CORS
- HTML - WebRTC
- HTML 演示
- HTML - 音訊播放器
- HTML - 影片播放器
- HTML - 網頁幻燈片
- HTML 工具
- HTML - Velocity Draw
- HTML - 二維碼
- HTML - Modernizer
- HTML - 驗證
- HTML - 顏色拾取器
- HTML 參考
- HTML - 速查表
- HTML - 標籤參考
- HTML - 屬性參考
- HTML - 事件參考
- HTML - 字型參考
- HTML - ASCII 碼
- ASCII 表查詢
- HTML - 顏色名稱
- HTML - 實體
- MIME 媒體型別
- HTML - URL 編碼
- 語言 ISO 程式碼
- HTML - 字元編碼
- HTML - 已棄用的標籤
- HTML 資源
- HTML - 快速指南
- HTML - 有用資源
- HTML - 顏色程式碼生成器
- HTML - 線上編輯器
HTML - DOM樣式物件 columnRuleStyle 屬性
HTML DOM 樣式物件 **columnRuleStyle** 屬性用於設定或獲取列之間的規則樣式。
語法
設定 columnRuleStyle 屬性object.style.columnRuleStyle= "none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset | initial | inherit";獲取 columnRuleStyle 屬性
object.style.columnRuleStyle;
屬性值
值 | 描述 |
---|---|
none | 這是預設值,表示沒有邊框。 |
hidden | 與“none”相同,但它建立了一個透明或不可見的邊框,並佔用由邊框寬度指定的空間。這有助於解決表格元素中的邊框衝突。 |
dotted | 指定點狀邊框。 |
dashed | 指定虛線邊框。 |
solid | 指定實線邊框。 |
double | 定義雙線邊框,其中使用兩條線作為邊框,其寬度與 borderWidth 指定的寬度相同。 |
groove | 指定一個 3D 凹槽邊框,其效果取決於 border-color 值。 |
ridge | 指定一個 3D 凹槽邊框,其效果取決於 border-color 值。 |
inset | 指定一個 3D 內嵌邊框,其效果取決於 border-color 值。 |
outset | 指定一個 3D 外凸邊框,其效果取決於 border-color 值。 |
initial | 用於將此屬性設定為其預設值。 |
inherit | 用於繼承其父元素的屬性。 |
返回值
它返回一個字串值,表示元素的 column rule style 屬性。
HTML DOM 樣式物件“columnRuleStyle”屬性的示例
以下示例說明了各種 column rule style 屬性值。
新增列規則樣式
在下面的示例中,我們添加了一個實線規則,並將列規則樣式從實線更改為雙線和虛線。
<!DOCTYPE html> <html lang="en"> <head> <title> HTML DOM Style Object columnRuleStyle Property </title> <style> #rule { column-count: 3; column-rule: 2px solid; } </style> </head> <body> <p>Click to change the rule style.</p> <button onclick="fun()">Double</button> <button onclick="funtwo()">Dashed</button> <p id="rule"> CSS is the acronym for "Cascading Style Sheet". It's a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS helps the web developers to control the layout and other visual aspects of the web pages. CSS plays a crucial role in modern web development by providing the tools necessary to create visually appealing, accessible, and responsive websites. </p> <script> function fun() { document.getElementById("rule") .style.columnRuleStyle = "double"; } function funtwo() { document.getElementById("rule") .style.columnRuleStyle = "dashed"; } </script> </body> </html>
將列規則樣式設定為“dotted”和“hidden”
以下示例將列規則樣式設定為點狀和隱藏。
<!DOCTYPE html> <html lang="en"> <head> <title> HTML DOM Style Object columnRuleStyle Property </title> <style> #rule { column-count: 3; column-rule: 2px solid; } </style> </head> <body> <p>Click to change the rule style.</p> <button onclick="fun()">Dotted</button> <button onclick="funtwo()">Hidden</button> <p id="rule"> CSS is the acronym for "Cascading Style Sheet". It's a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS helps the web developers to control the layout and other visual aspects of the web pages. CSS plays a crucial role in modern web development by providing the tools necessary to create visually appealing, accessible, and responsive websites. </p> <script> function fun() { document.getElementById("rule") .style.columnRuleStyle = "dotted"; } function funtwo() { document.getElementById("rule") .style.columnRuleStyle = "hidden"; } </script> </body> </html>
將列規則樣式設定為“groove”和“ridge”
以下示例將列規則樣式設定為凹槽和脊線。
<!DOCTYPE html> <html lang="en"> <head> <title> HTML DOM Style Object columnRuleStyle Property </title> <style> #rule { column-count: 3; column-rule: 2px none; } </style> </head> <body> <p>Click to change the rule style.</p> <button onclick="fun()">Groove</button> <button onclick="funtwo()">Ridge</button> <p id="rule"> CSS is the acronym for "Cascading Style Sheet". It's a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS helps the web developers to control the layout and other visual aspects of the web pages. CSS plays a crucial role in modern web development by providing the tools necessary to create visually appealing, accessible, and responsive websites. </p> <script> function fun() { document.getElementById("rule") .style.columnRuleStyle = "groove"; } function funtwo() { document.getElementById("rule") .style.columnRuleStyle = "ridge"; } </script> </body> </html>
將列規則樣式設定為“inset”和“outset”
以下示例將列規則樣式設定為內嵌和外凸。
<!DOCTYPE html> <html lang="en"> <head> <title> HTML DOM Style Object columnRuleStyle Property </title> <style> #rule { column-count: 3; column-rule: 2px none; } </style> </head> <body> <p>Click to change the rule style.</p> <button onclick="fun()">Inset</button> <button onclick="funtwo()">Outset</button> <p id="rule"> CSS is the acronym for "Cascading Style Sheet". It's a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS helps the web developers to control the layout and other visual aspects of the web pages. CSS plays a crucial role in modern web development by providing the tools necessary to create visually appealing, accessible, and responsive websites. </p> <script> function fun() { document.getElementById("rule") .style.columnRuleStyle = "inset"; } function funtwo() { document.getElementById("rule") .style.columnRuleStyle = "outset"; } </script> </body> </html>
支援的瀏覽器
屬性 | ![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
columnRuleStyle | 是 50 | 是 12 | 是 52 | 是 9 | 是 11.1 |
html_dom_style_object_reference.htm
廣告