我需要在巨型引导模板中创建背景图像,但未显示该图像。我在CSS中编写的代码是:
的HTML:
<div class="jumbotron">
<div class="container">
<p>The RobFran Restaurant opened its doors in May 2010. During this short time, this restaurant has built an
excellent reputation for its food, services and location...</p>
<p><a class="btn btn-primary btn-lg" href="about.php" role="button">Read more »</a></p>
</div>
</div>
CSS:
.jumbotron {
background-image: url("view.jpg");
}
请问我做错了什么?
谢谢!
最佳答案
检查以确保您指向文件(view.jpg)的路径正确。
将样式表更改为
.jumbotron{
background: url('view.jpg');
}
关于html - 在Jumbotron中创建背景图像,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/30494370/