Properti spasi perbatasan CSS
Contoh
Setel penspasian batas untuk tabel:
#table1 {
border-collapse: separate;
border-spacing: 15px;
}
#table2 {
border-collapse: separate;
border-spacing: 15px 50px;
}
Definisi dan Penggunaan
Properti border-spacing
mengatur jarak antara batas sel yang berdekatan.
Catatan: Properti ini hanya berfungsi jika border-collapse terpisah.
Nilai bawaan: | 2px |
---|---|
Diwarisi: | Ya |
Animasi: | Ya. Baca tentang animasi |
Versi: kapan: | CSS2 |
Sintaks JavaScript: | objek .style.borderSpacing="15px" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
border-spacing | 1.0 | 8.0 | 1.0 | 1.0 | 4.0 |
Sintaks CSS
border-spacing: length|initial|inherit;
Nilai properti
Value | Description | Play it |
---|---|---|
length length | Specifies the distance between the borders of adjacent cells in px, cm, etc. Negative values are not allowed.
|
|
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
Halaman Terkait
Tutorial CSS: Tabel CSS
Referensi DOM HTML: properti borderSpacing