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 trialSamuel Glister
12,471 PointsTransition Code Challenge
Hi All,
I'm currently doing the CSS deep dive transition code challenge and can't get it to accept my CSS.
The mark up i'm using is
.box {
border-radius: 15px;
background: #4682B4;
-webkit-transition: border-radius;
-webkit-animation-duration: 2s;
-webkit-transition-delay: 1s;
-webkit-animation-timing-function: linear;
}
.box:hover {
background: #F08080;
border-radius: 50%;
}
1 Answer
Jason Anello
Courses Plus Student 94,610 PointsHi Samuel,
You used the word animation
a couple of times instead of transition
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsAlso, I would recommend that you use the individual properties throughout or use the shorthand property only.
You used the shorthand property
-webkit-transition: border-radius;
rather than the individual property-webkit-transition-property: border-radius;
While this will work:
This will not work: (notice the order change)
When using the shorthand property, all the omitted values will be set back to their initial state. This means that you will lose the
duration
that you've already set.I recommend instead that you either do this: (consistent use of individual properties)
Or a single shorthand property:
-webkit-transition: border-radius 2s linear 1s;