我在绝对定位的 div 中有一个无序列表。我正在尝试对单个 li 元素进行悬停效果,但它根本不起作用。光标只有在 li 的文本上方相当高时才会触发悬停效果。
这是响应式设计布局中最宽的部分,悬停工作得很好,直到最宽的状态,出于设计考虑,我必须将包含的 div 切换到绝对位置,我已经进行了很多实验,它总是在没有绝对定位的情况下工作,但我根本无法将我的容器正确放置在最终状态,并将其从流中移除。
这把我逼疯了,我哪里错了??
.secondary_header{
background: none repeat scroll 0 0 rgba(0, 0, 0, 0.7);
position:absolute;
width:700px;
border-bottom-right-radius:60px;
height:60px;
}
.secondary_header ul{
margin:0 auto;
width:100%;
}
.secondary_header ul li{
background-image:url(../images/audio_icon.png);
background-repeat:no-repeat;
background-position:0px;
padding-left:50px;
float:left;
list-style:none;
line-height:60px;
padding-left:50px;
height:60px;
}
.secondary_header ul li:hover{
color:#09F;
}