CSS 中設定列的速記屬性


使用 columns 屬性可以設定 CSS 的列。你可以嘗試執行以下程式碼來實現 columns 屬性

示例

即時演示

<!DOCTYPE html>
<html>
   <head>
      <style>
         .demo {
            column-rule-color: gray;
            columns: 100px 4;
            column-rule-style: dashed;
         }
      </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 年 6 月 24 日

116 次瀏覽

開啟你的 職業之旅

透過完成課程獲得認證

開始
廣告
© . All rights reserved.