Show DevBest Speed Coding #2

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Nice. Are the designs original or are they designs that you've found and decided to code up?

A few pointers, where you've done
Code:
.timer .days-wrapper,
.timer .hours-wrapper,
.timer .minutes-wrapper,
.timer .seconds-wrapper { /*styles here*/ }
You can cheat and do it like this
Code:
.timer [class$="-wrapper"] { /*styles here*/ }
This will select any element whose class ends in "-wrapper" within the timer div. You can even specify which types of elements too
Code:
.timer div[class$="-wrapper"] { /*styles here*/ }
So if you've got multiple types of elements (div, span, img, etc) whose class may end in "-wrapper", this will only select the divs that end in "-wrapper"
After seeing that, it probably won't surprise you to learn that you can apply pseudo classes to them
Code:
.timer div[class$="-wrapper"]:hover { /*styles here*/ }

Another thing, I noticed you were using vendor-prefixes for box-shadow, border-radius and transition. This is no longer required. These CSS features are now supported by all major browsers.




It would have been nice to get a finished preview at the end though, I feel cheated :(
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,926
3,923
You should look into using something like or . This'll allow you to use things like , and , which will make your life much easier.
 

Users who are viewing this thread

Top