CSS3动画旋转——(图片360°旋转)
今天在重构网页特效的时候,想着用到一个css3的旋转特效。简单来一个demo。
html
<div class="box">
<img src="./yft.png" alt="" class="rotation">
</div>css
<style>
@-webkit-keyframes rot {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
.rotation {
animation: rot 3s linear infinite;
}
</style>注意的是,建议这里使用的是插入图片,如果用背景图片的话,那么盒子内的内容也会进行旋转。
相关推荐
冰蝶 2020-03-01
somboy 2020-02-29
coulder 2020-03-07
lanzhusiyu 2020-06-21
vavid 2020-04-20
AlisaClass 2020-04-11
云端漂移 2020-03-08
dazhifu 2020-03-03
lanzhusiyu 2020-03-01
aSuncat 2020-03-01
lanzhusiyu 2020-03-01
福叔 2020-02-23
沈宫新 2020-01-29
haozitwwwcssscn 2013-05-16
CaiKanXP 2020-01-12