How to define item list css

藏色散人
Release: 2020-12-18 11:08:48
Original
2829 people have browsed it

How to define a list of items in css: first create an HTML sample file; then use the "

  • " tag in HTML to define the list items; finally use the "list-style" attribute in css to define the list style That’s it.
  • How to define item list css

    The operating environment of this tutorial: Windows7 system, HTML5&&CSS3 version. This method is suitable for all brands of computers.

    Recommended: "css Video Tutorial"

    In HTML, you can use the

  • tag to define list items, and then use the list-style attribute in css to define the list Style, the shorthand list-style attribute sets all list properties in one declaration.

    You can set the following properties in order:

    • list-style-type

    • list-style-image

    • list-style-position

    Example:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8"> 
    <style>
    ul 
    {
    list-style:disc;
    }
    </style>
    </head>
    <body>
    <ul>
    <li>Coffee</li>
    <li>Tea</li>
    <li>Coca Cola</li>
    </ul>
    </body>
    </html>
    Copy after login

    The effect is as follows:

    How to define item list css

  • The above is the detailed content of How to define item list css. For more information, please follow other related articles on the PHP Chinese website!

    Related labels:
    css
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template