1

根据这篇文章,该display: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`

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

提前致谢!

4

1 回答 1

5

display: flex目前仅在 Firefox 的运行时标志后面受支持。

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

它在 Firefox Nightly 中默认启用,因为它是一个不稳定的版本。

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

于 2013-05-31T05:31:36.533 回答