我遇到問題。Navbar重疊旋轉木馬
我在我的網站上做了一個改動,我想在我的網站上加入一個全角旋轉木馬。而不是一個jumbotron。 問題是我的導航欄重疊了jumbotron區域,標題和所有內容。
這裏是我的html:
<div class="nav-area">
<div class="container"> <!-- Start Container -->
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">
<img alt="dentalclean logo" src="images/logo_2x.png">
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav pull-right">
<li class="active"><a href="index.html">Pagina Inicial <span class="sr-only">(current)</span></a></li>
<!-- <li><a href="#">Contactos</a></li> -->
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
</div> <!-- End Container -->
</div>
<span itemscope itemtype="http://schema.org/LocalBusiness">
<div class="hero-section"> <!-- Start Hero Section -->
<div id="slider_dentalclean" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#slider_dentalclean" data-slide-to="0" class="active"></li>
<li data-target="#slider_dentalclean" data-slide-to="1" class=""></li>
<li data-target="#slider_dentalclean" data-slide-to="2" class=""></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img alt="Dentista Leiria" src="images/hero-img.png">
<div class="container">
<div class="carousel-caption">
<h1>Example headline.</h1>
<p>LOOOOOOOOOOOOOOOOOOOL</p>
<p><a class="btn btn-lg btn-primary" href="#" role="button">Sign up today</a></p>
</div>
</div>
</div>
<div class="item">
<img alt="Second slide" src="images/hero-img.png">
<div class="container">
<div class="carousel-caption">
<h1>Another example headline.</h1>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
<p><a class="btn btn-lg btn-primary" href="#" role="button">Learn more</a></p>
</div>
</div>
</div>
<div class="item">
<img alt="Third slide" src="images/hero-img.png">
<div class="container">
<div class="carousel-caption">
<h1>One more for good measure.</h1>
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
<p><a class="btn btn-lg btn-primary" href="#" role="button">Browse gallery</a></p>
</div>
</div>
</div>
</div>
</div>
我爲缺乏組織的道歉。
我正在使用sass和bootstrap的方式。
這裏是隨之而來的問題:https://www.dropbox.com/s/bigm6291gmwgcf6/Screenshot%202015-04-06%2018.46.43.png?dl=0
非常感謝你,我搜索了這裏所有的答案,但我無法找到一個工作。
小提琴:https://jsfiddle.net/yjbjvtx2/
CSS:
.nav-area{
position:absolute;
top: 0;
}
#slider_dentalclean{
margin-top: 0;
z-index: -1;
}
我發現我希望在我的網站上確切的事情:http://getbootstrap.com/examples/carousel/
但我不知道他們是如何做的轉盤標題不走到導航欄後面。
這確實需要在與額外的CSS小提琴。爲什麼你在主div上有一個-73px的邊距?它看起來像它將被固定,如果你將其設置爲0或某些積極的東西。 – austinthedeveloper
現在會提琴。 –