我有以下菜单,<a>
's 不可点击,我相信这是一个 z-index 问题,但无法修复它。html 也有意义,尝试在右侧制作一个带有连接矩形的圆圈。然后当它下降时,它将完全连接并填充。我使用的是引导程序 2.3.2。
html
<div class="row-fluid">
<div class="span2"></div>
<div class="span7 center"></div>
<div class="span3">
<div class="rightMenu visible-desktop">
<div class="scoreBadge">--</div>
<div class="userBadge"> <a href="/home">username ▼</a>
</div>
<ul>
<li> <a href="/settings">settings</a>
</li>
<li> <a href="/logout" class="grey">log out</a>
</li>
</ul>
</div>
</div>
</div>
css
.rightMenu{
position: absolute;
right: 0;
top: 8px;
margin-top: 10px;
min-width: 65px;
}
.rightMenu ul {
display: none;
list-style: none;
text-align: left;
position: relative;
left: -10px;
top: -30px;
background-color: #4b86a1;
color: white;
z-index: -2;
margin-left: 10px;
padding: 20px 10px 10px 10px;
}
.rightMenu ul li {
}
.rightMenu:hover ul {
display: block;
}
.rightMenu ul a {
color: white;
}
.scoreBadge {
display: inline-block;
background: white;
color: #4B86A1;
height: 30px;
width: 30px;
border: 2px solid #fcdf05;
border-radius: 50%;
text-align: center;
line-height: 30px;
vertical-align: middle;
font-size: 18px;
}
.userBadge {
display: inline-block;
background-color: #4b86a1;
vertical-align: middle;
padding-left: 10px;
line-height: 30px;
min-width: 49px;
position: relative;
left: -10px;
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
-moz-border-radius-topright: 8px;
-moz-border-radius-bottomright: 8px;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
text-align: right;
z-index: -1;
}
.userBadge > a {
padding: 0 5px 0 5px;
line-height: 25px;
}
#usrName {
color: white;
font-size: 10pt;
font-weight: normal;
text-transform: uppercase;
}