<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # CSS max-width 屬性 ## 實例 設置段落的最大寬度: ``` p { max-width:100px; } ``` ## 瀏覽器支持 | IE | Firefox | Chrome | Safari | Opera | | --- | --- | --- | --- | --- | 所有主流瀏覽器都支持 max-width 屬性。 注釋:任何版本的 Internet Explorer (包括 IE8)都不支持屬性值 "inherit"。 ## 定義和用法 max-width 定義元素的最大寬度。 ### 說明 該屬性值會對元素的寬度設置一個最高限制。因此,元素可以比指定值窄,但不能比其寬。不允許指定負值。 | 默認值: | none | | --- | --- | | 繼承性: | no | | --- | --- | | 版本: | CSS2 | | --- | --- | | JavaScript 語法: | _object_.style.maxWidth="50px" | | --- | --- | ## 可能的值 | 值 | 描述 | | --- | --- | | none | 默認。定義對元素的最大寬度沒有限制。 | | _length_ | 定義元素的最大寬度值。 | | _%_ | 定義基于包含它的塊級對象的百分比最大寬度。 | | inherit | 規定應該從父元素繼承 max-width 屬性的值。 | ## TIY 實例 [使用像素值來設置元素的最大寬度](/tiy/t.asp?f=csse_dim_max-width) 本例演示如何使用像素值來設置元素的最大高度。 ``` <html> <head> <style type="text/css"> p { max-width: 300px } </style> </head> <body> <p>這是一些文本。這是一些文本。這是一些文本。 這是一些文本。這是一些文本。這是一些文本。 這是一些文本。這是一些文本。這是一些文本。 這是一些文本。這是一些文本。這是一些文本。 這是一些文本。這是一些文本。這是一些文本。</p> </body> </html> ``` [使用百分比來設置元素的最大寬度](/tiy/t.asp?f=csse_dim_max-width_percent) 本例演示如何使用百分比值來設置元素的最大高度。 ``` <html> <head> <style type="text/css"> p { max-width: 50% } </style> </head> <body> <p>這是一些文本。這是一些文本。這是一些文本。 這是一些文本。這是一些文本。這是一些文本。 這是一些文本。這是一些文本。這是一些文本。 這是一些文本。這是一些文本。這是一些文本。 這是一些文本。這是一些文本。這是一些文本。</p> </body> </html> ``` ## 相關頁面 CSS 教程:[CSS 尺寸](/css/css_dimension.asp "CSS 尺寸 (Dimension)") CSS 參考手冊:[CSS min-width 屬性](/cssref/pr_dim_min-width.asp "CSS min-width 屬性") HTML DOM 參考手冊:[maxWidth 屬性](/jsref/prop_style_maxwidth.asp "HTML DOM maxWidth 屬性")
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看