[英]Align div in the same offset top than another
因为在评论中你说你想在div2
插入DOM之后放置它,你可以尝试以下方法:
$('#div2').css('top', $('#div1').offset().top - $('#div2').offset().top)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.