문제

On my website I have found that web fonts look really nasty on older versions of Internet Explorer, so I decided to use conditional commenting. Given that IE10+ no longer supports conditional comments I thought that the following might work:

<!--[if gt IE 8]> -->
<link blah... />
<!-- <![endif]-->

Whilst this comment is behaving properly in IE7 and IE8, it does not seem to be working properly in IE9 (under simulation mode in IE10). The text --> is shown at the very start of the page.

The following conditional comment doesn't exhibit this behaviour:

<!--[if !IE]> -->
<link blah... />
<!-- <![endif]-->

How can I reliably perform this conditional inclusion where !IE or IE > 8?

도움이 되었습니까?

해결책

Not quite sure how I missed this, but this question has already been asked before here on StackOverflow. I guess my initial search criteria wasn't good enough.

As per the following answer: IE Conditional operator: OR ... if is greater than ie9 or not IE

<!--[if gt IE 8]><!-->
<link blah... />
<!--<![endif]-->
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top