CSS tree list layout, similar to the number list in word

Source: Internet
Author: User

Use CSS to deploy a list similar to a tree, similar to the numbered list in word, instead of a general list. This example is used to introduce the usage of Li in CSS, this kind of tree list is rare at ordinary times, hoping to help you learn CSS.

Instance code:Copy to Clipboard reference content: [www.bkjia.com] <! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Title> css tree-like list layout instance </title>
<Style>
Ul
{
Background: #999999;
Font-size: 24px;
}
</Style>
</Head>

<Body>
<Ul>
<Li> This is the first list.
<Ul>
<Li> This is the second list.
<Ul>
<Li> This is the third list. </Li>
<Li> This is the third list. </Li> </ul> </li>
<Li> This is the second list. </Li> </ul> </li>
<Li> This is the first list. </Li> </ul>
<Ol>
<Li> This is the first list.
<Ol>
<Li> This is an example of the display effect of two list elements.
<Ol>
<Li> This is the third list. </Li>
<Li> This is the third list. </Li> </ol> </li>
<Li> This is the second list. </Li> </ol> </li>
<Li> This is the first list. </Li> </ol>
</Body>
</Html>

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.