垂直居中css

发布时间:2020-08-01 04:37:57 作者:cui_jinfeng
来源:网络 阅读:397

.flex {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -moz-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-box-pack: center;
    -moz-box-pack: center;
    -ms-flex-align: center;
    /* IE 10 */
    -webkit-align-items: center;
    -moz-align-items: center;
    align-items: center;
}

推荐阅读:
  1. CSS未知高度垂直居中
  2. CSS垂直居中怎么实现

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

flex

上一篇:iOS优化内存,提升性能 之二

下一篇:23.swift继承

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》