上边距指定元素的上边距。它的长度值可以是%或auto。
您可以尝试运行以下代码来设置上边距
<html> <head> </head> <body> <p style = "margin-top: 10px; border:2px solid red;"> This is a paragraph with a specified top margin </p> <p style = "margin-top: 10%; border:2px solid green;"> This is another paragraph with a specified top margin in percent </p> </body> </html>