티스토리 뷰

WEB2.0/웹표준

브라우저별 CSS 핵 정리

나를찾는아이 2009. 5. 7. 18:11
728x90
반응형
/***** 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 핵은 가급적 쓰지 않을수록 좋다는 것!
728x90
반응형
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함