如果我有div包装器,它可以工作:
.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
但如果我将它应用于body标签,则不会:
body {
perspective: 1px;
width: 100%;
height: 100vh;
overflow-x: hidden;
overflow-y: auto;
padding: 0;
margin: 0;
position: relative;
transform-style: preserve-3d;
}
答案 0 :(得分:0)
没有很好地理解这种行为,但修复是添加
html {
overflow: hidden;
}