当前位置: 首页 > 网站开发 > 正文

CSS3无限旋转动画代码

妙网小编 发表于2017年3月21日 14:48

直接上代码:可以实现初始就直接开始360度无限旋转。

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>图片循环旋转</title>
<style>
*{margin: 0; padding: 0;}
.ta_c{text-align: center;
margin-top: 100px;}
@-webkit-keyframes rotation{
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(360deg);}
}

.Rotation{
-webkit-transform: rotate(360deg);
animation: rotation 3s linear infinite;
-moz-animation: rotation 3s linear infinite;
-webkit-animation: rotation 3s linear infinite;
-o-animation: rotation 3s linear infinite;
}
.img{border-radius: 250px;}
</style>
</head>
<body>
<div class="ta_c">
<img class="Rotation img" src="img/01.png" width="500" height="500"/>
</div>
</body>
</html>

本文标签: 网站制作网站建设网站设计HTML
本文标题: CSS3无限旋转动画代码
本文链接: https://www.mwkj.net/m/?post=656

随机文章推荐 收藏本文

共有3513阅 / 0我要评论
  1. 还没有评论呢,快抢沙发~

发表你的评论吧返回顶部

!评论内容需包含中文

请勾选本项再提交评论