0

使用 Locomotive Smooth 滚动,滚动工作正常,当滚动回顶部时出现问题,即使 CSS 检查不透明度为 1,标题也不会可见,所以不确定为什么标题不可见。

另一个奇怪的行为,如果我在开发控制台上取消勾选并勾选任何 CSS,或者如果我从关键字中选择全部,那么标题就会可见,如果我调整浏览器的大小,那么标题就会可见。

let options = { el: document.querySelector('[data-scroll-container]'), smooth: true, getSpeed: true, getDirection: true, reloadOnContextChange: true }

const scroll = new LocomotiveScroll(options);

标题有数据滚动数据滚动部分

4

1 回答 1

0

这是在chrome更新后发生的,只需在css中添加这一行就可以了

html.has-scroll-smooth {
    overflow: hidden;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;  
}
于 2021-11-17T09:28:01.240 回答