zoukankan      html  css  js  c++  java
  • 解决iPhone5,使用display:flex 弹性盒模型的兼容问题

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <style type="text/css">
    /* ============================================================
       flex:定义布局为盒模型
       flex-v:盒模型垂直布局
       flex-1:子元素占据剩余的空间
       flex-align-center:子元素垂直居中
       flex-pack-center:子元素水平居中
       flex-pack-justify:子元素两端对齐
       兼容性:ios 4+、android 2.3+、winphone8+
       ============================================================ */
    .flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}
    .flex-v{-webkit-box-orient:vertical;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
    .flex-1{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;}
    .flex-align-center{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;}
    .flex-pack-center{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}
    .flex-pack-justify{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}
    </style>
    </head>
    <body>
    
    <div class="flex flex-pack-justify">
        <div>模块一</div>
        <div>模块二</div>
        <div>模块三</div>
        <div>模块四</div>
    </div>
    
    </body>
    </html>

     原文参考:http://www.qdfuns.com/notes/20002/46408b08fc7920240ce666df159e0af3.html  /   http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html?utm_source=tuicool

  • 相关阅读:
    Java并发编程:volatile关键字解析(转)
    Java并发编程 Synchronized及其实现原理
    (a++)+(++a)=?
    Java集合中那些类是线程安全的
    Servlet 与 CGI 的比较
    JAVA中常见的锁以及其特性
    总结一下hashMap和hashtable方面的知识点
    Which statement is true?
    下面哪段程序能够正确的实现了GBK编码字节流到UTF-8编码字节流的转换:
    Kafka 详解(转)
  • 原文地址:https://www.cnblogs.com/xushengguan/p/7464787.html
Copyright © 2011-2022 走看看