0

demo I want to translate the first div, when hovered.

But the tag span covered by the second div. I do not know why.

enter image description here

haxxxton
  • 6,422
  • 3
  • 27
  • 57
Zhis
  • 33
  • 4

1 Answers1

1

Two things are contributing to your problem:

z-index is not a px based number, MDN docs.

Update your z-index to z-index:-90; from z-index:-90px;

id's cannot start with a number, see this answer for more details.

Update your div to id="div2" from id="2div"

Updated Codepen

Community
  • 1
  • 1
haxxxton
  • 6,422
  • 3
  • 27
  • 57