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

The circles on the SVG are not pulsing but Jumping!

Doing exactly the same as in the video(https://teamtreehouse.com/library/animating-svg-with-css/keyframe-and-line-drawing-animations/finishing-the-animation-sequence). But in comparison with Guil's video, my code is not working.

Here's my CSS.

/* --------------------------
  Base
--------------------------- */

body {
  background: #8069a1;
  padding-top: 60px;
}

svg {
    margin: auto;
  display: block;
}

/* --------------------------
  Keyframes
--------------------------- */

@keyframes grow {

    0%  {transform: scale(0);}
    30% {transform: scale(1.1);}
    60% {transform: scale(0.9);}
}

@keyframes turn {

    0%   {transform: rotate(0) scale(0);
          opacity: 0;}
    60%  {transform: rotate(375deg) scale(1.1);}
    80%  {transform: rotate(355deg) scale(0.9);}
    100% {transform: rotate(360deg) scale(1.0);}
}

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

/* --------------------------
  SVG Styles
--------------------------- */

.badge * {
    transform-origin: 180px 180px;
}

.outer,
.inner,
.inline {
    animation: grow 1s ease-out backwards;
}

.inner {
    animation-delay: .1s;
}

.inline {
    animation-delay: .15s;
}

.star {
    animation: turn 1.1s .2s ease-out backwards;
}


.star circle {
    animation: pulse .7s 1.5s;
} 

.star circle:nth-of-type(2) {
    animation-delay: 1.6s;
}

.star circle:nth-of-type(3) {
    animation-delay: 1.7s;
}

.star circle:nth-of-type(4) {
    animation-delay: 1.8s;
}

.star circle:nth-of-type(5) {
    animation-delay: 1.9s;
}

1 Answer

Steven Parker
Steven Parker
243,656 Points

Try this setting:

.badge * {
  transform-origin: center;
  transform-box: fill-box; 
}