我想在背景图像上执行CSS3变换:rotate(360deg),并在1秒的过渡内完成。是否可能?我已经在Google上搜索了很多但没有成功!我的目标是实现类似于:
#footerLogo {
background: url('ster.png'),
-moz-transition: -moz-transform 1s,
transition: transform 1s,
-o-transition: -o-transform 1s,
-webkit-transition: -webkit-transform 1s;
background-position: #outlinedtotheleft;
}
#footerLogo:hover {
background: transform: rotate(360deg);
-o-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
}
希望这是可能的!我知道可以很容易地在JS(jQuery)中完成:
$('#something').hover(function(){morecodehere});
...但我想知道是否仅使用CSS(3)也可以实现。
HTML:
<div id="footerLogo">
<img src="carenza.png"/>
</div>