gpt4 book ai didi

css - GH 页面看不到我的图像的路径

转载 作者:太空宇宙 更新时间:2023-11-04 02:29:35 26 4
gpt4 key购买 nike

GET http://kbazl3.github.io/style/icons/wind.png 404 (Not Found)
night.png:1
GET http://kbazl3.github.io/style/icons/night.png 404 (Not Found)
/style/icons/cloudy.png:1
GET http://kbazl3.github.io/style/icons/cloudy.png 404 (Not Found)
rain.png:1
GET http://kbazl3.github.io/style/icons/rain.png 404 (Not Found)
alert.png:1
GET http://kbazl3.github.io/style/icons/alert.png 404 (Not Found)

我在此处找到的 gh-pages 上收到这些错误:http://kbazl3.github.io/RainCheck/#/它在我的本地实时服务器上工作得很好

这是我的源代码的链接:https://github.com/kbazl3/RainCheck/tree/gh-pages

我已经查找了许多其他 SO 问题,其中其他人也有同样的问题,并且总是归结为区分大小写。我已经四次和五次检查了我的文件路径中的大小写敏感度,它们都是相同的。我找不到任何差异。任何帮助将不胜感激。我的文件路径在我的 weatherService 中找到:

//SET CURRENT WEATHER ICONS AND ROUTES
if (cityObj.icon === "clear-day") {
cityObj.icon = "clear";
cityObj.img = "/style/icons/clear.png";
} else if (cityObj.icon === "partly-cloudy-day") {
cityObj.icon = "clear";
cityObj.img = "/style/icons/cloudy.png";
} else if (cityObj.icon === "rain" || cityObj.icon === "sleet" || cityObj.icon === "hail" || cityObj.icon === "thunderstorm" || cityObj.icon === "tornado") {
cityObj.icon = "rainy";
cityObj.img = "/style/icons/rain.png";
} else if (cityObj.icon === "cloudy") {
cityObj.icon = "cloudy";
cityObj.img = "/style/icons/cloudy.png";
} else if (cityObj.icon === "snow") {
cityObj.icon = "snowy";
cityObj.img = "/style/icons/snow.png";
} else if (cityObj.icon === "clear-night" || cityObj.icon === "partly-cloudy-night") {
cityObj.icon = "clearNight";
cityObj.img = "/style/icons/night.png";
} else if (cityObj.icon === "wind") {
cityObj.icon = "windy";
cityObj.img = "/style/icons/wind.png";
} else if (cityObj.icon === "fog") {
cityObj.icon = "cloudy";
cityObj.img = "/style/icons/fog.png";
}

最佳答案

看来你需要RainCheck在路径中,像这样:http://kbazl3.github.io/RainCheck/style/icons/wind.png .

因为你的主页是http://kbazl3.github.io/RainCheck ,相对路径也可以:style/icons/wind.png .

关于css - GH 页面看不到我的图像的路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36732678/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com