当我将鼠标悬停在整个按钮上时,我希望它出现在整个按钮上。因为按钮有背景图片,所以我无法正确执行。按钮如下所示:
CSS 看起来像这样:
#tablist{
padding: 0px auto 0px auto;
height: 32px;
}
#tablist li{
display: block;
width: 150px;
height: 35px;
float: left;
border-radius: 7px;
-moz-border-radius: 7px;
-webkit-border-radius: 7px;
margin: 0px auto 0px auto;
text-align: center;
padding-top: 5px;
cursor: hand;
cursor: pointer;
}
#tablist ul:hover{
background-color: red;
}
.tablink{
text-decoration:none;
}
.locked{
background: url('../img/DashboardButtonsLocked.png') no-repeat;
background-position:5px -85px;
}
.unlocked{
background: url('../img/DashboardButtonsLocked.png') no-repeat;
background-position:4px -2px;
}
我该如何纠正?需要一些指导。
最佳答案
关于css - 如何将鼠标悬停在CSS中的整个按钮上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11202732/