Gaya borderBottomWidth Property
Contoh
Ubah lebar batas bawah elemen <div> menjadi 10px:
document.getElementById("myDiv").style.borderBottomWidth = "10px";
Lebih banyak contoh "Coba Sendiri" di bawah ini.
Definisi dan Penggunaan
Properti borderBottomWidth menetapkan atau mengembalikan lebar batas bawah elemen.
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
borderBottomWidth | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Sintaksis
Kembalikan properti borderBottomWidth:
object.style.borderBottomWidth
Setel properti borderBottomWidth:
object.style.borderBottomWidth = "thin|medium|thick|length|initial|inherit"
Nilai properti
Value | Description |
---|---|
thin | Defines a thin border |
medium | Defines a medium border. This is default |
thick | Defines a thick border |
length | The width of the border in length units |
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: | sedang |
---|---|
Nilai Kembali: | Sebuah String, mewakili lebar batas bawah elemen |
Versi CSS | CSS1 |
Lebih Banyak Contoh
Contoh
Ubah lebar batas bawah elemen <div> menjadi tipis:
document.getElementById("myDiv").style.borderBottomWidth = "thin";
Contoh
Kembalikan lebar batas bawah elemen <div>:
alert(document.getElementById("myDiv").style.borderBottomWidth);
Halaman Terkait
Tutorial CSS: Perbatasan CSS
Referensi CSS: properti border-bottom-width
Referensi DOM HTML: properti perbatasan