在我的网站页面上,扬声器和麦克风上的悬停过渡效果在加载后第一次单击时会丢失,但在多次尝试后有效。这只发生在麦克风和第一个扬声器图片上。其余图片正常工作。为什么是这样?
.chatmic
{
width: 70px;
height: 50px;
margin-top: 5px;
margin-left: 10px;
background-image: url(../img/mic_on.png);
float: left;
opacity: 1;
transition-duration: 0.4s;
-webkit-transition-duration: 0.4s;
-moz-transition-duration: 0.4s;
-o-transition-duration: 0.4s;
}
.chatmicoff
{
background-image: url(../img/mic_off.png);
opacity: 0.3;
transition-duration: 0.4s;
-webkit-transition-duration: 0.4s;
-moz-transition-duration: 0.4s;
-o-transition-duration: 0.4s;
}
.chatloudspeaker
{
width: 70px;
height: 50px;
margin-top: 5px;
margin-left: 10px;
background-image: url(../img/loudspeaker_on.png);
transition-duration: 0.4s;
-webkit-transition-duration: 0.4s;
-moz-transition-duration: 0.4s;
-o-transition-duration: 0.4s;
float: left;
opacity: 1;
}
.chatloudspeakeroff
{
background-image: url(../img/loudspeaker_off.png);
opacity: 0.3;
transition-duration: 0.4s;
-webkit-transition-duration: 0.4s;
-moz-transition-duration: 0.4s;
-o-transition-duration: 0.4s;
}