CSS list:
Properties
| Description
| ||||||||||||||||||||||||||||||||||||||||||||
list-style
| Abbreviation attribute. Used to set all properties for a list in one declaration. | ||||||||||||||||||||||||||||||||||||||||||||
list-style-image | Sets the image as the list item flag. | ||||||||||||||||||||||||||||||||||||||||||||
list-style-position | Set the position of the list item mark in the list. | ||||||||||||||||||||||||||||||||||||||||||||
list-style-type | Set the type of list item flag. | ||||||||||||||||||||||||||||||||||||||||||||
marker-offset |
|
值 | 描述 |
URL | 图像的路径。 |
none | 默认。无图形被显示。 |
inherit | 规定应该从父元素继承 list-style-image 属性的值。 |
Value | Description |
none | No tag. |
disc | Default. Markers are filled circles. |
circle | The mark is a hollow circle. |
square | Markers are solid squares. |
decimal | Markers are numbers. |
decimal-leading-zero | Number tag starting with 0. (01, 02, 03, etc.) |
lower-roman | Lowercase Roman numerals (i, ii, iii, iv, v, etc.) |
upper-roman | Uppercase Roman numerals (I , II, III, IV, V, etc.) |
lower-alpha | Lowercase English letter The marker is lower-alpha (a, b, c, etc.) |
upper-alpha | uppercase English letters The marker is upper-alpha (A, B, C, etc.) |
lower-greek | Lowercase Greek letters (alpha, beta, gamma, etc.) |
lower-latin | lowercase Latin letters (a, b, c, etc.) |
upper-latin | Uppercase Latin letters (A, B, C, etc.) |
hebrew | Traditional Hebrew numbering |
armenian | Traditional Armenian numbering |
georgian | Traditional Georgian numbering (an, ban, gan, etc.) |
cjk-ideographic | Simple ideographic numbers |
hiragana | The tags are: a, i, u, e, o, ka, ki, etc. (Japanese katakana) |
katakana | The tags are: A, I, U, E, O, KA, KI, etc. (Japanese Katakana) |
hiragana-iroha | The tags are: i, ro, ha, ni, ho, he, to, etc. (Japanese katakana) |
katakana-iroha | The tags are: I, RO, HA, NI, HO, HE, TO, etc. (Japanese katakana) |
value | Description |
URL | Path to the image. |
none | Default. No graphics are displayed. |
inherit | Specifies that the value of the list-style-image attribute should be inherited from the parent element. |
(3) Browser support: All browsers support the list-style-image attribute.
Ps: Always specify a "list-style-type" attribute in case the image is not available.
3. List mark position: list-style-position attribute
(1) Function: Set where to place the list Item tag;
(2) Possible values:
Value
| Description
| ||||||||
inside
| The list item tag is placed inside the text, And the wrapping text is aligned according to the marker.
| ||||||||
outside | Default value. Keep the mark to the left of the text. The list item tag is placed outside the text, and the surrounding text is not aligned according to the tag. | ||||||||
inherit | Specifies that the value of the list-style-position attribute should be inherited from the parent element. |
(3) Browser support: All browsers support the list-style-position attribute.
4. Abbreviated list style: list-style attribute
(1) Function: Set all list attributes in one statement;
( 2) Order: type, position, image;
Ps: The values of list-style
can be listed in any order, and these values can be ignored. As long as one value is provided, the others will be filled in with their default values.