We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
设置首页banner后,第二次刷新页面,由于图片已经被缓存,图片先于initCustomScrollbar加载出来了,所以会出现一下原生滚动条然后被OverlayScrollbars的样式覆盖。
目前我的解决办法是给banner加上出现过渡动画,暂时解决了
The text was updated successfully, but these errors were encountered:
@saicaca 按照楼主的方法,给 Banner 加上过渡动画确实能解决这个问题,即修改这行代码
fuwari/src/layouts/Layout.astro
Line 132 in f0754ca
在样式中添加 onload-animation,修改如下:
onload-animation
<GlobalStyles> {siteConfig.banner.enable && <div id="banner-wrapper" class="absolute -top-[30vh] w-full transition duration-700 overflow-hidden"> - <ImageWrapper id="banner" alt="Banner image of the blog" class:list={["object-cover h-full transition duration-700"]} + <ImageWrapper id="banner" alt="Banner image of the blog" class:list={["object-cover h-full transition duration-700 onload-animation"]} src={siteConfig.banner.src} position={siteConfig.banner.position} > </ImageWrapper> </div>} <slot /> </GlobalStyles>
请问一直没修复这个问题,是还有别的考量吗?如果不修复这个问题,只要在启用 Banner 时对任何页面进行刷新,页面都会出现闪烁的情况。
貌似和这个是同一个问题 #138
Sorry, something went wrong.
fix: fix the flickering caused by custom scrollbar initialization (#60)
8565724
没有,只是没想起来修这个。官方文档给的解决方法是给 html 和 body 元素加上 data-overlayscrollbars-initialize 属性, 8565724 已修复。
html
body
data-overlayscrollbars-initialize
给 banner 加动画看起来确实也能解决这个问题和 #138 ,但我还没搞明白为什么
No branches or pull requests
设置首页banner后,第二次刷新页面,由于图片已经被缓存,图片先于initCustomScrollbar加载出来了,所以会出现一下原生滚动条然后被OverlayScrollbars的样式覆盖。
目前我的解决办法是给banner加上出现过渡动画,暂时解决了
The text was updated successfully, but these errors were encountered: