div模拟table,可实现左右高度同增长(html布局)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>div模拟table,可实现左右高度同增长</title>
<style type="text/css">
body{
background: #ccc;
}
.box{
width: 800px;
background: #999;
margin: 0 auto;
}
.div-tabel{
display: table;
width: 800px;
border-spacing:20px;/*边距*/
}
.div-tabel-row{
display: table-row;
}
.div-table-cell{
display: table-cell;
background: #fff;
width: 50%;
padding: 20px;
}
</style>
</head>
<body>
<div class="box">
<div class="div-tabel">
<div class="div-tabel-row">
<div class="div-table-cell">
<p>div模拟table,可实现左右高度同增长div模拟table,可实现左右高度同增长</p>
</div>
<div class="div-table-cell">
<p>div模拟table,可实现左右高度同增长div模拟table,可实现左右高度同增长div模拟table,可实现左右高度同增长div模拟table,可实现左右高度同增长div模拟table,可实现左右高度同增长div模拟table,可实现左右高度同增长</p>
</div>
</div>
</div>
</div>
</body>
</html>
效果: