Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
html を変更できません。ネストされていない 2 つの div があり、ネストされている div2 に対して div1 を相対的に配置したいと考えています。これに対する解決策はありますか?
var top = $('#firstElement').offset().top(); var left = $('#firstElement').offset().left(); top += relativeY; left += relativeX; $('#secondElement').css({'top': top; 'left': left});