11
С jQuery, как узнать, если div one
находится над div two
? Нет, какой z-индекс выше, но какой div визуально над другим div.Если элемент над другим элементом?
<style type='text/css'>
#one {
position:absolute; top:0; left:0; width:100px; height:100px; background-color:red; z-index:2;
}
#two {
position:absolute; top:0; left:0; width:100px; height:100px; background-color:green; z-index:1;
}
</style>
<div id='one'></div>
<div id='two'></div>
Это может быть дубликат: http://stackoverflow.com/questions/8628368/how-do-i-implement-collision-detection-between-a-set-of-div-elements –