本文共 503 字,大约阅读时间需要 1 分钟。
1. 旋转不放大
img{ animation: rotation 3s linear infinite; } /*旋转动画*/ @keyframes rotation { to { transform:rotate(1turn); //1trun = 360deg } }
2. 边旋转边放大
img{ animation: rotation 3s linear infinite; } /*旋转动画*/ @keyframes rotation { 0% { transform: rotate(0deg); } 50% { transform: scale(1.5) rotate(180deg); } 100% { transform: rotate(360deg); } }
转载地址:http://fchwi.baihongyu.com/