Properti aturan kolom CSS
Contoh
Tentukan lebar, gaya, dan warna aturan antar kolom:
div
{
column-rule: 4px double #ff00ff;
}
Lebih banyak contoh "Coba Sendiri" di bawah ini.
Definisi dan Penggunaan
Properti column-rule
menetapkan lebar, gaya, dan warna aturan antar kolom.
Properti ini adalah properti singkatan untuk:
Jika warna aturan kolom dihilangkan, warna yang diterapkan akan menjadi warna teks.
Nilai bawaan: | sedang tidak ada warna |
---|---|
Diwarisi: | tidak |
Animasi: | ya, lihat properti individu . Baca tentang animasi |
Versi: kapan: | CSS3 |
Sintaks JavaScript: | objek .style.columnRule="3px awal biru" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Angka yang diikuti oleh -webkit- atau -moz- menentukan versi pertama yang berfungsi dengan awalan.
Property | |||||
---|---|---|---|---|---|
column-rule | 50.0 4.0 -webkit- |
10.0 | 52.0 2.0 -moz- |
9.0 3.1 -webkit- |
37.0 15.0 -webkit 11.1 |
Sintaks CSS
column-rule: column-rule-width column-rule-style column-rule-color|initial|inherit;
Nilai properti
Value | Description |
---|---|
column-rule-width | Sets the width of the rule between columns. Default value is medium |
column-rule-style | Sets the style of the rule between columns. Default value is none |
column-rule-color | Sets the color of the rule between columns. Default value is the color of the element |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Lebih Banyak Contoh
Contoh
Bagi teks dalam elemen <div> menjadi tiga kolom:
div
{
column-count: 3;
}
Contoh
Tentukan celah 40 piksel di antara kolom:
div
{
column-gap: 40px;
}
Halaman Terkait
Tutorial CSS: Beberapa Kolom CSS
Referensi HTML DOM: properti columnRule