您的位置:首页 > 其它

两列自适应布局最佳方法

2016-01-06 14:25 246 查看
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<style>
.clearfix:after {
content: '';
display: table;
clear: both;
}

.clearfix {
*zoom: 1;
}

.cr {
background-color: red;
}

.cg {
background-color: green;
}

.float-left {
float: left;
margin-right: 10px;
width: 100px;
height: 300px;
}

.auto-right {
display: table-cell;
width: 10000px;
height: 200px;
}
</style>
</head>

<body>
<div class="clearfix">
<div class="float-left cr"></div>
<div class="auto-right cg"></div>
</div>
</body>

</html>


  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: