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
Franklin Gomez
6,549 PointsCannot get animation to work as well, not sure what am I doing wrong.
/* -------------------------- Base --------------------------- */
body { padding-top: 60px; background: #0f4e7a; }
svg { margin: auto; display: block; width: 28%; }
/* -------------------------- Keyframes --------------------------- */ @Keyframes slide { 50% { transform: translate3d(0, -10px, 0); } 80% { transform: translate3d(0, 10px, 0); } 100% { transform: translate3d(0, 0, 0); }
}
@Keyframes grow { 0% { transform: scale(1); } 50% { transform: scale(1.5) rotate(-5deg); opacity: 1; fill: #fdf097; } 100% { transform: scale(1); } }
@Keyframes offset { 60% { stroke-opacity:1; } 100% { stroke-dashoffset:0; } }
/* -------------------------- SVG Styles --------------------------- */
.stars * { transform-origin: 50% 50%; }
.stars-bg { stroke-opacity: 0; stroke-dasharray: 815; stroke-dashoffset:815; animation: offset .8s 2.2s linear forwards; }
.star { transform: translate3d(0, 180px, 0); animation: slide 5.s forwards, grow .6s ease-out forwards; }
.star:nth-of-type(1) { animation-delay: .5s, 1.8s; } .star:nth-of-type(2) { animation-delay: 0s, 1.5s; } .star:nth-of-type(3) { animation-delay: .8s, 2s; }
1 Answer
Jan Oberreiter
78,021 Points... this doesn't`t show your html ... a reason could be, that you had something wrong in the class you are referring to ... sometimes just a typo ... but the CSS seems right ... often it is that and you wonder ... why is it not working and then it is something you refer to ... hope this helps you ... regards, Jan.