标签:ott otto height get nbsp bsp cli top 用法
getBoundingClientRect()表示元素相对于视窗的集合,left、right、top、bottom(元素的位置)等属性
也可以得到元素的width和height
如: objRect = obj.getBoundingClientRect();
left = objRect.left;
right = objRect.right;
top = objRect.top;
bottom = objRect.bottom;
width = right - left;
height= bottom - top;
标签:ott otto height get nbsp bsp cli top 用法
原文地址:http://www.cnblogs.com/huanbaby/p/7525734.html