为什么我的浏览器滚动时会更改背景位置?

发布于 2025-02-10 13:23:28 字数 498 浏览 0 评论 0原文

我在这里有一个github页面网站: https://steven-murray.github.io/code/code/code/ < /a>我用jekyll/ type-on-on-strap 主题。顶部横幅图像具有颜色覆盖层,以使文本更可读。但是,覆盖在向下滚动时相对于URL图像本身的位置变化,这使得非常丑陋。

我已经设置背景位置:中心,top;,您首先打开页面时可以看到。但是,滚动后,背景位置以某种方式自动更改为负偏移,这会导致怪异的撕裂。

我如何才能坐在一个地方?

I have a GitHub pages site here: https://steven-murray.github.io/code/ which I made with Jekyll / type-on-strap theme. The top banner image has a color overlay to make the text more readable. However, the overlay changes position relative to the url image itself when scrolling down, which makes a very ugly tear.

I've set background-position: center, top;, which you can see when you first open the page. However, upon scrolling, the background-position is somehow automatically changed to have a negative offset, which is causing the weird tear.

How can I get it to just sit in the one place?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文