在我的 MVC Razor 布局视图中,我试图在鼠标悬停时设置下拉列表的背景颜色:
The list looks like this:
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Partner <b class="caret"></b></a>
<ul class="dropdown-menu" style="background-color:#080808">
<li class="marv-main-li">@Html.ActionLink("Test1", "Action1", "Partner")</li>
<li class="marv-main-li">@Html.ActionLink("Test2","Action2","Partner")</li>
<li class="marv-main-li">@Html.ActionLink("Test3","Action3","Partner")</li>
<li class="marv-main-li">@Html.ActionLink("Test4","Action4","Partner")</li>
</ul>
</li>}
我试过这个没有用的css:
.dropdown .dropdown-menu .li a:hover {
background-color: #06fa12;
}
如何更改鼠标悬停事件下拉列表中文本的背景颜色?
我正在使用 Twitter bootsrtap 3