我目前正在使用bootstrap建立一個網站。Bootstrap jumbotron太短
這是我的HTML文件:
http://www.bootply.com/D5ltZOOcQE
<header class="navbar navbar-inverse navbar-static-top" role="banner">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="index.html">Santorini</a>
</div>
<nav class="collapse navbar-collapse" role="navigation">
<ul class="nav navbar-nav navbar-right">
<li><a href="committee.html">Committee</a></li>
<li><a href="events.html">Events</a></li>
<li><a href="constitution.html">Constitution</a></li>
</ul>
</nav>
</div>
</header>
<div class="jumbotron">
<div class="container">
<h1>Welcome</h1>
<p class="lead">Welcome to my website.</p>
<p class="lead"><a class="btn btn-large btn-primary" href="www.google.com">Become a member</a></p>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-sm-4" align="center">
<a href="www.google.com"><img class="contact" src="img/facebook.png" height="120" width="120"></a>
</div>
<div class="col-sm-4" align="center">
<a href="www.google.com"><img class="contact" src="img/emailIcon.png" height="120" width="120"></a>
</div>
<div class="col-sm-4" align="center">
<a href="www.google.com"><img class="contact" src="img/twitter.png" height="120" width="120"></a>
</div>
</div>
</div>
所以,我想要做的是有一個很大的超大屏幕,類似於一個在getboostrap.com網站。這意味着我希望它至少是我目前的超大號的兩倍。
在我的HTML文件的<head>
,我有一個地方,我已經爲我的jumbotron放了一個特殊規則,以便包含圖片和其他一些東西。這是代碼:
.jumbotron {
position: relative;
background: url('img/background.jpg') no-repeat center center;
overflow: hidden;
height: 100%;
width: 100%;
background-size: cover;
}
但是,當我將高度的大小更改爲500px,例如,我看不到任何更改。我認爲這是因爲我的超大容量適應了我的容器大小?所以,如果我添加更多的文本,它會增長,但現在它不會。但是,我希望整個畫面能夠顯示,而這種情況現在不會發生。
歡迎任何幫助:)
只是嘗試通過直接覆蓋'.jumbotron'類*而無需調用'!important'來增加bootply的高度,並且它工作得很好。 –