-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The utilities "front" and "back" dont seem to work #50
Comments
Hi donaldhubduck, thank you for the feedback! The reason the Z-axis transforms (front/back) are not working is that you need to provide a perspective either to a parent element of the transformed elements or to the transform itself: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Transforms/Using_CSS_transforms#perspective The most natural 3D effect can be achieved by adding the perspective to the parent element so that all transforms are happening in the same perspective space. We need to document this better since we don't write about it in the Here is the jsFiddle with perspective added: |
Ah! I see! I loved the effect so I am happy that it works and that it was me who didn't add the appropriate css classes!
Yeah, because in the example here https://animxyz.com/#sandbox called "drop out" doesn't have the perspective class but still the "back-5" effect works even though it shouldn't because neither the child or parent element has the perspective class to them. I'm happy it works as intended! Now I can use this awesome effect in my projects! :D |
I can try it out on your site how the utilities "front" and "back" should work. But I cant get them to work. Here you can try it out: https://jsfiddle.net/sphcrfu3/
I have tried both the latest NPM package and the CDN. Both gets me the same results where it ignores the "back" and "front" utility.
When I write the following html it only seems to fade and not "zoom". It does not behave as the same html does on your playground on your site.
Thanks!
The text was updated successfully, but these errors were encountered: