<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Animation fill mode</title>
</head>
<body>
  <div class="box"></div>
</body>
</html>
.box
{
  width: 50px;
  height: 50px;
  background: red;
  
  animation-name: grow;
  animation-duration: 3s;
  animation-delay: 1s;
  
  /* animation-fill-mode: none; */
  /* animation-fill-mode: forwards; */
  /* animation-fill-mode: backwards; */
  animation-fill-mode: both;
}

@keyframes grow
{
  from { width: 100px; height: 100px; background: blue; }
  to { width: 200px; height: 200px; background: orange; }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.