如何链接到Github上我图像文件夹中的图像?
问题描述:
我已经试过这^ HTML以及../images/IMG_6341.jpg但没有任何图像都显示在我的github上的网页。 CSS,Javascript和HTML加载完美,而不是链接的图像。它工作时,他们不在图像文件夹和src是一个简单的'IMG-6341.jpg'。
答
- 您在
background
上找不到url()
属性值。 - 应该
background: url(/images/IMG_6341.jpg);
段:
body {
background: url(https://placehold.it/500x500) no-repeat center center;
}