• 居中样式


    每次都要纠结半天,这个居中。

    一、子元素不固定

    1   .pro-car-inner{//子元素

    max-1000px;

    color:#fff;

    position:absolute;

    top:150px; left:0;

    bottom:0; right:0;

    margin:auto;
                 }//这种无法垂直居中  都兼容

     2.

      .pro-car-con{height:500px;100%; justify-content:center;align-items:center;display:flex;}  //IE无法兼容

    3  .sol-main {//父元素
       height: 500px;
        100%;
       -webkit-box-align: center;
       -webkit-box-pack: center
       display: -webkit-box;
       text-align: center;//无法兼容ie
  • 相关阅读:
    739. Daily Temperatures
    535. Encode and Decode TinyURL
    811. Subdomain Visit Count
    706. Design HashMap
    C++-static作用(转)
    大学四年应当如何渡过(转)
    计算机导论第八章-总结
    计算机导论第四章习题
    计算机导论-第一章习题
    20世纪最伟大的十大算法
  • 原文地址:https://www.cnblogs.com/cindy-hmy/p/6599918.html
Copyright © 2020-2023  润新知