English 中文(简体)
为什么Firefox用红色突出显示 HTML 过渡 doc 类型?
原标题:Why Firefox highlights HTML transitional doctype in red?

看来Firefox把它当做错误对待 这是什么意思?

""https://i.sstatic.net/rTozL.png" alt="此处输入图像描述"/ >

火药正常处理 如果我把它改成:

<!DOCTYPE html>
<html>

BTW Im on Firefox 12.0

最佳回答

如果你在红线上徘徊 法尔福克斯会给你答案

几乎标准模式 doctype 。 期待 “ <! DOCTYPE html> ”

查看源的标记也提示它的错误 doctype

<span class="error doctype" title="Almost standards mode doctype. Expected “<!DOCTYPE html>”.">
    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
</span> 

要点是, Firefox 想要 成为 < a href="https:// developmenter.mozilla.org/en/mozilla%27suirks_mode" rel = "noreferrer" > 标准模式 doc-type 。

更新 :

摘自上述给定链接。

The DOCTYPE shown in the example, <!DOCTYPE html>, is the simplest possible, and the one recommended by HTML5. Earlier versions of the HTML standard recommended other variants, but all existing browsers today will use full standards mode for this DOCTYPE, even the dated Internet Explorer 6. There are no valid reasons to use a more complicated DOCTYPE. If you do use another DOCTYPE, you may risk choosing one, which triggers almost standards mode or quirks mode.

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!