display:flex - 在firefox 21中不起作用

时间:2013-05-31 04:58:26

标签: html css html5 css3 flexbox

根据this articledisplay:flex属性应该在firefox 21中没有任何前缀的情况下工作。但是,即使我在值之前使用-moz-,它也不会被HTML识别解析器。

我尝试卸载firefox 20并重新安装firefox 21,最近希望它可行,但事实并非如此。

使用Web开发人员工具时,我可以看到以下警告和错误:

[10:23:04.673] The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. @ `http://localhost/index.php`
[10:23:04.712] Error in parsing value for 'display'.  Declaration dropped. @ `http://localhost/index.css:6`

[10:23:04.712] Error in parsing value for 'display'.  Declaration dropped. @ `http://localhost/index.css:7`

[10:23:04.712] Unknown property 'flex-flow'.  Declaration dropped. @ `http://localhost/index.css:8`

[10:23:04.712] Error in parsing value for 'display'.  Declaration dropped. @ `http://localhost/index.css:16`

[10:23:04.712] Error in parsing value for 'display'.  Declaration dropped. @ `http://localhost/index.css:17`

[10:23:04.712] Error in parsing value for 'display'.  Declaration dropped. @ `http://localhost/index.css:22`

[10:23:04.712] Unknown property 'justify-content'.  Declaration dropped. @ `http://localhost/index.css:41`

[10:23:04.712] Unknown property 'flex'.  Declaration dropped. @ `http://localhost/index.css:109`

这些不是所有的错误,而是一些。谁能指出问题是什么?

提前致谢!

1 个答案:

答案 0 :(得分:5)

display: flex目前仅支持Firefox中的运行时标志。

要启用它,请在网址字段中输入about:config,搜索flexbox,然后将其设置为true。

默认情况下,它在Firefox Nightly中启用,因为它是一个非稳定版本。

默认情况下,它将在Firefox 22中启用,前提是该功能已准备好发货。