<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<!-- MÅ FIKSES, HAMBURGERMENY -->
<button type="button" class="navbar-toggle" 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> <!-- Må FIKSES -->
<a class="navbar-brand top-20 bottom-20 brand-border" href="index.html"><img src="images/afk-logo.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">
<li class="top-10 left-25">
<h3 class="fat3 hidden-sm hidden-xs hidden-md">Vurdering for læring</h3>
</li>
<li>
<a class="top-20 bottom-20 left-50" href="artikkelmal.html">For lærere og skoleledere</a>
</li>
<li>
<a class="top-20 bottom-20" href="#">For elever og foresatte</a>
</li>
<li>
<a class="top-20 bottom-20" href="#">Om rammeverk for vurdering</a>
</li>
<li>
<a class="top-5 hidden-sm hidden-xs hidden-md" href="#"><span class="glyphicon glyphicon-search roundy-glyphicon" aria-hidden="true"></span></a>
</li>
</ul>
</div>
</nav>
问题是手机屏幕中的汉堡菜单不起作用。它所做的只是单击它处于活动状态,然后不会显示任何链接。例如,我可以在<li>
中使用不同的类吗?还是这会阻止它工作?
是的,可以在 li 标签中的嵌套元素上设置类。您是否尝试过以下方法:
<span class="top-20 bottom-20"><a href="#">For elever og foresatte</a></span>