×
×
Correct!

Specify that the animation of the <div> element should continue to loop for ever.

<style> div { width: 100px; height: 100px; position: relative; background-color: red; animation-name: example; animation-duration: 2s; animation-iteration-count: infinite; } @keyframes example { 0% {background-color: red; left:0px;} 50% {background-color: yellow; left:200px;} 100% {background-color: red; left:0px;} } </style> <body> <div>This is a div</div> </body>

Not Correct

Click here to try again.

Correct!

<style>
div {
  width: 100px;
  height: 100px;
  position: relative;
  background-color: red;
  animation-name: example;
  animation-duration: 2s;
  : ;
}

@keyframes example {
  0%   {background-color: red; left:0px;}
  50%  {background-color: yellow; left:200px;}
  100% {background-color: red; left:0px;}
}
</style>

<body>
  <div>This is a div</div>
</body>

  
  
  




×

Reset the Score?

This will reset the score of ALL 138 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 138 CSS exercises.

Share your score:



Get Certified!

Take our CSS Developer Certificate to prove that you have fundamental knowledge of web development using CSS.