[ie]Conditional Comment
<!--[if lte IE 6]><style type="text/css">.ie{ margin-top:30px;margin-bottom:-30px; }</style>
<![endif]-->
이런식으로 IE 버전별로 적용을 시킬 수 있음.
XSL 에서는
<xsl:comment><![CDATA[[if lte IE 6]>
<style type="text/css">.ie{ margin-top:30px;margin-bottom:-30px; }</style>
<![endif]]]></xsl:comment>
IE 선택적 적용(Conditional Comments) 부분,
ie에서만 동작기하길 원하는 js나 ie의 css 버그 처리 때문에 사용하는 경우 많음
gt = selects greater than 보다큰 : if gt IE 6 -> 현재버전 > 6
lt = selects less than 보다 작은 : if lt IE 6 -> 현재버전 < 6
gte = selects greater than or equal to 같거나 큰 : if gte IE 6 -> 현재버전 >= 6
lte = selects less than or equal to 같거나 작은 : if lte IE 6 -> 현재버전 <= 6
To select exclusivly for any non IE - use " IE & !IE " for a downlevel-revealed within a downlevel-hidden CC
<!--[if IE]><![if !IE]><![endif]--> html <!--[if IE]><![endif]><![endif]-->
To select for IE 5.01 only - use " IE 5.0 " or "lte IE 5.0" or "!gt IE 5.0" or "lt IE 5.5000" or "!gte IE 5.5000"
<!--[if IE 5.0]> html <![endif]-->
To select for IE 5.5 or 6 or 7.0 - use " !IE 5.0 " or "!lte IE 5.0" or "gt IE 5.0" or "!lt IE 5.5000" or "gte IE 5.5000" (all less specific)
<!--[if !IE 5.0]> html <![endif]-->
To select for IE 5.5 only - use " IE 5.5000 "
<!--[if IE 5.5000]> html <![endif]-->
To select for IE 5.01 or 6 or 7.0 - use " !IE 5.5000 " (less specific)
<!--[if !IE 5.5000]> html <![endif]-->
To select for IE 6 only - use " IE 6 "
<!--[if IE 6]> html <![endif]-->
To select for IE 5.01 or 5.5 or 7.0 - use " !IE 6 " (less specific)
<!--[if !IE 6]> html <![endif]-->
To select for IE 7.0 only - use " IE 7.0 "; or less specific "!lte IE 6" or "gt IE 6" or "!lt IE 7.0" or "gte IE 7.0" or "!lt IE 7" or "IE 7" or "gte IE 7"
<!--[if IE 7.0]> html <![endif]-->
To select for IE 5.01 or 5.5 or 6 - use " lte IE 6 " or "!gt IE 6" or "lt IE 7.0" or "!gte IE 7.0" or "lt IE 7" or "!gte IE 7"; or less specific "!IE 7.0" or "!IE 7"
<!--[if lte IE 6]> html <![endif]-->
To select for IE 5.01 or 5.5 - use " IE 5 " or "lte IE 5" or "!gt IE 5" or "lte IE 5.5000" or "!gt IE 5.5000" or "lt IE 6" or "!gte IE 6"
<!--[if IE 5]> html <![endif]-->
To select for IE 6 or 7.0 - use " !IE 5 " or "!lte IE 5" or "gt IE 5" or "!lte IE 5.5000" or "gt IE 5.5000" or "!lt IE 6" or "gte IE 6" (all less specific)
<!--[if !IE 5]> html <![endif]-->
To select for IE 5.01 or 6 - use " lte IE 6 & !IE 5.5000 " or, more general, any of 3 pairs ({"lt IE 7", "!IE 7", "lte IE 6"},{"!IE 5.5000"}) for a downlevel-revealed within a downlevel-hidden CC
<!--[if lte IE 6]><![if !IE 5.5000]> html <![endif]><![endif]-->
To select for IE 5.01 or 7.0 - use " !IE 6 & !IE 5.5000 " (less specific) for a downlevel-revealed within a downlevel-hidden CC
<!--[if !IE 6]><![if !IE 5.5000]> html <![endif]><![endif]-->
To select for IE 5.5 or 6 - use " lte IE 6 & gte IE 5.5000 " or, more general, any of 9 pairs ({"lt IE 7", "!IE 7", "lte IE 6"},{"gt IE 5.0", "!IE 5.0", "gte IE 5.5000"}) for a downlevel-revealed within a downlevel-hidden CC
<!--[if lte IE 6]><![if gte IE 5.5000]> html <![endif]><![endif]-->
To select for IE 5.5 or 7.0 - use " !IE 6 & gt IE 5.0 " or, more general, any of 3 less specific pairs ({"!IE 6"},{"gt IE 5.0", "!IE 5.0", "gte IE 5.5000"}) for a downlevel-revealed within a downlevel-hidden CC
<!--[if !IE 6]><![if gt IE 5.0]> html <![endif]><![endif]-->
To select for IE 5.01 or 5.5 or 6 or 7.0 - use " lte IE 7.0 "; or less specific "gte IE 5" or "gte IE 5.0" or "lte IE 7" or "IE"; it seems not feasible to use any negations for this selection.
<!--[if lte IE 7.0]> html <![endif]-->
http://www.positioniseverything.net/articles/multiIE.html
http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp?frame=true
댓글
댓글 쓰기