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

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                offsetParent --獲取定位的父元素 offsetLeft //返回元素的相對定位父元素水平偏移位置 offsetTop //返回元素相對定位的父元素垂直偏移的位置 offsetWidth// 只讀 offsetHeigth //只讀 ~~~ <style> #parent { position: relative; width: 300px; height: 300px; background: red; } #child { border: 10px solid #333; padding: 20px; top: 50px; margin-top: 50px; left: 100px; margin-left: 100px; position: absolute; width: 100px; height: 100px; background: yellow; } </style> </head> <body> <div id="parent"> <div id="child"> </div> </div> <!-- offsetParent --獲取定位的父元素 offsetLeft //返回元素的相對定位父元素水平偏移位置 offsetTop //返回元素相對定位的父元素垂直偏移的位置 offsetWidth// 只讀 offsetHeigth //只讀 --> <script> var child = document.getElementById("child"); var parent = child.offsetParent; var offsetLeft = child.offsetLeft; var offsetTop = child.offsetTop; var offsetWidth = child.offsetWidth; console.log(parent); console.log(offsetLeft) //200 left+ margin-left不包括邊框和padding console.log(offsetTop);//100 console.log(offsetWidth);//160 left padding border child.offsetWidth = 300; child.offsetTop = 400; </script> </body> ~~~
                  <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>

                              哎呀哎呀视频在线观看