【发布时间】:2015-01-27 11:53:44
【问题描述】:
我目前有一个页面,当用户使用以下 html 语法单击打印按钮时,我正在为其应用一些特定于浏览器的 CSS 样式。但是下面的 html 代码不会应用为 IE11(ie11print.css)指定的 css,而是应用为其余 IE 版本(ieprint.css)指定的 css。
<!--[if IE 11]> <link rel="stylesheet" media="print" title="Print" type="text/css" href="/styles/ie11print.css" /><![endif]-->
<!--[if lte IE 10]> <link rel="stylesheet" media="print" title="Print" type="text/css" href="/styles/ieprint.css" /><![endif]-->
<!--[if !IE]>--><link rel="stylesheet" media="print" title="Print" type="text/css" href="/styles/print.css" /><!--<![endif]-->
有人知道如何为 IE11 指定 CSS 文件吗? 提前致谢。
【问题讨论】:
-
你不应该需要...反正 IE11 不支持条件 cmets。
-
IE 11 与其他浏览器有何不同,您需要包含自定义样式表来修复它?
-
我使用 zoom:70% 减小了页面大小;对于使用 ieprint.css 文件的所有 IE 版本,它在所有 IE 版本中都能完美运行,但在 IE 11 中,与其他 IE 浏览器相比,它要小得多。我不想在 IE11 中使用缩放。
-
正如@Paulie_D 提到的,Microsoft 在版本 9 之后删除了条件 cmets。您的 IE10 条件也将不起作用。
标签: html css internet-explorer internet-explorer-11