CSS list-style-image Свойство
Пример
Укажите изображение в качестве маркера элемента списка в списке:
ul
{
list-style-image: url('sqpurple.gif');
}
Определение и использование
Свойство list-style-image
заменяет маркер элемента списка на изображение.
Примечание: Кроме того, всегда указывайте свойство тип стиля List. Это свойство используется, если изображение по какой-либо причине недоступно.
Значение по умолчанию: | none |
---|---|
Inherited: | yes |
Animatable: | no. Читайте о animatable |
Version: | CSS1 |
Синтаксис JavaScript: | object.style.listStyleImage="url('smiley.gif')" |
Поддержка браузера
Номера в таблице указывают первую версию браузера, которая полностью поддерживает свойство.
Свойство | |||||
---|---|---|---|---|---|
list-style-image | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Синтаксис CSS
list-style-image: none|url|initial|inherit;
Значения свойств
Значение | Описание | |
---|---|---|
none | Изображение не будет отображаться. Вместо этого свойство в стиле List будет определять, какой тип маркера списка будет отображаться. Это значение по умолчанию | |
url | Путь к изображению, используемому в качестве маркера элемента списка | |
initial | Присваивает этому свойству значение по умолчанию. (Читайте о initial) | |
inherit | Наследует это свойство из родительского элемента. (Читайте о inherit) |
Похожие страницы
CSS Справочник: CSS List
CSS Справка: list-style Свойство
HTML DOM Справочник: listStyleImage Свойство