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

Stephen Furley
Stephen Furley
3,335 Points

Why would this not work? transition: border-radius .6s linear 1s ;

?

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

.box {
  border-radius: 0;
 transition: border-radius .6s linear 1s ;
}

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

Why would this not work?
transition: border-radius .6s linear 1s ;
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>

3 Answers

Grace Kelly
Grace Kelly
33,990 Points

Hi Stephen, I think the issue is the challenge doesn't accept shorthand syntax, you need to use longhand like so:

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

Note you also need to include the -webkit prefix

hope that helps!!

Stephen Furley
Stephen Furley
3,335 Points

Ah perfect thanks grace that worked a treat, just to check for this to actually work wouldn't you need to set border radius t0 0 under the .box class as well?

Grace Kelly
Grace Kelly
33,990 Points

oooh that's an interesting question, no you don't have to set the border-radius to 0 in the .box class as it's default value is already 0. You can see that for yourself here

However I checked it out on workspaces and it works both without setting it AND setting it....so if it makes more sense to you to set it to 0 yourself then go ahead! :)