動態加載腳本和樣式(轉)

一.元素位置javascript 此次補充一個 DOM 的方法:getBoundingClientRect()。這個方法返回一個矩形對象,包含四個屬性:left、top、right和 bottom。分別表示元素各邊與頁面上邊和左邊的距離。css var box = document.getElementById('box');//獲取元素 alert(box.getBoundingClientRe
相關文章
相關標籤/搜索