1. Set the list symbol list-style-type: attribute; //Set list style list-style-type: none; //clear style There are many properties you can try yourself: circle, disc, decimal. . . . 2. Set list picture symbols Set image symbol for ul,ol ul,ol{ list-style-image: url("li.png") } Code: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Set list symbols</title> <style type="text/css"> ul,ol{ list-style-image: url("li.png") } </style> </head> <body> <ul> <li>Home</li> <li>My Blog</li> <li style="list-style-image: url('image.png')">My photo album</li> <li>Leave a message</li> <li>About me</li> </ul> <ol> <li>Home</li> <li>My Blog</li> <li>My photo album</li> <li>Leave a message</li> <li>About me</li> </ol> </body> </html> Display effect: 3. Create a simple navigation menu <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Creating a simple navigation menu</title> <style type="text/css"> #navigation{ /* width: 120px; */ font-family: Arial; font-size: 14px; text-align: center; } #navigation ul{ list-style-type: none; margin:0px; padding:0px; } #navigation li{ border-bottom:1px solid #9F9FED; /* Add underline */ float: left; /* horizontal arrangement */ } #navigation li a{ display: block; height:1em; padding: 5px 5px 5px 0.5em; text-decoration: none; } #navigation li a:link,#navigation li a:visited{ background-color: #1136c1; color: #FFF; } #navigation li a:hover{ /* When the mouse passes by*/ background-color: #002099; /* Change background */ color: #ff0; /* Change text color */ } </style> </head> <body> <div id="navigation"> <ul> <li><a href="#">Home</a></li> <li><a href="#">My Blog</a></li> <li><a href="#">My Photo Album</a></li> <li><a href="#">Leave a message</a></li> <li><a href="#">About Me</a></li> </ul> </div> </body> </html> Summarize The above is the CSS list style setting and navigation menu creation implementation code introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! |
<<: W3C Tutorial (4): W3C XHTML Activities
>>: A detailed discussion of components in Vue
Table of contents 1. Project Construction 2. Vue3...
HTML web page hyperlink tag learning tutorial lin...
Table partitioning is different from database par...
Preface This article introduces the use of vue-ro...
background I talked to my classmates about a boun...
This tutorial shares the process of manually inst...
Table of contents introduce Link start Continue t...
Table of contents 1. Development Environment 2. I...
I encountered a small problem today and struggled ...
emmm the name is just a random guess 2333 Preface...
From handicraft design to graphic design to web de...
Recommended reading: Navicat12.1 series cracking ...
background Ever wondered how to create a shadow e...
Detailed example of getting the maximum value of ...
Table of contents Preface 1. cat command: 2. more...