仅在 IE 7 中出现混乱的布局
我正在 IE 9 中编写一个网站。布局在 IE 9 和 IE 8 以及 IE 6 中看起来很完美,但在 IE 7 中完全混乱。此外,问题是当我按下 IE 9 中的兼容性按钮时 - 布局混乱得难以理解。我的问题是 - 当按下 IE 9 中的兼容性按钮时,如何才能使布局正常。谢谢,问候!
I am coding a site in IE 9. The layout looks perfect in IE 9 and IE 8 as well as IE 6 BUT it's completely messed up in IE 7. Also, the issue is when I press the compatibility button in IE 9 - the layout is messed up beyond comprehension..My question is - how can you make the layout ok when one presses compatibilty button in IE 9. Thank you , regards !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
所有版本的 Internet Explorer 都有不同的渲染错误集,浏览器越旧,错误就越多。
如果您正在开发一个网站,使其在 IE 中看起来不错,那么您很可能利用了一些渲染错误。这意味着它在另一个版本的 IE 中看起来会有所不同,并且在任何更好地遵循 Web 标准的浏览器中看起来会完全扭曲。
您不应该利用渲染错误,而应该避免在 IE 中与其他浏览器工作方式不同的事情。这样就可以构建既可以在不同 IE 版本也可以在其他浏览器中运行的网站。
您还应该使用其他浏览器进行测试,例如 Firefox、Chrome 或 Opera。另外验证 HTML 和验证 CSS 也是查找代码问题的好工具。
您不应该担心兼容性按钮。这是针对无法应对标准合规模式的页面。如果您的页面在标准合规模式下正确呈现,则您可以添加 元禁用兼容性按钮的标记。
All versions of Internet Explorer have different sets of rendering bugs, and the older the browser, the more bugs there are.
If you are developing a site so that it looks good in IE, you have most likely taken advantage of some of the rendering bugs. This means that it will look different in another version of IE, and it will look completely warped in any browser that better follows the web standards.
You should not take advantage of the rendering bugs, but instead avoid things that works differently in IE compared to other browsers. That way it's possible to build sites that both work in different IE versions and also in other browsers.
You should have another browser to test in also, like Firefox, Chrome or Opera. Also verifying the HTML and verifying the CSS are also good tools for finding problems with the code.
You should not bother about the compatibility button. That is for pages that can't cope with standards compliance mode. If your page renders correctly in standards compliance mode, then you can add the meta tag that disables the compatibility button.
这很容易做到。将此代码直接放在您的开始
标记之后:
它的作用是强制浏览器使用其可用的最高标准。
It is quite easy to do. Put this code directly after your opening
<head>
tag:What this does is forces the browser to use the highest standards it has available to it.