您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

CSS3旋转动画

CSS3旋转动画

这是 正确的动画CSS:

.image {

    position: absolute;

    top: 50%;

    left: 50%;

    width: 120px;

    height: 120px;

    margin:-60px 0 0 -60px;

    -webkit-animation:spin 4s linear infinite;

    -moz-animation:spin 4s linear infinite;

    animation:spin 4s linear infinite;

}

@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } }

@-webkit-keyframes spin { 100% { -webkit-transform: rotate(360deg); } }

@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }


<img class="image" src="http://i.stack.imgur.com/pC1Tv.jpg" alt="" width="120" height="120">

有关代码的一些注意事项:

CSS 2022/1/1 18:14:26 有541人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶