下载了Bootstrap模板并尝试将默认图像更改为我自己的图像

时间:2018-08-27 14:04:15

标签: css bootstrap-4

Bootstrap模板标头中的图像位于下载的Bootstrap文件的CSS中,但是,当我将图像url更改为所需的图片并保存时,它不会更改页面上的图像并保持旧的被删除的,奇怪的是,当我在Chromes Dev Tools的CSS文件中添加URL时,预览功能完全可以实现我想要的功能,但是当我在C9工作区中的实际代码中功能完全相同时,它什么也没做和Bootstrap似乎总是找到旧的默认映像,即使我已经尽力将其从工作区中完全删除了?如果有人指出我要去哪里,我将非常感激。

Bootstrap CSS

header.masthead{position:relative;background-color:#343a40;background:url(../img/bg-masthead.jpg) no-repeat center center;}

我正在尝试将其更改为

header.masthead{position:relative;background-color:#343a40;background:url(http://www.4usky.com/data/out/94/164852092-the-riddler-wallpapers.jpg) no-repeat center center;}

2 个答案:

答案 0 :(得分:0)

似乎4usky.com不允许热链接。您需要保存它并从其他位置加载它,并在您的后台URL中引用它。

答案 1 :(得分:0)

只需将网址路径放在引号内即可。

 header.masthead{position:relative;background-color:#343a40;background:url('http://www.4usky.com/data/out/94/164852092-the-riddler-wallpapers.jpg') no-repeat center center;}

希望它能完成这项工作。