首页 > 技术文章 > HTML实现图片360度循环旋转

xinlvtian 2018-02-04 21:10 原文

<style>
.header{
    -webkit-animation:rotateImg 5s linear infinite;<!--修改旋转周期-->
    border: 1px solid #ccc;
    vertical-align: middle;
}

@keyframes rotateImg {
  0% {transform : rotate(0deg);}
  100% {transform : rotate(360deg);}
}

@-webkit-keyframes rotateImg {
    0%{-webkit-transform : rotate(0deg);}
  100%{-webkit-transform : rotate(360deg);}
}
</style>

<p style="margin: 50px;"><img class="header" src="http://blog.xinlvtian.com/wp-content/uploads/2018/01/logo.png"/></p>

原文地址:http://blog.csdn.net/ly305750665/article/details/71499497

推荐阅读