【发布时间】:2013-08-03 22:30:09
【问题描述】:
这是我的 css sprite 代码的一部分
#IconSet a {
width: 36px;
height: 36px;
display: inline-block;
}
#DeviantArtIcon {
border-width: 0px;
border-style: none;
background-image: url(http://static.monstermmorpg.com/images/csssprites/SocialIcons.png);
background-color: transparent;
background-repeat: repeat-x;
background-position: -144px -0px;
width: 36px;
height: 36px;
}
#DeviantArtIcon:hover {
border-width: 0px;
border-style: none;
background-image: url(http://static.monstermmorpg.com/images/csssprites/SocialIcons.png);
background-color: transparent;
background-repeat: repeat-x;
background-position: -144px -36px;
width: 36px;
height: 36px;
}
<a id="DeviantArtIcon" href="http://monstermmorpg.deviantart.com" rel="nofollow" target="_blank" title="Monster MMORPG On Deviant Art - Please Watch Our Channel"></a>
现在,当这个图标悬停时,我想要过渡效果。我该怎么做?
我在这里尝试过,但没有成功
【问题讨论】:
-
你对动画的最终目标是什么?你想让它淡入还是向上移动?现在,当您在 css3 中添加过渡效果时,我可以看到它会将图标滑动到活动状态。
标签: css hover css-transitions transition