我似乎无法设置scroll-snap-type
为none
移动断点。理想情况下,我想在移动设备上删除 css scroll snap,因为当在移动设备上滚动浏览我的应用程序时,它让许多用户感到困惑,并且有时可能会出现问题。CSS 滚动捕捉效果很好,但我似乎无法将其设置none
为移动设备。
有什么想法或建议吗?
这是我的 CSS Scroll Snap 代码:
section {
display: flex;
scroll-snap-align: start;
height: 100vh;
width: 100vw;
justify-content: center;
align-items: center;
}
.container {
width: 100vw;
height: 100vh;
scroll-snap-type: y mandatory;
overflow-y: scroll;
scrollbar-width: none;
-ms-overflow-style: none; /* IE and Edge */
}
/* Mobile breakpoint */
@media (max-width: 375px) {
.description {
width: 90%;
}
/* Parent set to none */
.container {
scroll-snap-type: none;
}
/* Child set to none */
section {
scroll-snap-align: none;
}
}
任何帮助都非常感谢,在此先感谢您!