Properti batas bawah CSS
Contoh
Atur gaya batas bawah untuk elemen yang berbeda:
h1 {
border-bottom: 5px solid red;
}
h2 {
border-bottom: 4px dotted blue;
}
div {
border-bottom: double;
}
Definisi dan Penggunaan
Properti border-bottom
adalah properti singkatan untuk (dalam urutan berikut):
Jika border-bottom-color dihilangkan, warna yang diterapkan akan menjadi warna teks.
Nilai bawaan: | sedang tidak ada warna |
---|---|
Diwarisi: | tidak |
Animasi: | ya, lihat properti individu . Baca tentang animasi |
Versi: kapan: | CSS1 |
Sintaks JavaScript: | objek .style.borderBottom="15px bertitik biru muda" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
border-bottom | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Sintaks CSS
border-bottom: border-width border-style border-color|initial|inherit;
Nilai properti
Value | Description |
---|---|
border-bottom-width | Required. Specifies the width of the bottom border. Default value is "medium" |
border-bottom-style | Required. Specifies the style of the bottom border. Default value is "none" |
border-bottom-color | Optional. Specifies the color of the bottom border. Default value is the color of the text |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Halaman Terkait
Tutorial CSS: Perbatasan CSS
Referensi DOM HTML: properti borderBottom