Jump to content
Search Community

Image rotation on mouse move as 3d is not working

whizzbbig test
Moderator Tag

Recommended Posts

Hi,

 

The container of the element you are rotating needs a perspective applied to it, otherwise the rotation will be applied in 2D;

https://developer.mozilla.org/en-US/docs/Web/CSS/perspective

 

https://3dtransforms.desandro.com/perspective

 

Something like this in your CSS:
 

.home__contact__bean__container {
  position: absolute;
  width: 100%;
  height: 100%;
  right: 0;
  top: 0;
  perspective: 250px;
  overflow: hidden;
}

Play with the value and see what works better for your taste. That value looks good IMHO.

 

Hopefully this helps.

Happy Tweening!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...