Definition and Usage
The list-style CSS property is a shorthand property for setting list-style-type, list-style-image and list-style-position.
- Initialthe concatenation of the initial values of its longhand properties:
- list-style-image: is itself a shorthand, its initial value is the concatenation of its own longhand properties
- list-style-position: is itself a shorthand, its initial value is the concatenation of its own longhand properties
- list-style-type: is itself a shorthand, its initial value is the concatenation of its own longhand properties
- Applies tolist items
- Inheritedyes
- Mediavisual
- Computed Valueas each of the properties of the shorthand:
- list-style-image: none or the image with its URI made absolute
- list-style-position: as specified
- list-style-type: as specified
- Animatableno
- Canonical orderorder of appearance in the formal grammar of the values
Syntax
Formal syntax: <'list-style-image'> || <'list-style-position'> || <'list-style-type'>
Values
Accepts one, two or three keywords in any order.
- <‘list-style-type’>
- See list-style-type
- <‘list-style-image’>
- See list-style-image
- <‘list-style-position’>
- See list-style-position
Examples
1 |
ul { list-style : circle ; } |
2 |
#foo { list-style : square inside ; } |
Compatibility
Desktop browsers
Feature |
Chrome |
Firefox (Gecko) |
Internet Explorer |
Opera |
Safari |
Basic support |
1.0 |
1.0 (1.7 or earlier) |
4.0 |
7.0 |
1.0 |
Mobile browsers
Feature |
Android |
Firefox Mobile (Gecko) |
IE Phone |
Opera Mobile |
Safari Mobile |
Basic support |
1.0 |
1.0 (1) |
6.0 |
6.0 |
1.0 |