zoukankan      html  css  js  c++  java
  • flex

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8"> 
    <title>菜鸟教程(runoob.com)</title>
    <style> 
    #main
    {
        width:220px;
        height:300px;
        border:1px solid black;
        display:flex;
    }
    
    #main .a
    {
        width:150px;
        flex:none;
    }
    #main .b
    {
        flex:1;
    }
    </style>
    </head>
    <body>
    
    <div id="main">
      <div class='a' style="background-color:coral;">红色</div>
      <div class='b' style="background-color:lightblue;">蓝色</div>  
     
    </div>
    
    <p><b>注意:</b> Internet Explorer 9 及更早版本不支持 flex 属性。</p>
    <p><b>注意:</b> Internet Explorer 10 通过 -ms-flex 属性来支持。 IE11 及更新版本完全支持 flex 属性 (不需要 -ms- 前缀)。</p>
    <p><b>注意:</b> Safari 6.1 (及更新浏览器) 通过 -webkit-flex 属性支持。</p>
    
    </body>
    .container{  
            width:1000px;height:400px;border:1px solid red;  
            display:table;         /*table布局*/  
        }  
        .left{  
            width:200px; height:100%;background:gray;  
            display:table-cell;  
        }  
        .right{  
            height:100%;background:green;  
            display: table-cell;  
        } 
  • 相关阅读:
    1026 Table Tennis (30)
    1029 Median
    1025 PAT Ranking (25)
    1017 Queueing at Bank (25)
    1014 Waiting in Line (30)
    1057 Stack (30)
    1010 Radix (25)
    1008 Elevator (20)
    字母大小写转换
    Nmap的基础知识
  • 原文地址:https://www.cnblogs.com/-CLAY-/p/flex.html
Copyright © 2011-2022 走看看