CSS Animations Interactive Exercise

Instructions

Use the controls below to create your own CSS animations. Adjust the properties and see your animation in real-time!

CSS animations allow you to gradually change from one style to another without using JavaScript. You can control:

Animation Controls

2s
0s
Animate Me
.element {
  animation: custom-animation 2s ease 0s infinite normal none;
}

@keyframes custom-animation {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1);
  }
}

Predefined Animation Examples

Click on any example to apply it to the animation playground:

Bounce
Pulse
Shake
Spin
Fade
Slide