如何选择Firefox和Chrome文档模式不设置DOCTYPE? [英] How to select Document Mode in Firefox and Chrome without setting a DOCTYPE?

查看:488
本文介绍了如何选择Firefox和Chrome文档模式不设置DOCTYPE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作转换一个网页,使用旧的Web标准,支持现代Web浏览器创建。该网页目前呈现在Quirks模式在Internet Explorer中9,火狐和Chrome。

I am working on converting a web page that was creating using old web standards to support modern web browsers. The web page currently renders in Quirks Mode within Internet Explorer 9, Firefox, and Chrome.

在IE9中,我能够选择文档模式中,我想在网页我查看渲染。这使事情变得更容易,因为我可以怪癖模式和IE9标准模式之间跳转。我没有到网页的code中添加/修改DOCTYPE标签。

In IE9, I am able to select the "Document Mode" in which I would like the web page I am viewing to render in. This makes things easier, as I can jump between Quirks Mode and IE9 Standards Mode. I do not have to add/modify the DOCTYPE tag within the code of the web page.

我可以做同样的在Firefox和Chrome?

Can I do the same in Firefox and Chrome?

推荐答案

没有。在大多数浏览器的除IE-有三种不同的模式:

No. In most browser–except IE–there are three different modes:

这就是浏览器故意不遵循一定的标准,以与破碎的内容兼容。 IE< 10在IE5.5时代的怪癖模式冻结。其他浏览器的怪癖模式,包括IE10已经发展到可互操作的对方,所以他们更predictable方式打破。

This is where browsers wilfully do not follow certain standards in order to be compatible with broken content. IE < 10 is frozen in IE5.5 era quirks mode. Other browser’s quirks mode, including IE10 have evolved to be interoperable with each other, so they break in more predictable ways.

设置怪癖模式是不是不包括文档类型,或包含DOCTYPE之前内容的常用方法。

The usual method of setting quirks mode is not not include a doctype, or include content before the doctype.

强烈推荐的的依靠怪异模式渲染。

It is highly recommended not to rely on quirks mode rendering.

这使得像标准模式下,除了表格单元格的垂直尺寸的行为。

This renders like standards mode, except the behaviour of vertical sizing of table cells.

随着一个DOCTYPE触发:

Triggered with a doctype of:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

标准模式

这是模式的开发人员应该使用,与浏览器行为的界定标准。通过使用一个有效的文档类型,如触发&LT;!DOCTYPE HTML&GT;

有没有办法设置非IE浏览器的任何其他模式。你可以找到更多在 http://hsivonen.iki.fi/doctype/

There is no way to set any other modes in Non-IE browsers. You can find out more at http://hsivonen.iki.fi/doctype/

我建议只是尝试更新网站的标准模式,如果可以的话,因为这只会导致更多的问题的时间越长它是在传统渲染模式离开。它也不会利用增强的现代版本的IE,如性能改进。

I’d advise just to try to update the site to standards mode if you can, as it will only cause more issues the longer it is left in legacy rendering modes. It will also not take advantage of enhancements in modern versions of IE, such as performance improvements.

这篇关于如何选择Firefox和Chrome文档模式不设置DOCTYPE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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