并查看相关产品下方的底部,您将看到图像和产品标题列表。当您将鼠标悬停在其中一个上时,图像会变灰,并且图像下方的产品标题周围会出现一个白框。我需要让这个白框消失,但我无法在 CSS 中找到导致它的原因。
我尝试了以下 CSS:
.car-block a:hover >.car-block-bottom h2 {
background: rgb(0, 0, 92) none repeat scroll 0 0 !important;
}
.car-block, .car-block:hover, .car-block:hover .car-block-bottom {
background-color: rgb(0, 0, 92) !important;
}
.car-block .car-block-bottom h2 {
font-weight: bold;
font-size: 16px;
margin: 0px;
margin-top: 10px;
padding: 2px;
color: #fff;
background-color: rgb(0, 0, 92) !important;
}
.car-block-bottom {
display: block;
padding: 6px 5px 10px;
text-align: center;
transition-duration: 0.2s;
transition-property: all;
background-color: rgb(0, 0, 92) !important;
}
如有任何帮助,我们将不胜感激。
最佳答案
尝试覆盖 .car-block-bottom
的白色背景
.car-block, .car-block:hover, .car-block:hover .car-block-bottom.car-block-bottom {
background-color: rgb(0, 0, 92) !important;
}
关于CSS - 在悬停状态下更改 div 的背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40600604/