我得到了<head>
:
<head>
<link rel='stylesheet' href='/animated/animate.css' type='text/css' media='all' />
<script type='text/javascript' src='/animated/animated.js'></script>
</head>
我需要在IE8及更低版本中禁用这两个文件。
有什么方法可以做到吗?
答案 0 :(得分:2)
使用条件评论。在这种情况下,您可以使用 -
<head>
<!--[if gt IE 8]> <!-->
<link rel='stylesheet' href='/animated/animate.css' type='text/css' media='all' />
<script type='text/javascript' src='/animated/animated.js'></script>
<!-- <![endif]-->
</head>
请注意: gt
表示'大于',而gte
表示'大于或等于'
详细了解 here
中的条件评论