Gaya borderLeftColor Property
Contoh
Ubah warna batas kiri elemen <div> menjadi merah:
document.getElementById("myDiv").style.borderLeftColor = "red";
Definisi dan Penggunaan
Properti borderLeftColor menetapkan atau mengembalikan warna batas kiri elemen.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
borderLeftColor | Yes | Yes | Yes | Yes | Yes |
Sintaksis
Kembalikan properti borderLeftColor:
object.style.borderLeftColor
Setel properti borderLeftColor:
object.style.borderLeftColor = "color|transparent|initial|inherit"
Nilai properti
Value | Description |
---|---|
color | Specifies the color of the left border. Look at CSS Color Values for a complete list of possible color values. Default color is the current color of the element |
transparent | The color of the left border is transparent (underlying content will shine through) |
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: | warna saat ini |
---|---|
Nilai Kembali: | String, mewakili warna batas kiri elemen |
Versi CSS | CSS1 |
Lebih Banyak Contoh
Contoh
Kembalikan warna batas kiri elemen <div>:
alert(document.getElementById("myDiv").style.borderLeftColor);
Halaman Terkait
Tutorial CSS: Perbatasan CSS
Referensi CSS: properti border-left-color
Referensi DOM HTML: properti perbatasan