开发者

values of the corners of the div

开发者 https://www.devze.com 2023-01-02 21:03 出处:网络
finding the four values of the corners 开发者_开发技巧of the div arearelative to the document:

finding the four values of the corners 开发者_开发技巧of the div area


relative to the document:

var offset = $('#div').offset();
var x1 = offset.left;
var y1 = offset.top;
var x2 = x1 + $('#div').width();
var y2 = y2 + $('#div').height();
0

精彩评论

暂无评论...
验证码 换一张
取 消