我正在使用AngularJs和Bootstrap 3设法在悬停时进行基本的自定义:
使用这行代码:
.navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus {
background-color: #c9c9c9;
}
然而,当我将鼠标悬停在整个按钮背景灰色时,我想这样做:
在悬停时背景焦点的高度降低。
我怎样才能做到这一点?感谢
HTML
<div ng-controller="navigationController">
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation" ng-hide="isConnected">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<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>
<a class="navbar-brand" href="#/home"><img src="images/URBANE-logo-text.png" width="110" height="20"></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" ng-show="isMentee">
<li>
<a href="/home" data-toggle="collapse" data-target=".navbar-collapse">Home</a>
</li>
<a href="/login" data-toggle="collapse" data-target=".navbar-collapse">Logout</a>
</li