首頁 > web前端 > css教學 > 主體

CSS 最大高度屬性

PHPz
發布: 2023-08-29 17:09:02
轉載
1322 人瀏覽過

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 最大高度屬性的詳細內容。更多資訊請關注PHP中文網其他相關文章!

來源:tutorialspoint.com
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!