我有一个单页移动 Bootstrap 站点,滚动时,固定导航栏会在点击导航菜单中的链接时覆盖部分标题。我发现这是由 CSS 滚动捕捉点引起的。我尝试为所有部分的 .section
类设置 scroll-snap-type: none;
但它仍然会产生错误。如何正确禁用整个页面的 CSS 滚动捕捉点?
最佳答案
也许它会有所帮助。试试下面
* Keyword values */
scroll-snap-type: none;
scroll-snap-type: mandatory;
scroll-snap-type: proximity;
/* Global values */
scroll-snap-type: inherit;
scroll-snap-type: initial;
scroll-snap-type: unset;
同Y跟随。(scroll-snap-type-y)
/* Keyword values */
scroll-snap-type-x: none;
scroll-snap-type-x: mandatory;
scroll-snap-type-x: proximity;
/* Global values */
scroll-snap-type-x: inherit;
scroll-snap-type-x: initial;
scroll-snap-type-x: unset;
关于css - 有什么方法可以禁用 CSS 滚动捕捉点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48072179/