我必须在bootstrap下拉菜单中显示图像而不是文本(不在子菜单中)。我不知道如何实现这一目标。谁能帮助我实现这一目标?
答案 0 :(得分:0)
你喜欢这样:
例如:
<div class="dropdown">
<button id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="http://www.goodfellasmagazine.com/wp-content/uploads/2013/11/Most-famous-lol-face.jpg" alt="">
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
your texte here :
</ul>
</div>