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 trialBoon Ping Ng
2,474 PointsTransition Code chanllenge
.box { border-radius: 15px; background: #4682B4; -webkit-transition-timing-function: linear; -webkit-transition-duration: 2s; -webkit-transition-delay: 1s; }
.box:hover { background: #F08080; border-radius: 50%; }
Trying to understand why is this wrong. Someone?
3 Answers
Jason Anello
Courses Plus Student 94,610 PointsYou're missing which property to transition using transition-property
. If you leave this off then it defaults to all
and both the background and the border-radius would transition.
-webkit-transition-property: border-radius;
using the individual properties.
Or you specify all properties together using the shorthand transition
property:
-webkit-transition: border-radius 2s linear 1s;
Atanas Sqnkov
14,981 PointsHello Boon!
Your problem here is that you are not assigning WHAT to transition.
add a
-webkit-transition: background;
to make a transition for the background color.
Simon Klit
1,686 PointsYou need to add the actual transition. All you've done so far is telling it how the transition should behave, without having defined a transition.
-webkit-transition: border-radius 2s;
If you add the above to your code, it will work properly (Note that the transition will take 2 seconds in this case. Of course this can be changed to your liking).