How to cancel the display style type of unordered list in css

WBOY
Release: 2022-04-27 17:49:15
Original
3584 people have browsed it

Cancellation method: 1. Use the "list-style" attribute to cancel the black dot style of the unordered list. The syntax is "unordered list {list-style:none}"; 2. Use the display attribute to cancel none. The sequence list is displayed in lines, and the syntax is "unordered list {display:inline}".

How to cancel the display style type of unordered list in css

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

How to cancel the display style type of unordered list in css

Unordered list

Unordered list Sorting means there is no serial number, but by default a dot will be displayed in front

Copy after login
  • 第一句
  • 第二句
  • 第三句
  • 第四句

Sample code:

nbsp;html>
	
		
Copy after login
  • 第一句
  • 第二句
  • 第三句
  • 第四句

Screenshot of the effect:
How to cancel the display style type of unordered list in css

Remove the points from the unordered list

You can remove the dots by using list-style: none;

By writing the style attribute directly in the ul tag or writing a selector, add list-style: none ;You can remove the dots in this sentence.
Sample code:

nbsp;html>
	
		
Copy after login
  • 第一句
  • 第二句
  • 第三句
  • 第四句
  • 第一句
  • 第二句
  • 第三句
  • 第四句

Effect screenshot:
How to cancel the display style type of unordered list in css

Display in rows

Whether it is an ordered list or an unordered list, it occupies one row by default and is displayed in rows. But we can also display them in one line through the display attribute.

display attributeDescription
noneDo not display
blockBlock-level elements (column display)
inlineInline Element (line display)

Whether it is a block-level element or an inline element, the previous sequence number (including the ordered and unordered point) will be ignored

Sample code:

nbsp;html>
	
		
  1. 第一句
  2. 第二句
  3. 第三句
  4. 第四句
Copy after login
  • 第一句
  • 第二句
  • 第三句
  • 第四句
  • 第一句
  • 第二句
  • 第三句
  • 第四句

Effect screenshot:
How to cancel the display style type of unordered list in css

(Learning video sharing: css video tutorial)

The above is the detailed content of How to cancel the display style type of unordered list in 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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!