什么使Internet Explorer进入怪异模式? [英] What throws Internet Explorer into quirks mode?

查看:147
本文介绍了什么使Internet Explorer进入怪异模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个在firefox,chrome等中正确呈现的网页( http://www.snow4life.yum.pl )。当然,笨重的IE复杂的东西,因为它进入quirk模式自动,即使正确设置了doctype并且网站通过 w3验证(有一个错误缺少某个字符,在十六进制编辑器中清除)。如何停止即进入怪异模式?有什么办法吗?

I have created a webpage (http://www.snow4life.yum.pl) that was rendered properly in firefox, chrome etc. Of course dumb IE complicated things, because it enters quirk mode automatically, even though doctype is properly set and site goes through w3 validation (there is one error of missing some char, but file was cleared in hex editor). How can I stop ie from entering quirks mode ? Is there any way ?

推荐答案

尝试在DOCTYPE之前清除所有空格。

Try killing all the whitespace before the DOCTYPE.

EDIT:有一个< feff> 字符,它是文件开头的Unicode BOM签名。由于您可能没有实际可以看到的文本编辑器,请尝试删除整个第一行并用

There is an <feff> character which is a Unicode BOM signature at the start of the file. Since you may not have a text editor that can actually see that, try deleting the entire first line and paste over it with

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

并且不要使用BOM unicode签名保存文件。如果这不起作用,请尝试使用不同的文本编辑器。

And do NOT save the file with a BOM unicode signature. If this doesn't work, try a different text editor altogether.

这篇关于什么使Internet Explorer进入怪异模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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