Home  >  Article  >  Web Front-end  >  How to set paragraph borders in css

How to set paragraph borders in css

青灯夜游
青灯夜游Original
2022-01-20 17:40:512589browse

How to set the paragraph border in css: 1. Set the border attribute to the p element to add four top, bottom, left and right borders to the paragraph at the same time; 2. Set border-top, border-bottom, border-left, The border-right property is used to add top, bottom, left and right borders to the paragraph respectively.

How to set paragraph borders in css

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

css setting paragraph border

1. Use the border attribute



	
		
	

测试元素

How to set paragraph borders in css

2. Use the border-top, border-bottom, border-left, and border-right attributes respectively.

  • border-top abbreviation attribute, use To set all the properties of the top border into one statement.

  • border-bottom shorthand attribute, used to set all attributes of the bottom border into one statement.

  • border-left shorthand property, used to set all properties of the left border into one statement.

  • border-right shorthand property, used to set all properties of the right border into one statement.



	
		
	

测试元素

How to set paragraph borders in css

(Learning video sharing: css video tutorial

The above is the detailed content of How to set paragraph borders in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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 admin@php.cn