用css3写一个可以无限旋转的div或者图片

<div class="trans">
 
</div>
 
css
.trans{
display: inline-block;
width:100rpx;
height:100rpx;
border:1px solid red;
border-radius: 50%;
overflow: hidden;
animation: rotate 3s linear infinite;   linear// 意思就是匀速的运动   infinite// 就是无限滚动的意思
}
@keyframes rotate{from{transform: rotate(0deg)}
to{transform: rotate(360deg)}
}
posted @ 2018-09-19 19:15  lieaiwen  阅读(6807)  评论(0编辑  收藏  举报