List styles in CSS

Source: Internet
Author: User

in web design, we often put some similar functions of the label in the same group, we often use the list of labels (no sequence list ul, there is a serial table ol), The design of the list style in the list label can make our page to a certain degree of beautification.

The style of the list in CSS is primarily the setting of the list item's top table symbol, with the following syntax:

List-style-type:disc | Circle | Square | decimal |
Lower-roman | Upper-roman | Lower-alpha | Upper-alpha |
none | Armenian | cjk-ideographic | Georgian | Lower-greek |
Hebrew | Hiragana | Hiragana-iroha | Katakana | Katakana-iroha |
Lower-latin | Upper-latin

by taking different List-style-type property values, we can get different bullets.

Cases:

UL {List-style-type:disc;}/* Solid circle */ul {list-style-type:circle;}/* Hollow circle */ul {list-style-type:square;}/* Solid block */ul {list-s Tyle-type:none;} /* Do not display bullets */ol {list-style-type:decimal;}/* Arabic numerals */ol {list-style-type:lower-roman;}/* Lowercase roman numerals */ol {list-style-type: Upper-alpha;} /* Uppercase English Alphabet */

if you are not satisfied with the many list symbols specified in CSS, we can customize the list of symbols

List-style-image:none | URL (URL)

Using this method, we can set any image as a list symbol for the list of items. Here, the value we set is the path of the picture file relative to the Web page file or the absolute path (the file from the Web site).

The most important note in the list style is that the list style can only be set in the List tab (ul,ol), not in the list's self-tagging (li).

List styles in CSS

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.