Properti bergaya daftar CSS
Contoh
Tentukan semua properti daftar dalam satu deklarasi:
ul
{
list-style: square inside url("sqpurple.gif");
}
Definisi dan Penggunaan
Properti list-style
adalah singkatan dari properti berikut:
Jika salah satu nilai tidak ada, nilai default untuk properti tersebut akan digunakan.
Nilai bawaan: | disk di luar tidak ada |
---|---|
Diwarisi: | Ya |
Animasi: | tidak. Baca tentang animasi |
Versi: kapan: | CSS1 |
Sintaks JavaScript: | objek .style.listStyle="desimal di dalam" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
list-style | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Sintaks CSS
list-style: list-style-type list-style-position list-style-image|initial|inherit;
Nilai properti
Value | Description |
---|---|
list-style-type | Specifies the type of list-item marker. Default value is "disc" |
list-style-position | Specifies where to place the list-item marker. Default value is "outside" |
list-style-image | Specifies the type of list-item marker. Default value is "none" |
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: Daftar CSS
Referensi DOM HTML: properti listStyle