
max-height屬性用來設定一個盒子的最大高度。 max-height屬性的值可以是一個數字、一個長度或一個百分比。
範例
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <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 設定方塊的最大高度的詳細內容。更多資訊請關注PHP中文網其他相關文章!