I am trying to create a “mouse” effect that moves the top layer to the left and opens the bottom layer with CSS3. The code works in Chrome, but not in Firefox ... did I do something stupid again? Thank you for your help!
Edit: I must have done something wrong, because even if I do not leave the transition code, nothing happens when I put layers in Firefox ... :(
Code:
<html> <div class="layers"> <div class="over">content</div> <div class="under">content</div> </div> </html>
Style:
.layers { position: relative; width: 200px; height: 50px; overflow: hidden; } .over { width: 200px; height: 50px; position: absolute; top: 0px; left: 0px; z-index: 1; -webkit-transition: all 1s ease-in-out; -moz-transition: all 1s ease-in-out; transition: all 1s ease-in-out; } .under { width: 200px; height: 50px; position: absolute; top: 0px; left: 0px; } .layers:hover .over { left: -200px; }
source share