CSS

CSS와 관련된 팁이 있는 곳입니다. 좋은 자료 공유해 주세요.
  • 웹미니 한줄 전광판 영역 입니다.
글 수 52

0

조회 수 : 7984 신고 : 0

profile
작성자 : title: [ani]깜빡이는 표정빽짱구
포인트 : 56933 | 레벨 : 25
미리보기 :  

조건 주석문은 윈도우용 IE5 가 나오면서 선보인 기능으로서 그 이후에 나온 윈도우용 모든 버전에서 지원하고 있습니다.
특정 스타일시트 IE5 이상 브라우저에 적용하려면 다음과 같은 코드를 (X)html 문서 헤드 부분에 넣으면 됩니다.

<!– [if IE]
<style type=”text/css”>
@import (”style.css”);
</style>
–>


위와 같이 할경우 IE5 이상 버전에서는 style.css 를 읽어드리고, 나머지 브라우저에서는 주석문으로 인식합니다.
IE5 같은 특정 버전의 브라우저가 대상이 되도록 할려면 아래와 같은 방법으로 할 수 있습니다.

<!– [if IE 5]
<style type=”type/css”>
@import (”style.css”);
</style>
–>


5.5 이상 브라우저를 대상으로 할려면

<!– [if gte IE 5.5000]

IE5와 5.5를 대상으로 할려면

<!– [if it IE 6]

위와 같은 기법들은 아주 잘 동작하면서 상대적으로 외우기도 쉽습니다. 단 이 주석문은 css 파일이 아니라 html에 써야 합니다. 그러므로 특정 브라우저를 더이상 지원하지 않게 될 경우 모든 페이지마다 해당 주석문을 제거해야 합니다.


<p><!--[if IE]>
According to the conditional comment this is Internet Explorer<br />
<![endif]-->
<!--[if IE 5]>
According to the conditional comment this is Internet Explorer 5<br />
<![endif]-->
<!--[if IE 5.0]>
According to the conditional comment this is Internet Explorer 5.0<br />
<![endif]-->
<!--[if IE 5.5]>
According to the conditional comment this is Internet Explorer 5.5<br />
<![endif]-->
<!--[if IE 6]>
According to the conditional comment this is Internet Explorer 6<br />
<![endif]-->
<!--[if IE 7]>
According to the conditional comment this is Internet Explorer 7<br />
<![endif]-->
<!--[if gte IE 5]>
According to the conditional comment this is Internet Explorer 5 and up<br />
<![endif]-->
<!--[if lt IE 6]>
According to the conditional comment this is Internet Explorer lower than 6<br />
<![endif]-->
<!--[if lte IE 5.5]>
According to the conditional comment this is Internet Explorer lower or equal to 5.5<br />
<![endif]-->
<!--[if gt IE 6]>
According to the conditional comment this is Internet Explorer greater than 6<br />
<![endif]-->
</p>
태그
profile 글쓴이 빽짱구

단점이 없는 사람은 장점도 거의 없다 - 에이브러햄 링컨

엮인글 :
https://web.webmini.net/css/19005/00b/trackback
소중한 댓글 부탁드립니다.
추천수 10단위당 메달이 1개씩 노출되고, 추천수에 따라 배경색이 변하며, 일정수의 추천수를 받을시 BEST 아이콘이 붙게됩니다.
추천수에 따른 배경색 보기 본문으로 바로가기
  • 추천수 50개이상
  • 추천수 30개이상
  • 추천수 20개이상
  • 추천수 10개이상
  • 추천수 3개이상
닫기

댓글 '1'

스마일조아 (118618)

2009.11.05 11:22:55

정말 좋은 정보 감사합니다.
List of Articles
번호 제목 글쓴이 날짜 추천 수sort 조회 수
공지 Cascading Style Sheets (CSS3) file title: [ani]깜빡이는 표정빽짱구 2010-06-29 1 32642
공지 CSS 용량을 줄여주는 사이트 file [7] title: [ani]깜빡이는 표정빽짱구 2010-05-13 1 23179
공지 css 팁에 관련해서... [1] title: [ani]깜빡이는 표정빽짱구 2007-11-30 1 44342
52 hit IE6에서 레이어 고정시키기 핵. Fixed Layer Hack for ... title: [ani]깜빡이는 표정빽짱구 2007-11-30   13173
51 hit css를 이용한 이미지 확대 title: [ani]깜빡이는 표정빽짱구 2008-03-19   14966
50 폰트 사이즈 비교표 title: [ani]깜빡이는 표정빽짱구 2007-09-17   9629
49 hit CSS 만으로 구현하는 롤오버 이미지 [1] title: [ani]깜빡이는 표정빽짱구 2007-12-03   12936
48 hit 해당 div를 스크롤로 감싸자. [1] title: [ani]깜빡이는 표정빽짱구 2007-12-06   14722
47 hit IE에서 Float-Margin Bug title: [ani]깜빡이는 표정빽짱구 2007-12-07   13002
46 익스 문자버그 (주석버그) file [1] title: [ani]깜빡이는 표정빽짱구 2009-02-05   9816
45 hit div 전체 세로 정렬하기 [1] title: [ani]깜빡이는 표정빽짱구 2008-06-13   19637
44 hit 고유 색상명 file [1] title: [ani]깜빡이는 표정빽짱구 2008-06-17   11885
43 hit css로 background 이미지 고정하기 title: [ani]깜빡이는 표정빽짱구 2008-06-19   23661
42 hit IE6 스타핵으로 png 배경으로 적용시 링크가 안먹힐때 file title: [ani]깜빡이는 표정빽짱구 2009-02-16   13801
41 hit input 박스 활성화시 테두리 색 넣기 [2] title: [ani]깜빡이는 표정빽짱구 2009-02-06   10087
40 ie6에서 영역을 잡자. title: [ani]깜빡이는 표정빽짱구 2009-03-06   9023
39 hit 자동 줄바꿈 금지 [6] title: [ani]깜빡이는 표정빽짱구 2009-12-29   18098
38 CSS3만든 애플키보드 title: [ani]깜빡이는 표정빽짱구 2011-11-15   5011
37 css를 이용하여 원으로 된 paging 만들기 file [1] title: [ani]깜빡이는 표정빽짱구 2011-06-02   7389
36 세로 스크롤바 생기게 하기 title: [ani]깜빡이는 표정빽짱구 2011-06-16   7319
35 [반응형웹]해상도에 따른 CSS호출하기(미디어쿼리) title: [ani]깜빡이는 표정빽짱구 2014-05-20   3236
34 CSS Transition 옵션 title: [ani]깜빡이는 표정빽짱구 2018-09-30   237
33 sass 기초 개념이 잘정리되어 있네요. title: [ani]깜빡이는 표정빽짱구 2018-10-25   235