- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Animation direction: animation-direction, step 1</title>
<meta charset="utf-8">
<link rel="stylesheet" href="epoch2.css">
<link rel="stylesheet" href="style.css">
</head>
<body class="mechanical">
<div class="mechanism">
<span class="gear-big"></span>
<span class="gear-small"></span>
</div>
</body>
</html>
CSS
@keyframes clockwise {
to {
transform: rotate(180deg);
}
}
@keyframes anticlockwise {
to {
transform: rotate(-180deg);
}
}
You’ve gone to a different page
Goalscompleted
0
- Assign a
clockwise
animation to the large cogwheel.gear-big
with a duration of2s
, - then assign an
anticlockwise
animation to the small cogwheel.gear-small
with a duration of2s
, - then reverse the rotation of both cogwheels.
Comments