简体   繁体   English

从 GitHub Pages 发布的图像显示不正确

[英]Images published from GitHub Pages not displaying correctly

I am publishing some simple webpages (HTML, CSS, some JS) from my GitHub repository .我正在从我的GitHub 存储库发布一些简单的网页(HTML、CSS、一些 JS)。 When I display index.html in Chrome (55.0.2883.95, 64 bit) by clicking on the URL linked in this repository , the webpage is displayed, but as soon as I scroll down, the featured image disappears when it shouldn't.当我通过单击此存储库中链接URL在 Chrome(55.0.2883.95,64 位)中显示index.html时,会显示该网页,但是一旦我向下滚动,特色图像就会消失,而它不应该出现。

The other working link is "Fees" at the top.另一个工作链接是顶部的“费用”。 Click on that, scroll up and down the page, and the featured image will similarly disappear.单击它,上下滚动页面,特色图像将同样消失。

I want to point out that I first published this repository/page in Nov. 2016 and the images all displayed fine.我想指出的是,我于 2016 年 11 月首次发布了此存储库/页面,并且所有图像都显示良好。 Recently I changed the domain name associated with the repo but normally wouldn't expect this to create issues.最近我更改了与 repo 关联的域名,但通常不会期望这会产生问题。 Also, when I simply zip and download the repo and open in Chrome locally, everything displays perfectly.此外,当我简单地压缩并下载 repo 并在本地 Chrome 中打开时,一切都会完美显示。

Lastly, this site works with CSS Grid so I have the appropriate flag enabled in Chrome.最后,这个网站使用 CSS Grid,所以我在 Chrome 中启用了适当的标志。 It's hard for me to understand why images suddenly don't display correctly using GitHub Pages!我很难理解为什么使用 GitHub Pages 突然无法正确显示图像!

EDIT Sorry if this question seems vague.编辑对不起,如果这个问题看起来很模糊。 Let me restate.让我重述一遍。 Everything seems to initially load and display correctly in my browser.一切似乎最初都在我的浏览器中正确加载和显示。 The issue seems to be triggered by merely scrolling down the page .该问题似乎是通过向下滚动页面触发的
This code used to display correctly on GitHub Pages.此代码用于在 GitHub Pages 上正确显示。 I come back two months later and the same code doesn't work anymore.两个月后我回来了,同样的代码不再起作用了。 Image pathnames are all correct.图像路径名都是正确的。 It's evidently not a JS issue.这显然不是JS问题。 Download the same code and it displays perfectly on localhost.下载相同的代码,它在本地主机上完美显示。

After reading this thread I realized that one of my extensions was causing the page to disappear on scrolling.阅读此线程后,我意识到我的一个扩展程序导致页面在滚动时消失。 Specifically, I disabled the Window Resizer extension and the problem was solved.具体来说,我禁用了Window Resizer扩展,问题就解决了。

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

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