IE11忽略内联CSS [英] IE11 Ignoring Inline CSS

查看:102
本文介绍了IE11忽略内联CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正在此处开发的站点: http://new.brushman.com/about/

CMS允许逐页添加嵌入式CSS.加载所有其他.css文件后,此CSS将添加到页面.

即使它在8、9、10,Edge和其他所有版本(Chrome,Firefox,Safari等)中都可以使用,IE11仍会忽略其样式

内联CSS是:

<style>
/* CMS Page about CSS */
main {background: #d70055;}
</style>

并且位于之后所有css文件都已加载

有趣的是,inspect元素在背景上显示了一个选中标记,它位于列表的顶部,指示其优先级最高.

没有不透明的元素覆盖该元素.

我尝试过的一些事情: !重要的 删除评论 添加其他新行 使用rgba

完全而彻底地陷入困境.

解决方案

这应该有效:

main {
    display: block;
    background: #d70055;
}

IE不会将未知类型的元素视为块元素-就像< main>元素.

Site being developed here: http://new.brushman.com/about/

The CMS allows adding of in-line CSS on a page by page basis. This CSS is added to the page after all other .css files are loaded.

IE11 is ignoring the style, even-though it works in 8, 9, 10, Edge, and all the rest (Chrome, Firefox, Safari, etc)

The inline CSS is:

<style>
/* CMS Page about CSS */
main {background: #d70055;}
</style>

and is in the after all the css files are loaded

The interesting thing is that inspect element shows the background with a checkmark, and it's at the top of the list indicating it has the highest priority.

There are no opaque elements covering the element.

Some things I've tried: !important removing the comments adding additional new lines using rgba

Completely and thoroughly stumped.

解决方案

This should work:

main {
    display: block;
    background: #d70055;
}

IE does not treat unknown types of elements as block elements - just like the <main> element in this case.

这篇关于IE11忽略内联CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆