开发者

How to center a flexible box in the document?

Today, while working with flexible box model in FF4, I noticed that I can't center a container in the docu开发者_如何学JAVAment using margin: 0 auto;.

Does anybody know any way of centering this container? In Webkit it works as expected.


Try this:

for FF

display: -moz-box;
-moz-box-orient: horizontal;
-moz-box-pack: center;
-moz-box-align: center;

for normal case

display: box;
box-orient: horizontal;
box-pack: center;
box-align: center;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜