1
I would like to know how to detect, in a simple way and return the information I need, if one element is under the other.
I’ve tried for the offset
, but it was very difficult and did not result in almost anything,...
For example:
p{background:red}
.teste{margin-left: -20px}
button{position: relative; top:-35px}
<p>Elemento 0</p>
<button>Elemento 1</button><button class="teste">Elemento 2</button>
Note that "element 2" is over "element 1", and both are over "element 0".
I wanted a role in which I send the element 2 and she returns the elements 1 and 0, that is, elements that are graphically below element 1.
If you can revise your question, you are confused in this passage: "I wanted a function where I send element 2 and it returns elements 1 and 0,..." .. you want to send element 2 to where?
– Sam