我试图将video.gif显示在github页面的背景中,但是由于某种原因它仅在本地显示。已经为此进行了2多个小时的尝试,但仍然无法正常工作。
+ background-image: url("../gifs/video.gif"); - Doesn't work
+ background-image: url('../gifs/video.gif'); - Doesn't work
+ background-image: url('https://media.githubusercontent.com/media/JackTimelessPiece/Website/master/gifs/video.gif'); - Work Locally
+ background-image: url('gifs/video/gif'); - Work Locally
body {
background-image:
url('https://media.githubusercontent.com/media/JackTimelessPiece/Website/master/gifs/video.gif');
background-repeat: no-repeat;
background-size: 100% 100%;
margin: 0 0 100px; /* bottom = footer height
}
我只有url('gifs/video.gif')
和url('https://media.githubusercontent.com/media/JackTimelessPiece/Website/master/gifs/video.gif')
在本地工作,由于某种原因,它们无法在github页面上工作。
显然,我只是将背景图像代码移到了index.html上,并以某种方式修复了要加载的gif。感谢您的帮助!