使用 CSS 設定列間規則的寬度


使用 column-rule-width 屬性設定列間規則的寬度。

示例

你可以嘗試執行以下程式碼來應用 column-rule-width 屬性

線上示例

<!DOCTYPE html>
<html>
   <head>
      <style>
         .demo {
            column-count: 4;
            column-gap: 50px;
            column-rule-color: maroon;
            column-rule-style: dashed;
            column-rule-width: 5px;
         }
      </style>
   </head>
   <body>
      <div class = "demo">
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
      </div>
   </body>
</html>

更新日期:2020-07-03

85 次瀏覽

開啟您的 職業生涯

完成課程獲得認證

開始學習
廣告