Computer >> คอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

กำหนดสีของกฎระหว่างคอลัมน์ด้วย CSS


หากต้องการกำหนดสีระหว่างคอลัมน์ ให้ใช้ column-rule-color คุณสมบัติ. คุณสามารถลองเรียกใช้โค้ดต่อไปนี้เพื่อใช้งาน column-rule-color ทรัพย์สิน

ด้วยเหตุนี้ เราจะกำหนดรูปแบบของกฎของคอลัมน์ด้วย:

ตัวอย่าง

<!DOCTYPE html>
<html>
   <head>
      <style>
         .demo {
            column-count: 4;
            column-gap: 50px;
            column-rule-color: orange;
            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.  
         This is demo text. This is demo text.
      </div>
   </body>
</html>