This article explains in detail the use of css outer margin
h2{margin:10px 0;} p{margin:20px 0;} ......这是一个标题
这是又一个标题
本例中,第一个h2的margin-bottom(10px),p的margin-top(20px),第二个h2的margin-top(10px)将被合并,它们之间的margin间隙最后是(20px),即取三者之间最大的那个值。
margin: [
##Default value: see Each independentattribute
applies to: all elements excepttableclass elements of table | inline-table | table-caption
InheritanceSex: None
AnimationSex:Yes
Calculated value: Look at each independent attribute
Related attributes: [ margin-top ] || [margin-right] || [ margin-bottom ] || [margin-left]
Value:for calculation. In other cases, refer toheight, which can be negative
h2{margin:10px 0;} p{margin:20px 0;} ......这是一个标题
这是又一个标题
本例中,第一个h2的margin-bottom(10px),p的margin-top(20px),第二个h2的margin-top(10px)将被合并,它们之间的margin间隙最后是(20px),即取三者之间最大的那个值。
The above is the detailed content of Detailed explanation of the use of CSS external margins. For more information, please follow other related articles on the PHP Chinese website!
How to solve the problem of 400 bad request when the web page displays
What are the advantages of the Spring Boot framework?
switch statement usage
Four major characteristics of blockchain
Introduction to commonly used Windows registry commands
What skills are needed to work in the PHP industry?
Maximize web page
bitcoin price