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 Unused CSS Stages Transitions and Transforms Transitions - WebKit Only

Sreng Hong
Sreng Hong
15,083 Points

I stuck with this code challenge

I try to do as a requirement, but I can't get it right. It always said "make sure your transition property is correct".

Sreng Hong
Sreng Hong
15,083 Points
.box {
  border-radius: 15px;
  background: #4682B4;
}

.box:hover {
  background: #F08080;
  border-radius: 50%;
  -webkit-transition-property: border-radius;
  -webkit-transition-duration: 2s;
  -webkit-transition-timing-function: linear;
  -webkit-transition-delay: 1s;
}

3 Answers

Shawn Flanigan
PLUS
Shawn Flanigan
Courses Plus Student 15,815 Points

Move all of your transition-specific css into the .box section instead of the .box:hover section. Should work.

Sreng Hong
Sreng Hong
15,083 Points

Thank Shawn!!! Can you tell me what differences between put it in .box and .box:hover?

Shawn Flanigan
Shawn Flanigan
Courses Plus Student 15,815 Points

Adding it to the hover state works in one direction, but once you move the cursor off of the box, the styling snaps back to its original state. By adding your css to the main .box selector, the browser will transition in the other direction as well.

Sreng Hong
Sreng Hong
15,083 Points

Oh i got it, thank again!!!