它是纯黑色的,就像我要添加一个不存在的属性一样。 这是相关代码
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
<div class="container-fluid">
<ul class="nav navbar-nav">
<!-- As I said, the "data-toggle" attribute is black in my code-->
<li><a class="dropdown-toggle" data-toggle="dropdown" href="#">Comanda</a></li>
<ul class="dropdown-menu">
<li><a href="magneti">Magneti de fridiger personalizati</a></li>
<li><a href="hartie">Obiecte facuted din hartie</a></li>
</ul>
<li><a href="contact">Contacteaza-ma</a></li>
</ul>
</div>
答案 0 :(得分:1)
孩子UL应该在父母LI ..
<div class="container-fluid">
<ul class="nav navbar-nav">
<li><a class="dropdown-toggle" data-toggle="dropdown" href="#">Comanda</a>
<ul class="dropdown-menu">
<li><a href="magneti">Magneti de fridiger personalizati</a></li>
<li><a href="hartie">Obiecte facuted din hartie</a></li>
</ul>
</li>
<li><a href="contact">Contacteaza-ma</a></li>
</ul>
</div>