브라우저별 CSS 핵 정리

/***** Selector Hacks ******/


 


/* IE 6 and below */


* html #uno  { color: red }


 


/* IE 7 */


*:first-child+html #dos { color: red }


 


/* IE 7 and modern browsers */


html>body #tres { color: red }


 


/* Modern browsers (not IE 7) */


html>/**/body #cuatro { color: red }


 


/* Opera 9.27 and below */


html:first-child #cinco { color: red }


 


/* Safari */


html[xmlns*=""] body:last-child #seis { color: red }


 


/*safari 3+, chrome 1+, opera9+, ff 3.5+ */


body:nth-of-type(1) #siete { color: red }


 


/* safari 3+, chrome 1+, opera9+, ff 3.5+ */


body:first-of-type #ocho {  color: red }


 


/* saf3, chrome1+ */


@media screen and (-webkit-min-device-pixel-ratio:0) {


 #diez  { background: #FFDECE; border: 2px solid #ff0000  }


}


 


/***** Attribute Hacks ******/


 


/* ie6 and below */


#once { _color:blue }


 


/* ie7 and below */


#doce { *color: blue } /* or #color:blue */


 

 



정리해놓고 자주 찾아봐야겠네요.

중요한사실은 CSS 핵은 가급적 쓰지 않을수록 좋다는 것!
Tag : , , ,