Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 包含所有IE样式表规则的if IE外部样式表_Css_Internet Explorer_Cross Browser - Fatal编程技术网

Css 包含所有IE样式表规则的if IE外部样式表

Css 包含所有IE样式表规则的if IE外部样式表,css,internet-explorer,cross-browser,Css,Internet Explorer,Cross Browser,我在一个反应迅速的网站上工作,该网站使用了相当多的ccs3和JS,该网站有很多退路,所以它可以跨浏览器回到IE8。对于几乎所有的IE版本,我都有一个特定的IE浏览器代码,每个页面的结尾都是这样 /*CSS样式*/ <!--[if lte IE 8]> <style> /*CSS STYLES*/ </style> <![endif]--> <!--[if lt IE 8]> <style> /*

我在一个反应迅速的网站上工作,该网站使用了相当多的ccs3和JS,该网站有很多退路,所以它可以跨浏览器回到IE8。对于几乎所有的IE版本,我都有一个特定的IE浏览器代码,每个页面的结尾都是这样

/*CSS样式*/
<!--[if lte IE 8]>
  <style>
    /*CSS STYLES*/
  </style>
<![endif]-->

<!--[if lt IE 8]>
  <style>
    /*CSS STYLES*/
  </style>
<![endif]-->
不必这样做,因为它占用了每页页眉的空间,可以这样做:

<!--[if lte IE 9]>
      <style>
        /*Go to a style sheet where all the above code is*/
      </style>
    <![endif]-->

我在这里试图做的是允许IE为所有IE浏览器打开一个单独的样式表,其中包含上述所有规则,而不必像引用普通样式表一样,为每个if IE块设置一个外部样式表

<!--[if lt IE 9]>
    <link rel=stylesheet href="YOUR_FILE_HERE.css">
<![endif]-->