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. Vue Overview Vue official we...
File transfer between Windows and Linux (1) Use W...
Table of contents 1. Integrate Ant Design Vue 2. ...
MySQL is the most popular relational database man...
1. Download the installation package The installa...
This article example shares the specific code of ...
Table of contents Preface Conversion relationship...
Preface: Because many business tables use design ...
Check what is installed in mysql rpm -qa | grep -...
Vue uses Ref to get component instances across le...
Centos7 uses yum to install MySQL and how to achi...
MySQL CURDATE Function Introduction If used in a ...
This article mainly introduces how some content i...
The most important logs in the MySQL log system a...
wangEditor is a web rich text editor developed ba...