【发布时间】:2017-12-29 12:50:53
【问题描述】:
没有设置 Jumbotron 背景图片。
html 文件: ...
<div class="jumbotron">
<div class="container">
<h1>Lorem ipsum</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
</div>
...
style.css:
.jumbotron {
width: 100%;
margin-top: 0px;
background-image: "https://pi-ltsp.net/images/desktop-background.png";
background-size: cover;
}
... (或)
.jumbotron {
width: 100%;
margin-top: 0px;
background-image: "../img/example.jpg";
background-size: cover;
}
文件夹结构: css/style.css 图片/ js/ .html 文件
我考虑了我的 URL 错误的可能性,但它不适用于本地以及 Internet 上的图像。 使用开发工具,我发现该图像旁边带有黄色警告符号。
我怎样才能为 jumbotron 设置背景图像。 谢谢。
【问题讨论】:
-
background-image:url(" url来了");
标签: html css image twitter-bootstrap-3