css - 由 GitHub Pages 托管时无法看到背景图片

标签 css github twitter-bootstrap-3 background-image github-pages

我一直在尝试更正路径,以便在托管在 GitHub 上时显示我的背景图片。我可以在从 Brackets 查看我的应用程序时显示它,而不是在托管时显示。我的 CSS 绝对有效,但我似乎无法显示我的图像。我一直在查看其他线程,但似乎没有什么不同。任何帮助,将不胜感激。我的网站 repo https://github.com/Jennp1987/644_final

My CSS...
#backgroundImage {
padding-top: 3%;
padding-bottom: 97%;
background-image: url('https://jennp1987.github.io/644_final/images/pizza_bkground.png');
background-size: cover;
background-repeat: no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;

/*I've also tried this*/
/*#backgroundImage {
    padding-top: 3%;
    padding-bottom: 97%;
    background-image: url('../../../images/pizza_bkground.png'); 
    background-size: cover;
    background-repeat: no-repeat;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;


}*/
/*And this*/
/*#backgroundImage {
    padding-top: 3%;
    padding-bottom: 97%;
    background-image: url('../images/pizza_bkground.PNG'); 
    background-size: cover;
    background-repeat: no-repeat;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;


}
*/

最佳答案

在第十次尝试之后上面的代码成功了!

背景图片:url('https://jennp1987.github.io/644_final/images/pizza_bkground.png');

关于css - 由 GitHub Pages 托管时无法看到背景图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59709540/

相关文章:

javascript - 如何使用 css 控制此 js 脚本中的嵌入文本

javascript - 固定位置和 %width + 不与页脚重叠

git - 该目录似乎不是 git 存储库

javascript - Bootstrap 表 "item per page"下拉列表不工作

html - Bootstrap 全宽设计

Javascript 显示/隐藏元素

javascript - 如何使用 JavaScript/jQuery 在单击时更改特定 TD 的背景颜色?

github - 使用github Markdown 表中的空列标题?

github - 为什么在比较 ssh 版本时 github ssh 连接状态为 'no match' 但仍然有效?

javascript - 背景视频禁用链接