[英]Bootstrap - Fixed navbar doesn't do what's expected?
I created a navbar with the list: Active aka name of the site aka AnimuTuga;我用列表创建了一个导航栏:Active aka name of the site aka AnimuTuga;
Anime日本动画片
Manga漫画
Jogos乔戈斯
Opinião意见
Outros (dropdown-menu with: AMV, Cosplay, Passatempos) Outros(下拉菜单:AMV、Cosplay、Passatempos)
Sobre清醒的
Contacto联系方式
The thing is: -The "Opinião" button doesn't appear, I don't know why... -I want to put the dropdown-menu aka "Outros" with th same distance as the others on the left like Anime and Manga and put Sobre and Contacto on the right.问题是:-“Opinião”按钮没有出现,我不知道为什么...漫画并将 Sobre 和 Contacto 放在右侧。
This is for bootstrap.这是为了引导。
Here is the HTML and CSS.这是HTML和CSS。
HTML HTML
!-- Wrap all page content here -->
<div id="wrap">
<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">AnimuTuga</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li class="Anime"><a href="#Anime">Anime</a></li>
<li class="Manga"><a href="#manga">Manga</a></li>
<li class="Jogos"><a href="#Jogos">Jogos</a></li>
<li class="Opinião"><a href="#Opinião"></a></li>
<li class="Outros">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Outros <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">AMV</a></li>
<li><a href="#">Cosplay</a></li>
<li><a href="#">Passatempos</a></li>
</ul>
</li><li><a href="#about">Sobre</a></li>
<li><a href="#contact">Contacto</a></li>
</ul>
</div>
</div>
<!-- Begin page content -->
<div class="container">
<div class="page-header">
<h1>Sticky footer with fixed navbar</h1>
</div>
<p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added within <code>#wrap</code> with <code>padding-top: 60px;</code> on the <code>.container</code>.</p>
<p>Back to <a href="../sticky-footer">the default sticky footer</a> minus the navbar.</p>
</div>
</div>
<div id="footer">
<div class="container">
<p class="text-muted credit">Example courtesy <a href="http://martinbean.co.uk">Martin Bean</a> and <a href="http://ryanfait.com/sticky-footer/">Ryan Fait</a>.</p>
</div>
</div>
</div>
<div id="push"></div>
CSS CSS
/* Sticky footer styles
-------------------------------------------------- */
html,
body {
height: 100%;
/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto !important;
height: 100%;
/* Negative indent footer by its height */
margin: 0 auto -60px;
/* Pad bottom by footer height */
padding: 0 0 60px;
}
/* Set the fixed height of the footer here */
#footer {
height: 60px;
background-color: #f5f5f5;
}
/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
#wrap > .container {
padding: 60px 15px 0;
}
.container .credit {
margin: 20px 0;
}
#footer > .container {
padding-left: 15px;
padding-right: 15px;
}
Try improve your code:尝试改进您的代码:
<li class="Opinião"><a href="#Opinião"></a></li>
to:至:
<li class="Opiniao"><a href="#Opiniao">Opinião</a></li>
Explanation , why name of your class has to be changed. 解释,为什么必须更改您的班级名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.