0

我几乎完成了我正在开发的网站,但是 IE 不接受我的一些动画。

我知道我可以指定一个仅限 IE 的工作表:

<!--[if IE]>
    <link rel="stylesheet" type="text/css" href="path/to/stylesheet.css"></link>
<![endif]-->

但是 IE 仍然运行其他样式表,有没有人知道强制 IE 忽略 css 样式表的方法?

问候,吉米

4

2 回答 2

1

由于 CSS 代表级联样式表,因此这些条件表的想法是覆盖“普通 css”

<link rel="stylesheet" type="text/css" href="path/to/normalstylesheet.css"></link>
<!--[if IE]>
    <link rel="stylesheet" type="text/css" href="path/to/iestylesheet.css"></link>
<!--[endif]-->

前者的所有内容都将被后者的样式表覆盖。如果您有其他特定原因省略某些内容,尽管您始终可以使用它。

<!--[if !IE]-->
    <link rel="stylesheet" type="text/css" href="path/to/notiestylesheet.css"></link>
<!--[endif]-->
于 2013-09-22T12:06:50.120 回答
0

你可以用这个,

<!--[if !IE]-->
  IE ignores this
<!--[endif]-->
于 2013-09-22T12:06:04.770 回答