常用css3代码

flex垂直居中

在父层使用,内容即可居中

    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
     
     /* 水平居中*/
     -webkit-box-align: center;
     -moz-box-align: center;
     -ms-flex-pack:center;/* IE 10 */
     
     -webkit-justify-content: center;
     -moz-justify-content: center;
     justify-content: center;/* IE 11+,Firefox 22+,Chrome 29+,Opera 12.1*/
     
     /* 垂直居中 */
    -webkit-justify-content: space-around;
    -ms-flex-pack: distribute;
    justify-content: space-around;
    -webkit-box-align: center; 
    -webkit-align-items: center; 
    -ms-flex-align: center;
    align-items: center;
posted @ 2016-10-01 10:20  5811  阅读(207)  评论(0)    收藏  举报