繁体   English   中英

即使在 CSS 开发工具中可见,机车内容也不可见

[英]Locomotive Content not visible even when visible in CSS dev tool

使用 Locomotive Smooth scroll,Scroll 工作正常,在滚动回顶部时出现问题,即使 CSS inspect 的 opacity 为 1,标题也看不到,所以不确定为什么标题不可见。

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

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

const scroll = new LocomotiveScroll(options);

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

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

html.has-scroll-smooth {
    overflow: hidden;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;  
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM