Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> CSS

Thiết lập màu đường kẻ giữa các cột với CSS

Để thiết lập màu cho đường kẻ giữa các cột, sử dụng thuộc tính column-rule-color. Bạn có thể chạy đoạn mã sau để triển khai thuộc tính column-rule-color.

Chúng ta cũng sẽ thiết lập kiểu dáng cho đường kẻ cột:

Ví dụ

<!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. This is demo text. This is demo text.            This is demo text. This is demo text.       </div>    </body> </html>