css3控制圖片先旋轉120度,再旋轉120度,然后就停止旋轉.
2 回答

慕后森
TA貢獻1802條經驗 獲得超5個贊
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="jquery.min.js"></script>
<style>
div{
height: 100px;
width: 100px;
background-color: red;
}
@keyframes animation {
40% {
transform: rotate(120deg);
}
60% {
transform: rotate(120deg);
}
100% {
transform: rotate(240deg);
}
}
.animation {
animation: animation 2s ease;
animation-fill-mode : forwards;/*保持結束位置*/
}
</style>
</head>
<body>
<div class="animation">
</div>
</body>
</html>
- 2 回答
- 0 關注
- 1300 瀏覽
添加回答
舉報
0/150
提交
取消