Perbatasan gayaRightStyleProperti _
Contoh
Tambahkan batas kanan "padat" ke elemen <div>:
document.getElementById("myDiv").style.borderRightStyle = "solid";
Definisi dan Penggunaan
Properti borderRightStyle menyetel atau mengembalikan gaya batas kanan elemen.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
borderRightStyle | Yes | Yes | Yes | Yes | Yes |
Sintaksis
Kembalikan properti borderRightStyle:
object.style.borderRightStyle
Setel properti borderRightStyle:
object.style.borderRightStyle = 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 kanan elemen |
Versi CSS | CSS1 |
Lebih Banyak Contoh
Contoh
Ubah gaya batas kanan elemen <div> menjadi "bertitik":
document.getElementById("myDiv").style.borderRightStyle = "dotted";
Contoh
Kembalikan gaya batas kanan elemen <div>:
alert(document.getElementById("myDiv").style.borderRightStyle);
Contoh
Sebuah demonstrasi dari semua nilai yang berbeda:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderRightStyle = listValue;
Halaman Terkait
Tutorial CSS: Perbatasan CSS
Referensi CSS: properti bergaya perbatasan-kanan
Referensi DOM HTML: properti perbatasan
Objek Gaya