2019-05-25 flex布局
2019-05-25 本文已影响0人
DreamNeverDie
<!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>