0
点赞
收藏
分享

微信扫一扫

css 图片/元素旋转代码


代码示例:

<span style="font-size:18px;"><!DOCTYPE html>
<html lang="zh-cn">
<head>
<style>
@keyframes wml {
from {
transform:rotate(0);
-ms-transform:rotate(0);
-webkit-transform:rotate(0);
-o-transform:rotate(0);
-moz-transform:rotate(0)
}
to {
transform:rotate(360deg);
-ms-transform:rotate(360deg);
-webkit-transform:rotate(360deg);
-o-transform:rotate(360deg);
-moz-transform:rotate(360deg)
}
}.asd {
animation:wml 3s linear infinite;
-moz-animation:wml 3s linear infinite;
-webkit-animation:wml 3s linear infinite;
-o-animation:wml 3s linear infinite
}
</style>
</head>
<body>
<img class="asd" src="
</body>
</html>
</span>


from 0  to  360  表示顺时针旋转

from 360  to  0  表示逆时针旋转

3s  表示旋转速度




举报

相关推荐

0 条评论