CSS 最大高度属性

原创
ithorizon 5个月前 (10-19) 阅读数 46 #CSS

max-height 属性用于设置框的最大高度。 max-height 属性的值可以是数字、长度或百分比。

示例

<html>
   <head>
   </head>
   <body>
      <p style = "width:400px; max-height:10px; border:2px solid green; padding:10px; margin:15px;">
         This paragraph is 400px wide and max height is 10px
         This paragraph is 400px wide and max height is 10px
         This paragraph is 400px wide and max height is 10px
         This paragraph is 400px wide and max height is 10px
      </p>
      <br>
      <br>
      <br>
      <img alt = "logo" src="/css/images/logo.png" width = "210" height = "100" />
   </body>
</html>

以上就是CSS 最大高度属性的详细内容,更多请关注IT视界其它相关文章!



热门