【发布时间】:2012-03-10 19:41:01
【问题描述】:
我正在使用 CSS 进行悬停,它可以工作,但悬停图像允许背景图像 (pic_normal) 在图像后面显示为透明 (pic_hover)。
鼠标悬停时如何只显示悬停图像?
HTML
<img id="first" src="images/clients/pic_normal.png" />
CSS
#first img:hover {
background-image: url("/images/clients/pic_hover.png");
background-repeat: no-repeat;
}
【问题讨论】:
-
检查我的答案,我已经发布了一行代码......