Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Unused CSS Stages Transitions and Transforms Transitions - WebKit Only

Boon Ping Ng
Boon Ping Ng
2,474 Points

Transition 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

You'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
Atanas Sqnkov
14,981 Points

Hello 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
Simon Klit
1,686 Points

You 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).