有没有办法使用 CSS3 过渡来交叉淡化背景图像。
基本上需要这个视频中的“twitter悬停” http://youtu.be/uCcQHXeiPTY
例如:不透明0.5
喜欢1
那个
我是 CSS3 的新手 :(
HTML 和 CSS
<div id="social-contacts">
<ul>
<li id="fb"><a href=""></a></li>
</ul>
</div>
#social-contacts{
width: 375px;
float: left;
margin-left: 50px;
margin-top: 100px;
}
#social-contacts li{
float: left;
list-style: none;
}
#social-contacts li a{
display: block;
}
#fb a{
background: url("http://athimannil.com/page/images/social-icons.png") 0 0;
width: 45px;
height: 45px;
opacity: 0.8;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-o-transition: all 0.5s;
-ms-transition: all 0.5s;
transition: all 0.5s;
}
#fb a:hover{
background-position: 0 47px;
opacity: 1;
}