Batas gayaCutup Properti
Contoh
Ciutkan batas tabel:
document.getElementById("myTable").style.borderCollapse = "collapse";
Lebih banyak contoh "Coba Sendiri" di bawah ini.
Definisi dan Penggunaan
Properti borderCollapse menyetel atau mengembalikan apakah batas tabel harus diciutkan menjadi satu batas atau tidak.
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
borderCollapse | 1.0 | 5.0 | 1.0 | 1.2 | 4.0 |
Sintaksis
Kembalikan properti borderCollapse:
object.style.borderCollapse
Setel properti borderCollapse:
object.style.borderCollapse = "separate|collapse|initial|inherit"
Nilai properti
Value | Description |
---|---|
separate | Separate borders are drawn for all table cell elements. This is default |
collapse | Borders are not drawn between table cell elements |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Detail Teknis
Nilai Bawaan: | memisahkan |
---|---|
Nilai Kembali: | Sebuah String, mewakili batas-batas tabel |
Versi CSS | CSS2 |
Lebih Banyak Contoh
Contoh
Kembalikan properti borderCollapse:
alert(document.getElementById("myTable").style.borderCollapse);
Halaman Terkait
Tutorial CSS: Tabel CSS
Referensi CSS: properti border-collapse