可能是一個愚蠢的問題,但我試圖修復我的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