【发布时间】:2022-11-20 18:37:37
【问题描述】:
当我将鼠标悬停在 div 元素上时,只有它亮起而不是链接。 有什么办法可以让按钮亮起来,而不是按钮背景,然后是链接。
<div id="b1"; class = b>
<a href="test.html">BUY</a>
</div>
<div id="b2"; class = b>
<a href="test.html">BUY</a>
</div>
<div id="b3"; class = b>
<a href="test.html">BUY</a>
</div>
a:visited{
color: white
}
a:hover:visited{
color: rgb(180, 179, 179);
}
a:link{
color: white;
background-color: rgb(180, 179, 179);
}
a:hover{
color: rgb(180, 179, 179);
background-color: white
}
div.b{
color: white;
background-color: rgb(180, 179, 179);
}
div.b:hover{
color: rgb(180, 179, 179);
background-color: white
}
a:link { text-decoration: none; }
a:visited { text-decoration: none; }
a:hover { text-decoration: none; }
a:active { text-decoration: none; }
我尝试了至少我知道的一切
【问题讨论】: