<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<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="/">TutupLapak</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="/">Home</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown">Announcement
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="/posts"> View Announcement</a></li>
<li><a href="/posts/create"> Create Post</a></li>
</ul>
</li>
<li><a href="/about">About</a></li>
<li><a href="/services">Category</a></li>
<li><a href="/posts"> View Announcement</a></li>
<li><a href="/posts/create"> Create Post</a></li>
</ul>
<!--<a href="/posts"> View Announcement </a></li>--> <!-- posts folder define on root web -->
<!--<a href="/posts/create"> Create Post</a></li>-->
</div>
</div><!--/.nav-collapse -->
</div>
</nav>
我尝试创建一个下拉列表,但该列表未显示(查看公告并创建帖子) 我在这段代码中做错了什么?我是新来的
答案 0 :(得分:0)
我测试您的代码是否正常运行,您有两个名为“创建发布并查看公告”的菜单,还有一个名为“公告”的菜单,其中有两个子菜单名为“创建发布并查看公告”,再次检查您的css和js文件。 >