- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Stopping and starting an animation: animation-play-state</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="epoch4.css">
    <link rel="stylesheet" href="style.css">
  </head>
  <body class="technologic">
    <div class="belt">
      <span class="robot warrior"></span>
    </div>
    <div class="belt">
      <span class="robot constructor"></span>
    </div>
  </body>
</html>
CSS
.robot {
  animation-duration: 5s;
  animation-iteration-count: 2;
  animation-direction: alternate;
}
You’ve gone to a different page
Goalscompleted
0
- Create a moveanimation with a keyframetocontaining aleft: 400pxproperty,
- then assign this animation to the robots .robot.
- Create a .robot-pausedrule that will pause the animation.
The robot-paused class is activated when the robots are clicked on. Try clicking on them while they are moving!
Comments