English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
list-style-The position CSS attribute specifies the position of the list item marker relative to the main block box of the list item.
The following table provides usage instructions and version history of this attribute, as well as its usage syntax in JavaScript scripts.
Default Value: | outside |
---|---|
Applies To: | List Item |
Inheritance: | Yes |
Animatable: | No.Please see Animation Attributes. |
Version: | CSS 1,2,3 |
JavaScript Syntax: | object.style.listStylePosition="inside" |
The syntax of this attribute is as follows:
list-style-position: inside | outside | initial | inherit
The following examples demonstrate how to use list-style-position Attribute.
ol { list-style-position: inside; } ul { list-style-position: outside; }Test and see‹/›
The following table describes the values of this attribute.
Value | Description |
---|---|
inside | List markers are placed in the first inline box within the main block box, before the element content. |
outside | List markers are placed outside the main block box. This is the default value. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated elements adopt the parent element's list-style-position Attribute Values. |
list-style-Browser Compatibility of position Attribute, the numbers in the following table represent the minimum version number of browsers that support this attribute; all mainstream browsers support this attribute.
|
Please refer to the following tutorial:HTML List,CSS List.
Related Attributes:list-style,list-style-image,list-style-type.