It works if I have div wrapper:
.body {
perspective: 1px;
width: 100%;
height: 100vh;
overflow-x: hidden;
overflow-y: auto;
padding: 0;
margin: 0;
position: relative;
}
https://codepen.io/anon/pen/PRzXJe
But doesn't if I apply it to the body tag:
body {
perspective: 1px;
width: 100%;
height: 100vh;
overflow-x: hidden;
overflow-y: auto;
padding: 0;
margin: 0;
position: relative;
transform-style: preserve-3d;
}
https://codepen.io/anon/pen/VXjqXM
Don't have a good understanding of this behaviour but the fix is to add
html {
overflow: hidden;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With