Properti CSS list-style-image
Contoh
Tentukan gambar sebagai penanda item daftar dalam daftar:
ul
{
list-style-image: url('sqpurple.gif');
}
Definisi dan Penggunaan
Properti list-style-image
menggantikan penanda item daftar dengan gambar.
Catatan: Selalu tentukan properti tipe-daftar sebagai tambahan. Properti ini digunakan jika gambar karena alasan tertentu tidak tersedia.
Nilai bawaan: | tidak ada |
---|---|
Diwarisi: | Ya |
Animasi: | tidak. Baca tentang animasi |
Versi: kapan: | CSS1 |
Sintaks JavaScript: | objek .style.listStyleImage="url('smiley.gif')" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
list-style-image | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Sintaks CSS
list-style-image: none|url|initial|inherit;
Nilai properti
Value | Description | Play it |
---|---|---|
none | No image will be displayed. Instead, the list-style-type property will define what type of list marker will be rendered. This is default | |
url | The path to the image to be used as a list-item marker | |
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 CSS: properti gaya daftar
Referensi DOM HTML: properti listStyleImage