有没有办法在渲染 XML 时避免 IE7 怪异模式? CSS?
我有一些使用 CSS xml 样式表声明设置样式的 DocBook 文档。它在 Firefox 中看起来很棒,但 IE7 似乎无法理解 CSS 子选择器(例如 section > title { ... }
)。
我认为这是因为 IE 正在怪异模式下运行来呈现此 XML,而旧版本的 IE 根本不支持该 CSS 语法。
我在网上找到的页面似乎都专注于 HTML 和 XHTML 文档类型以及 IE 在给定这些值的各种排列的情况下将如何表现。我找不到任何有关直接 XML + CSS 的信息。更糟糕的是,随机 XML 文档似乎总是以怪异模式结束,无论它们具有什么格式或样式表指令。
IE 中的 XML 渲染是否注定要兼容 IE5.5?我真的需要重写 CSS 吗?
I've got some DocBook documentation styled with a CSS xml-stylesheet declaration. It looks great in Firefox, but IE7 doesn't seem to understand the CSS child selectors (e.g. section > title { ... }
).
I think this is because IE is running in quirks mode to render this XML, and older versions of IE didn't support that CSS syntax at all.
The pages I found on the web all seem to focus on HTML and XHTML doctypes and how IE will behave given various permutations of these values. I couldn't find any information about straight XML + CSS. Worse yet, it seems that random XML documents always end up in quirks mode, no matter what format or stylesheet directives they have.
Is XML rendering in IE doomed to be IE5.5 compatible? Will I really have to rewrite my CSS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您能解释一下,究竟是什么出了问题吗?根据文档,IE7 似乎支持子选择器:
http://msdn.microsoft.com/en-我们/库/bb250496%28VS.85%29.aspx
Can you please explain, what exactly works wrong? IE7 seem like supporting child selectors according to the docs:
http://msdn.microsoft.com/en-us/library/bb250496%28VS.85%29.aspx