![](/img/trans.png)
[英]Bootstrap Jumbotron Background image Opacity and width and height?
[英]Bootstrap Jumbotron Background Image Height issue
我正在嘗試將圖像(1920x800px)顯示為超大屏幕中的背景。
HTML:
<div class="jumbotron bg">
<div class="container">
</div>
</div>
CSS:
.bg {
background: url('../images/ac-unity.jpg');
background-size: cover;
}
.jumbotron {
padding: 30px 15px;
margin-bottom: 30px;
color: inherit;
}
.container {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
正如所看到的在這里 (托管我的學校的服務器上),圖像的高度不完全顯示,因為容器的內容。 通過為.bg分配高度,我得到了完整的圖像,但是圖像不再響應。 我如何確保巨型機將顯示圖像的整個高度,但仍能對移動設備做出響應?
問候
嘗試將巨無霸放入行和容器中:
<div class="row">
<div class="container">
<div class="jumbotron bg">
</div>
</div>
</div>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.