2014-02-06 28 views
0

我想使用bootstrap制作html导航栏,因此它看起来类似于twitter的当前导航栏,其中当前选定的标签在下面有一行,并且行出现在菜单下当你将鼠标悬停在它们上面时。我试着看过这个例子,但还没有发现如何做到这一点。 enter image description hereNavbar菜单项与下方的酒吧悬停/点击

不能确定它是否是最好使用导航丸

<ul class="nav nav-pills"> 
    <li class="active"><a href="#">Home</a></li> 
    <li><a href="#">Profile</a></li> 
    <li><a href="#">Messages</a></li> 
</ul> 

还是一个导航栏

任何帮助或指导赞赏的

+1

你到目前为止试过的东西? – Era

+0

我已经做了navbars,但我从来没有能够得到任何像twitter的导航栏,我什至不知道它会被称为 – holmeswatson

回答

1

由于这个问题是有点不清楚,我假设你没有尝试过任何东西(根据你的帖子),这是一个起点。

nav a { 
    background-color: white; 
    border-bottom: 5px solid blue; /* define a light blue border for the link */ 
} 
nav a.active { 
    border-bottom: 5px solid white; /* simulate increase in white color */ 
} 
nav a:hover { 
    border-bottom-color: green; /* change border-color to green on hover */ 
} 
nav li { 
    border-bottom: 2px solid blue; /* constant light blue border */ 
} 

为了将来的参考,请考虑显示您尝试过的代码。