• 코드:
​x
 
1
<!DOCTYPE html>
2
<html lang="ko">
3
​
4
<head>
5
    <meta charset="UTF-8">
6
    <title>CSS3 Animation</title>
7
    <style>
8
        div {
9
            height: 150px;
10
            width: 150px;
11
            margin: 20px;
12
            background-color: orange;
13
            border-radius: 150px;
14
            line-height: 150px;
15
            text-align: center;
16
            -webkit-animation-name: movingPara;
17
            -webkit-animation-duration: 2s;
18
            animation-name: movingPara;
19
            animation-duration: 2s;
20
        }
21
        @-webkit-keyframes movingPara {
22
            from { transform: rotate(-45deg); }
23
            to { transform: rotate(45deg); }
24
        }
25
        @keyframes movingPara {
26
            from { transform: rotate(-45deg); }
27
            to { transform: rotate(45deg); }
28
        }
29
        #backward {
30
            -webkit-animation-direction: reverse;
31
            animation-direction: reverse;
32
        }
33
    </style>
34
</head>
35
​
36
<body>
37
​
38
    <h1>animation-direction 속성값 - reverse</h1>
39
    <div id="forward">오른쪽으로 도는 원</div>
40
    <div id="backward">왼쪽으로 도는 원</div>
41
​
42
</body>
43
​
44
</html>