问题描述
我似乎无法在移动断点上将 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;
}
}
非常感谢任何帮助,在此先感谢您!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)