另类圣杯布局
2016-11-28 本文已影响41人
郑伟的菜园子
这个是在研究国美移动端的时候测出来的,之前真没这样想过,太牛逼了
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<style>
*{
margin: 0;
padding: 0;
}
.left{
float: left;
height: 50px;
background: green;
}
.right{
float: right;
height: 50px;
background: pink;
}
.center{
height: 50px;
background: blue;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="left">a</div>
<div class="right">c</div>
<div class="center">b</div>
</div>
</body>
</html>