CSS:IE11 不应用样式

标签 css internet-explorer internet-explorer-11

this page侧边栏中有一个图形:

enter image description here

我在 <head> :

<!--[if IE]>

    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/css/ie.css" media="screen" />

<![endif]-->

ie.css文件包含 .textwidget {display: inline-block;}但是,当我选择 <div class="textwidget"> 时,未应用此 CSS 规则 在 IE11 中检查图形时。

最佳答案

IE11 不支持条件注释,例如 <!--[if IE]> .

来自 MSDN :

Important As of Internet Explorer 10, conditional comments are no longer supported by standards mode. Use feature detection to provide effective fallback strategies for website features that aren't supported by the browser.

关于CSS:IE11 不应用样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38197039/

相关文章:

css - IE11 - Flex 子项占据全高

css - Z-index 不适用于多个绝对定位元素

html - 如何将图像垂直和水平放置在中心/中间

javascript - 德鲁帕尔 8 : How do I add JS files inside libraries conditionally based on versions of IE7 and IE8?

html - IE7、8 和 9 中的 CSS 下拉菜单功能错误

javascript - IE11 在基于 Kendo/JavaScript 的 Web 应用程序中崩溃

jquery - 堆叠的 div 背景图像为黑色

javascript - 放大和缩小时 Chrome 中的表格行高和列表行高问题

javascript - .click() 在 IE11 中拒绝访问

javascript - 使用 JQuery $(...).val (""清除包含 5 个或更多字段的表单时,IE11 崩溃)