异想天开,尝试了下这个方法,结果就像图片那样?求大神指点下
<!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>三列布局</title>
<style>
body{margin: 0;padding: 0;}
.left,.right,.main{height: 600px;}
.left{width:20%;float: left;background: red;}
.main{width:60%;margin: 0 auto;background: blue;}
.right{width:20%;float:right;background: black;}
</style>
</head>
<body>
<div class="left">left</div>
<div class="main">main</div>
<div class="right">right</div>
</body>
</html>
(图截取了一部分)