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 CSS - Beyond the Basics Understanding CSS Transitions and Transforms Timing Functions and Delays Challenge

Jana Beals
Jana Beals
3,647 Points

Create a transition for the border-radius property of .box. Give transition a dur of .6 sec, a delay of 1 sec, linear.

This looks right to me, any suggestions?

style.css
/* Complete the challenge by writing CSS below */

.box {
  transition: border-radius .6s cubic-bezier(0, 0, 1, 1) 1s;
}

.box:hover {
    background: #F08080;
    border-radius: 50%;
}
index.html
<!DOCTYPE html>
<html>
<head>
    <title>CSS Transitions</title>
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="box"></div>
</body>
</html>

1 Answer

I don't think cubic bezier is necessary here since it is asking for linear. Keep the order in mind as well:

transition: [transition-property] [transition-duration] [transition-timing-function] [transition-delay];

Also, this challenge can be a bit frustrating for two reasons, 1) you automatically assume that shorthand will be accepted and it doesn't seem to accept it. 2) you also automatically assume that you can use the transition property without the webkit prefix, and that doesn't seem to work either. I have shared the longhand method below:

-webkit-transition-property: border-radius;
-webkit-transition-duration: .6s; 
-webkit-transition-delay: 1s;
-webkit-transition-timing-function: linear;