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

CSS

Nazaam Kutisha
Nazaam Kutisha
7,667 Points

Stuck on Code Challenge: Transitions

Im not clear on what I'm being asked to do here. I used the webkit prefix & I've given the proper duration and delay; however my transition statement isn't working for this challenge. Any suggestions?

https://teamtreehouse.com/library/websites/css-foundations-second-edition/transitions-and-transforms/transitions-webkit-only

Challenge task 1 of 1

Using the prefix for WebKit-based browsers, create a transition for the border-radius property of .box. Give the transition a duration of 2 seconds, a delay of 1 second, and a timing function that maintains a linear motion. Here is my code:

/* Complete the challenge by writing CSS below */

.box {
    border-radius: 15px;
    background: #4682B4;


  -webkit-transition: border-radius 2s cubic-bezier(.5, -.5, .3, 1.3) 1s, 
    background .6s linear 1s;
  transition: border-radius 2s cubic-bezier(.5, -.5, .3, 1.3) 1s, background .6s linear 1s;
 }

.box:hover {
    background: #F08080;
    border-radius: 50%;
}

2 Answers

You are pretty close, your main issue is that it is not asking for a cubic-bezier timing function, it is asking for a linear timing function.

 .example {
   -webkit-transition: [transition-property] [transition-duration] [transition-timing-function] [transition-delay];
}

All you should need to do is pass in the correct timing function, and your code is good to go!

Wayne Priestley
Wayne Priestley
19,579 Points

Hi Nazaam,

Sorry to say but your a little off with what the challenge is after, I think your trying for more than its asking. So if we break it down its asking for 4 things if we include create the transition.

Lets start by listing -webkit-transition four times. Then look at what the challenge asks for.

If i give you the first one, try to add the rest, KEEP IT SIMPLE,

.box {
    border-radius: 15px;
    background: #4682B4;
  -webkit-transition: border-radius;
  -webkit-transition- ? : ? ;
  -webkit-transition- ? : ? ;
  -webkit-transition- ? - ? :  ? ; 
 }

This should put you on the right track without giving you the answer, which wouldn't really be the point of the forum. (all the answers are in the question) Shout out if you need another hint :)