1.margin-top 属性设置元素的上外边距。

  注意:允许使用负值。

 

2.html 文件

<html>
<head>
<style type="text/css">
p.topmargin {margin-top: 5cm}
</style>
</head>

<body>
<p>这个段落没有指定外边距。</p>
<p class="topmargin">这个段落带有指定的上外边距。</p>
</body>
</html>

 

3.效果图

CSS margin-top 属性

 

 

 

 

相关文章:

  • 2022-01-12
  • 2021-04-27
  • 2021-06-08
  • 2022-02-03
  • 2021-11-23
  • 2021-07-28
  • 2021-07-06
  • 2021-10-06
猜你喜欢
  • 2021-09-26
  • 2022-02-23
  • 2021-11-19
  • 2021-09-15
  • 2021-07-27
  • 2021-11-03
相关资源
相似解决方案