css div搭左中右三个相等的框架
1个回答
展开全部
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=yes" />
<title>div</title>
<style>
#main{width:100%;height:500px;}
#main>div{float:left;width:33.33%;height:500px;line-height:500px;text-align:center;color:#ffffff;}
.left{background:#ff0000;}
.center{background:#00ff00;}
.right{background:#0000ff;}
</style>
</head>
<body>
<div id="main">
<div class="left">左</div>
<div class="center">中</div>
<div class="right">右</div>
</div>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询