美文网首页
2019-05-25 flex布局

2019-05-25 flex布局

作者: DreamNeverDie | 来源:发表于2019-05-25 06:16 被阅读0次
    <!DOCTYPE html>
    <html>
      <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,user-scalable=0,initial-scale=1.0">
        <style media="screen">
        * {margin:0; padding:0; list-style: none;}
    
        .ul1 {display:flex;}
        .ul1 li {flex:1; background:#CCC; border:1px solid black; text-align: center; line-height:30px; margin:10px auto;}
        </style>
        <title></title>
    
      </head>
      <body>
        <ul class="ul1">
          <li style="flex:1;">111</li>
          <li style="flex:2;">222</li>
          <li style="flex:1;">333</li>
        </ul>
        <ul class="ul1">
          <li>111</li>
          <li>222</li>
        </ul>
        <ul class="ul1">
          <li>111</li>
          <li>222</li>
          <li>333</li>
          <li>444</li>
          <li>555</li>
        </ul>
      </body>
    </html>
    
    

    相关文章

      网友评论

          本文标题:2019-05-25 flex布局

          本文链接:https://www.haomeiwen.com/subject/uboozqtx.html