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 trialJason Larkin
13,970 PointsProblem with Transitions code challenge
.box {
border-radius: 15px;
background: #4682B4;
-webkit-transition-duration:2s;
-webkit-transition-timing-function:linear;
-webkit-transition-delay:1s;
}
.box:hover {
background: #F08080;
border-radius: 50%;
}
I posted the above code to create a transition for the border-radius .box. It SHOULD be right and looks right in the preview. Can anyone help? I keep getting an error message and it is becoming maddening. Thank you in advance for any replies.
3 Answers
Jason Anello
Courses Plus Student 94,610 PointsHI Jason,
You left off which property should receive the transition.
-webkit-transition-property: border-radius;
If you leave this off then it defaults to all
animatable properties. In this case, both the border-radius and the background color would transition but they only want the border-radius to transition and the background would be an instant change.
You can also combine all properties with the shorthand property:
-webkit-transition: border-radius 2s linear 1s;
Erwin Meesters
15,088 PointsYou can write the transition statement as a single line: transition: property duration timing-function delay. In this case the property is the border-radius of .box, the other values are the transition values. Your code should look like this: -webkit-transition: border-radius 2s linear 1s;
I don't know exactly why your code isn't working, but sometimes they expect a different solution to the given problem I guess.
Jason Larkin
13,970 PointsThank you Erwin! That was the solution. Cheers
Jason Larkin
13,970 PointsJason Larkin
13,970 PointsThat was the solution, thank you Jason!