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 Transitions and Transforms Getting Started with CSS Transitions Creating Your First Transition with transition-duration

Potential error(s) in workspace

After attempting the first step in this video (transitioning the background colour from blue to red) even when copying the exact code used in the video; I was unable to see the hover transition.

Furthermore, the welcome page of the workspace says create a new file named index.html; however you cannot do this as there is already an index.html file (this is less of a concern, but still something I feel should be addressed).

I await your response. Yours, Bruno Crosier

2 Answers

Michael McMillan
Michael McMillan
3,837 Points

I had the same issue. After updating chrome it still would not work. I finally cleared out the browser history, I saw this recommended with a similar problem, and that managed to fix it.

Worked like a charm. Thanks.

Shawn Ramsey
Shawn Ramsey
27,237 Points

Which browser are you using? If you're in Safari, you may have to add the vendor prefix for each transition. For example, on the transition-duration in the video, you would write...

.button {
  color: #fff;
  background: #4a89ca;
  -webkit-transition-duration: .1s;
  transition-duration: .1s;
}

Or you could cover all your bases, especially older versions, by writing out all the vendor prefixes.

.button {
  color: #fff;
  background: #4a89ca;
  -webkit-transition-duration: .1s;
  -moz-transition-duration: .1s;
  -o-transition-duration: .1s;
  transition-duration: .1s;
}

It appears as though almost all current browsers are up-to-speed and don't require the prefix according to -http://caniuse.com/#feat=css-transitions.