如何 link 到 Github 上我的图像文件夹中的图像?
How to link to images in my images folder on Github?
我试过这个 ^HTML 以及 ../images/IMG_6341.jpg 但是 none 的图像显示在我的 github 页面上。 CSS、Javascript 和 HTML 正在完美加载,只是不是链接的图像。当它们不在图像文件夹中并且 src 是一个简单的 'IMG-6341.jpg' 时,它起作用了。
- 您缺少
url()
background
属性 值。
- 应该是
background: url(/images/IMG_6341.jpg);
片段:
body {
background: url(https://placehold.it/500x500) no-repeat center center;
}
我试过这个 ^HTML 以及 ../images/IMG_6341.jpg 但是 none 的图像显示在我的 github 页面上。 CSS、Javascript 和 HTML 正在完美加载,只是不是链接的图像。当它们不在图像文件夹中并且 src 是一个简单的 'IMG-6341.jpg' 时,它起作用了。
- 您缺少
url()
background
属性 值。 - 应该是
background: url(/images/IMG_6341.jpg);
片段:
body {
background: url(https://placehold.it/500x500) no-repeat center center;
}