Style borderBottom Property
Contoh
Tambahkan batas bawah ke elemen <div>:
document.getElementById("myDiv").style.borderBottom = "thick solid #0000FF";
Lebih banyak contoh "Coba Sendiri" di bawah ini.
Definisi dan Penggunaan
Properti borderBottom menyetel atau mengembalikan hingga tiga properti border-bottom yang terpisah, dalam bentuk singkatan.
Dengan properti ini, Anda dapat mengatur/mengembalikan satu atau beberapa hal berikut (dalam urutan apa pun):
- batas-bawah-lebar
- gaya perbatasan-bawah
- batas-bawah-warna
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
borderBottom | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Sintaksis
Kembalikan properti borderBottom:
object.style.borderBottom
Setel properti borderBottom:
object.style.borderBottom = "width style color|initial|inherit"
Nilai properti
Parameter | Description |
---|---|
width | Sets the width of the bottom border |
style | Sets the style of the bottom border |
color | Sets the color of the bottom border |
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: | tidak ditentukan |
---|---|
Nilai Kembali: | Sebuah String, mewakili lebar, gaya dan/atau warna dari batas bawah suatu elemen |
Versi CSS | CSS1 |
Lebih Banyak Contoh
Contoh
Ubah lebar, gaya, dan warna batas bawah elemen <div>:
document.getElementById("myDiv").style.borderBottom = "thin dotted red";
Contoh
Kembalikan nilai properti border-bottom dari elemen <div>:
alert(document.getElementById("myDiv").style.borderBottom);
Halaman Terkait
Tutorial CSS: Perbatasan CSS
Referensi CSS: properti border-bottom
Referensi DOM HTML: properti perbatasan