Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-settings.php on line 468 Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-settings.php on line 483 Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-settings.php on line 490 Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-settings.php on line 526 Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-includes/cache.php on line 103 Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-includes/query.php on line 21 Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-includes/theme.php on line 618 Fix Blog - CSS Справочник » list-style

list-style

list-style

Браузер Internet Explorer Netscape Opera Safari Mozilla Firefox
Версия 5.5 6.0 7.0 7.0 8.0 7.0 8.0 9.0 2.0 3.0 1.7 1.0 2.0 3.0
Поддерживается Да Да Да Да Да Да Да Да Да Да Да Да Да Да

Краткая информация

CSS CSS2
Значение по умолчанию disc (для <UL>); decimal (для <OL>)
Наследуется Да
Применяется К тегам <DD>, <DT>, <LI>, <OL> и <UL>,
а также ко всем элементам, у которых указано свойство стиля display: list-item
Аналог HTML <ul type> | <ol type> | <li type>
Ссылка на спецификацию http://www.w3.org/TR/CSS21/generate.html#propdef-list-style

Описание

Атрибут, позволяющий одновременно задать стиль маркера, его положение, а также
изображение, которое будет использоваться в качестве маркера. Для более подробного
ознакомления с аргументами, смотрите свойства каждого параметра list-style-type,
list-style-position и list-style-image
отдельно.

Синтаксис

list-style: list-style-type || list-style-position || list-style-image

Аргументы

Любые комбинации трех значений, определяющих стиль маркеров, в произвольном
порядке. Значения разделяются между собой пробелом. Ни один аргумент не является
обязательным, поэтому неиспользуемые значения можно опустить.

Пример

Валидный HTML Валидный CSS

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>list-style</title>

<style type="text/css">
UL {
 list-style:
  square /* Квадратные маркеры */
  outside; /* Маркеры размещаются за пределами текстового
блока */

}
</style>
</head>
<body>

<ul>

<li>Lorem ipsum dolor sit amet</li>
<li>Consectetuer adipiscing elit</li>
<li>Sed diem nonummy nibh euismod</li>
<li>Tincidunt ut lacreet dolore magna aliguam erat volutpat. Ut wisis
enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit lobortis
nisl ut aliquip ex ea commodo consequat.</li>

</ul>

</body>
</html>

Результат данного примера показан ни рис. 1.

Рис. 1

Рис. 1. Применение параметра list-style

Объектная модель

[window.]document.getElementById("elementID").style.listStyle

Filed under list-style