首页 > 代码库 > 左右等高布局

左右等高布局

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Examples</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link rel="stylesheet" type="text/css" href="http://www.mamicode.com/style/reset.css">
</head>
<body>
<style>
.equBox {width: 100%;overflow: hidden;}
.equLeft,.equRight {
margin-bottom: -100000px;/*数值随便设置,越大越好,也就是(-padding-bottom值)*/
padding-bottom: 100000px;/*数值随便设置,越大越好*/
}
</style>
<div class="equBox clearfix">
<div class="fl equLeft" style="background:#fd8023;width:60%;" >
111111111111111<br/>1111111111111111111<br/>1111111111111111111<br/>1111111111111111111<br/>11111111111111111111111<br/>
1111<br/>1111<br/>1111<br/>1111<br/>1111<br/>1111<br/>1111<br/>1111<br/>
</div>
<div class="fl equRight" style="background:#e11da7;width:40%;">
2222222<br/>2222222<br/>2222222<br/>2222222<br/>
</div>
</div>
</body>
</html>

技术分享

 

左右等高布局