<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## **垂直外邊距的重疊(折疊)** 相鄰的垂直方向外邊距會發生重疊現象 **兄弟元素** * 1、兄弟元索間的相鄰垂直外邊距會取兩者之間的較大值(兩者都是正值) ``` <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8"> <title>site title</title> <style type="text/css"> .box1{ width: 200px; height: 200px; background-color: #bfa; margin-bottom: 20px; } .box2{ width: 200px; height: 200px; background-color: #fba; margin-top:100px; } </style> </head> <body> <div class="box1"></div> <div class="box2"></div> </body> </html> ``` ![](https://img.kancloud.cn/29/67/29675b1360f72fbaff05d0e1207c665a_989x401.png) * 2、兄弟元索間的相鄰垂直外邊距的值為一正一負則取兩者的和(極不推薦這樣做) ``` <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8"> <title>site title</title> <style type="text/css"> .box1{ width: 200px; height: 200px; background-color: #bfa; margin-bottom: -100px; } .box2{ width: 200px; height: 200px; background-color: #fba; margin-top:200px; } </style> </head> <body> <div class="box1"></div> <div class="box2"></div> </body> </html> ``` ![](https://img.kancloud.cn/29/67/29675b1360f72fbaff05d0e1207c665a_989x401.png) * 3、兄弟元索間的相鄰垂直外邊距的值為都為負則取兩者絕對值的最大值(不推薦這樣做) ``` <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8"> <title>site title</title> <style type="text/css"> .box1{ width: 200px; height: 200px; background-color: #bfa; margin-bottom: -100px; } .box2{ width: 200px; height: 200px; background-color: #fba; margin-top:-200px; } </style> </head> <body> <div class="box1"></div> <div class="box2"></div> </body> </html> ``` ![](https://img.kancloud.cn/6c/8f/6c8fe2b88f1d0d02167148479409b0e2_336x255.png) >[danger] 一般兄弟元素之間的外邊距重合是對開發有利的,可以不用管 **父子元索** 父子元素間相鄰外邊距,子元素的會傳遞給父元素(上外邊距) 父子外邊矩的折疊會影響到頁面的布局,必須要進行處理 解決辦法參考【高度塌陷和外邊距重疊最終解決方案】章節
                  <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>

                              哎呀哎呀视频在线观看