Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Animating SVG with CSS Keyframe and Line Drawing Animations Finishing the Animation Sequence

Is the pulse keyframe needed if transition and transform do the same?

Guil creates the following keyframe, and then states that the animation will begin from the initial state of the element, and end back at the same initial state.

@keyframes pulse {
    50% {
        transform: scale(1.4);

Is that the equivalent of creating a CSS transition rule for the same element?

Can a CSS transition trigger without user interaction (like on page load)?

1 Answer

Steven Parker
Steven Parker
229,017 Points

Transitions and animations have different capabilities, for examples:

  • transitions have only an initial and final state, animations have intermediate steps
  • transitions only run once, animations can repeat
  • transitions require a trigger to run, animations can be automatic
  • transitions are easier to code, but animations can do more

So it's good to know both techniques, so you can choose the one which best fits your needs in each case.