Perbatasan gayaBottomStyle Property
Contoh
Tambahkan batas bawah "padat" ke elemen <div>:
document.getElementById("myDiv").style.borderBottomStyle = "solid";
Definisi dan Penggunaan
Properti borderBottomStyle menyetel atau mengembalikan gaya batas bawah elemen.
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
borderBottomStyle | 1.0 | 5.5 | 1.0 | 1.0 | 9.2 |
Catatan: Nilai "tersembunyi" tidak didukung di IE7 dan versi sebelumnya. IE9 dan yang lebih baru mendukung "tersembunyi".
Sintaksis
Kembalikan properti borderBottomStyle:
object.style.borderBottomStyle
Setel properti borderBottomStyle:
object.style.borderBottomStyle = value
Nilai properti
Value | Description |
---|---|
none | Defines no border. This is default |
hidden | Same as "none", except in border conflict resolution for table elements |
dotted | Defines a dotted border |
dashed | Defines a dashed border |
solid | Defines a solid border |
double | Defines two borders. The width of the two borders are the same as the border-width value |
groove | Defines a 3D grooved border. The effect depends on the border-color value |
ridge | Defines a 3D ridged border. The effect depends on the border-color value |
inset | Defines a 3D inset border. The effect depends on the border-color value |
outset | Defines a 3D outset border. The effect depends on the border-color value |
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 ada |
---|---|
Nilai Kembali: | Sebuah String, mewakili gaya batas bawah elemen |
Versi CSS | CSS1 |
Lebih Banyak Contoh
Contoh
Ubah gaya batas bawah elemen <div> menjadi "bertitik":
document.getElementById("myDiv").style.borderBottomStyle = "dotted";
Contoh
Kembalikan gaya batas bawah elemen <div>:
alert(document.getElementById("myDiv").style.borderBottomStyle);
Contoh
Sebuah demonstrasi dari semua nilai yang berbeda:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderBottomStyle = listValue;
Halaman Terkait
Tutorial CSS: Perbatasan CSS
Referensi CSS: properti bergaya border-bottom
Referensi DOM HTML: properti perbatasan