2013年3月4日

js 盒子模型及方法

摘要: clientWidth =内容+paddingoffsetWidth =内容+padding+border//获得左 上偏移量 利用offsetParentfunction getElementLeft(ele){ var actualLeft=ele.offsetLeft; var current=ele.offsetParent; while(current!==null){ actualLeft+=current.offsetLeft; current=current.offsetParent; } return actualLeft;}function getElementTop... 阅读全文

posted @ 2013-03-04 17:01 小猕儿 阅读(453) 评论(0) 推荐(0)

导航