css怎么实现三列充满整个窗口,不出现滚动条的布局.请给实例,谢谢
1个回答
展开全部
<!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>abc</title>
<style>
html, body
{
margin: 0;
padding: 0;
height: 100%;
}
.left
{
background-color: #ff0000;
height: 100%;
width: 200px;
position: absolute;
top: 0;
left: 0;
}
.center
{
background-color: #ffff00;
height: 100%;
margin-left: 200px;
margin-right: 200px;
margin-top: 0;
padding: 0;
}
.right
{
background-color: #00ffff;
height: 100%;
width: 200px;
position: absolute;
top: 0;
right: 0;
}
</style>
</head>
<body>
<div class="left">
</div>
<div class="center">
</div>
<div class="right">
</div>
</body>
试试看
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>abc</title>
<style>
html, body
{
margin: 0;
padding: 0;
height: 100%;
}
.left
{
background-color: #ff0000;
height: 100%;
width: 200px;
position: absolute;
top: 0;
left: 0;
}
.center
{
background-color: #ffff00;
height: 100%;
margin-left: 200px;
margin-right: 200px;
margin-top: 0;
padding: 0;
}
.right
{
background-color: #00ffff;
height: 100%;
width: 200px;
position: absolute;
top: 0;
right: 0;
}
</style>
</head>
<body>
<div class="left">
</div>
<div class="center">
</div>
<div class="right">
</div>
</body>
试试看
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询