Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
198 views
in Technique[技术] by (71.8m points)

关于JQ position问题。

clipboard.png

图是服务器机柜可以自由挪动,我用了Jq-ui,他们都有了position relative属性,我想准确记录他们的位置发到服务器,下次登录就可以看到移动过的位置,但是用position().top记录的不准确,怎么才能记准确呢


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

查了下文档,以前也没注意过。

获取匹配元素相对父元素的偏移

用css('top')取吧


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...