CSS Manual Simplified: list attributes

Source: Internet
Author: User
Tags compact manual lowercase
CSS attributes:
7. List attributes:
The attribute here is used to describe a series of attributes of the list.
The list-style-type attribute describes the symbols used before each item in the list:
Attribute name: 'List-style-type'
Attribute value: disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none
Initial value: disc
Target objects: list elements
Inherit?: yes
Percentage remarks: Forbidden
Attribute value meaning:
Disc: pie.
Circle: hollow circle.
Square: square.
Decimal: a decimal value.
Lower-roman: lowercase roman numerals.
Upper-roman: upper-case roman numerals.
Lower-alpha: lowercase Greek letter.
Upper-alpha: uppercase Greek letters.
For example:
<STYLE>
OL {list-style-type: lower-roman}
</STYLE>
<BODY>
<OL>
<LI> This is the first item.
<LI> This is the second item.
<LI> This is the third item.
</OL>
</BODY>
You can also use list-style-image to convert the symbols in front of the list into graphs:
Attribute name: 'List-style-image'
Attribute value: <url> | none
Initial value: none
Target objects: list elements
Inherit?: yes
Percentage remarks: Forbidden
<Url> it can be an absolute or relative address.
The list-style-position attribute is used to describe the position display of the list:
Attribute name: 'List-style-position'
Attribute value: inside | outside
Initial value: outside
Target objects: list elements
Inherit?: yes
Percentage remarks: Forbidden
The value outside and inside indicate external or internal display in the BOX, for example:
<STYLE type = "text/css">
UL {list-style: outside}
UL. compact {list-style: inside} </STYLE> <UL>
<LI> first list item comes first
<LI> second list item comes second
</UL>
<UL class = compact>
<LI> first list item comes first
<LI> second list item comes second
</UL>
The list-style attribute is a shortcut of the preceding attributes:
Attribute name: 'List-style'
Attribute value: <'list-style-type' >||< 'list-style-position' >||< 'list-style-image'>
Initial value: no
Target objects: list elements
Inherit?: yes
Percentage remarks: Forbidden
For example:
UL {list-style: upper-roman inside}/* valid for any UL */
UL ~ UL {list-style: circle outside}/* valid for any UL internal UL mark */
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.