XHTML Strict 在 Quirks 模式下无法正确呈现
当 XHTML Strict 被认为是适用于所有平台的正确标记时,我的 XHTML 1.0 Strict 网页在 Quirks 模式下的呈现方式确实有所不同。
我做错了什么吗?该页面在 W3C 中完美验证!
为那些在链接页面更改后引用此问题的人进行编辑:
原始标记包含带有浮动元素的嵌套 DIV。我没有为所有可能的元素指定“宽度”属性,这在某种程度上触发了旧浏览器(包括 IE 7.0)中渲染的差异。
When XHTML Strict is considered to be a proper markup that works across all platforms, my webpage that's in XHTML 1.0 Strict does render differently in Quirks mode.
Am I doing something wrong? The page perfectly validates in W3C!
EDITED FOR THOSE WHO REFER TO THIS QUESTION AFTER THE LINKED PAGE HAS CHANGED:
The original markup contained nested DIVs with floated elements. I did not specify 'width' property for all possible elements and that somehow triggered a difference in rendering in old browsers including IE 7.0.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定您的问题到底是什么,但怪癖模式适用于遗留网页,并且通常用户代理支持表格布局中使用的老式布局技术。处于标准模式的基于现代标准的网页不依赖于这些。
现代布局在怪异模式下可能看起来不正确,只是因为它不是为此构建的。或者我误解了这个问题?
哦,即使您的页面完全有效,也不意味着您的布局是“完美的”,也不意味着所有浏览器都会以相同的方式呈现它。
Not sure exactly what your question is but quirks mode is intended for legacy web pages and usually user agents support oldschool layout techniques that were used in tabular layouts. Modern standards based web pages which are in standards mode do not rely on those.
A modern layout might not look correct in quirks mode just simply because it isn't built for it. Or did I misunderstand the question?
Oh and even if your page is perfectly valid that doesn't mean your layout is "perfect" or that it will be rendered by all browsers the same exact way.