Home >Web Front-end >CSS Tutorial >How to cancel the serial number of li in css
In CSS, you can use the list-style-type attribute to cancel the sequence number of li. You only need to set the "list-style-type:none" style to the li element. The list-style-type attribute is used to set the type of list item tag. When the value is none, it means there is no tag.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
Create a new html file, named test.html, to explain how to remove the li tag serial number in css. In the test.html file, create a list using the li tag. Within the css tag, set the style of the list.
In the css tag, set the list-style-type attribute to none to remove the serial number of the li tag.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> </head> <body> <ol class="mycss"> <li>标签a</li> <li>标签b</li> <li>标签c</li> </ol> </body> </html>
Before adding the effect code:
After adding the effect code:
Code:
<style> li { list-style-type: none; } </style>
Effect :
Extension:
list-style-type attribute sets the type of list item tag.
Recommended learning: css video tutorial
The above is the detailed content of How to cancel the serial number of li in css. For more information, please follow other related articles on the PHP Chinese website!