margin-bottom(css中margin-bottom是什么意思)

发布时间:2025-12-11 02:31:05 浏览次数:2

  margin-bottom属性的语法如下:

  margin-bottom:value

  value可能的值:

  auto:浏览器计算下外边距。

  length:规定以具体单位计的下外边距值,比如像素、厘米等。默认值是0px。

  %:规定基于父元素的宽度的百分比的下外边距。

  inherit:规定应该从父元素继承下外边距。

  我们来看一下margin-bottom的代码示例

  <html>

  <head>

  <styletype="text/css">

  p.bottommargin{margin-bottom:2cm}

  </style>

  </head>

  <body>

  <p>这个段落没有指定外边距。</p>

  <pclass="bottommargin">这个段落带有指定的下外边距。</p>

  <p>这个段落没有指定外边距。</p>

  </body>

  </html>

margin-bottom
需要做网站?需要网络推广?欢迎咨询客户经理 13272073477