当我想水平滚动块时出现问题,当我使用垫板或屏幕滚动时,我想删除一个运动,这是移动容器的垂直运动,这是由于您可以看到在此示例中以及在IPHONE X / XS / 11 PRO模式下,在此处输入链接描述
我如何删除它?
更改overflow-x:滚动到overflow-x:隐藏;
#container-mobile {
width: 100vh;
height: 100vw;
transform: rotate(-90deg) translateX(-100vh);
transform-origin: top left;
overflow-x: hidden;
margin-top: 100px !important;
/* pour ie et mozilla */
-ms-overlow-style: none;
scrollbar-width: none;
}
注意,滚动行为是旋转的,因为您可能旋转了元素。
更新
要解决有关滚动反转的问题,您应该通过以下方式替换此CSS类:
.slide {
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
font-size: 100px;
margin-top: -250px !important;
}
.blocHorizontal {
display: flex;
flex-direction: row;
width: 400vw;
}
#container-mobile {
width: 100%;
height: 100%;
overflow-y: hidden;
margin-top: 100px !important;
/* pour ie et mozilla */
-ms-overlow-style: none;
scrollbar-width: none;
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句