关于flex布局中的兼容性问题

  这几天在做项目中用到了flex布局,但是在测试的过程中发现他的兼容性实在是太差了,仅仅用到水平和垂直居中的样式,没想到兼容性代码就写了好几行。

  display:flex;

 display:-webkit-box;
 display: -moz-box;
 display: -ms-flexbox;
 display: -webkit-flex;
 display: flex;

  justify-content:center;

-webkit-justify-content:center;
justify-content:center;
-moz-box-pack:center;
-webkit--moz-box-pack:center;
box-pack:center;

  align-items:center;

align-items:center;
-webkit-align-items:center;
box-align:center;
-moz-box-align:center;
-webkit-box-align:center;

  此结论都来源于百度,资料网址为 https://www.cnblogs.com/yangjie-space/p/4856109.html

posted @ 2018-01-18 13:35  ~逍遥★星辰~  阅读(1182)  评论(0编辑  收藏  举报