可能是一个愚蠢的问题,但我试图修复我的Jumbotron标题与bgimage ..它做过的工作之前,但图像被压扁时调整..找到一个解决方法,但现在它挺犯规了显示:Jumbotron BG图像可调整大小,不会显示
<div class="container">
<div class="row">
<div class="col-md-12 jumbotron" id="jumbotronBG">
<div class="text-center">
<h1>BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA BLA</h1>
<a href="#services" class="btn btn-md btn-danger">SERVICES</a>
<a href="#companies" class="btn btn-md btn-success">COMPANIES</a>
</div>
</div>
</div>
.jumbotronBG {
background: url('../img/bg.jpg') no-repeat center center !important;
position: fixed !important;
width: 100% !important;
height: 350px !important; /*same height as jumbotron */
top:0 !important;
left:0 !important;
z-index: -1 !important;
}
.jumbotron {
margin-bottom: 40px !important;
height: 350px !important;
color: white !important;
text-shadow: black 0.1em 0.3em 0.3em !important;
background:transparent !important;
}
非常感谢您的帮助:-) – HendrikEng
在您的CSS中将'.jumbotronBG'改为'#jumbotronBG',看看会发生什么。 – wmeade
刚刚意识到误入歧途,并尝试它,但不幸它让一切可怕,仍然没有BG形象..我想我有它之前没有线索我摧毁..感谢:-) – HendrikEng