HTML5标签在firefox 3.6.3中根本不起作用 [英] HTML5 tags not working at all in firefox 3.6.3
问题描述
好吧,我正试图进入整个HTML 5的事情,而本教程( http://www.webreference.com/authoring/languages/html/HTML5/ )表示,这些标签应该移动内容而没有任何类型的CSS,但我所得到的是一行文本,如下所示:
Okay, so I'm trying to get into this whole HTML 5 thing, and this tutorial (http://www.webreference.com/authoring/languages/html/HTML5/) says that these tags should move the content around without any kind of CSS at all, but all I'm getting is a line of text that looks like this:
Header tag Nav tag Artical Section tags Aside tag footer tag
以下是代码:
Here is the code:
<!DOCTYPE html>
<html lang="en">
<head>
<title>HTML5 test1</title>
<meta charset="utf-8" />
</head>
<body>
<header>
Header tag
</header>
<nav>
Nav tag
</nav>
<article>
<section>
Artical Section tags
</section>
</article>
<aside>
Aside tag
</aside>
<footer>
footer tag
</footer>
</body>
</html>
推荐答案
Firefox 3.6不支持HTML 5分段元素。您必须手动将标签样式设置为块级别:
Firefox 3.6 doesn't support HTML 5 sectioning elements yet. You will have to manually style the tags to be block level:
article, aside, canvas, details,
figcaption, figure, footer, header,
hgroup, nav, section, summary, video {
display: block;
}
然而,您不需要HTML填充程序;这只是为了IE。
You won't need the HTML shim, however; that's just for IE.
这篇关于HTML5标签在firefox 3.6.3中根本不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!