+ -
当前位置:首页 → 问答吧 → DIV+CSS 适应浏览器大小

DIV+CSS 适应浏览器大小

时间:2011-09-09

来源:互联网

<!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>www.zishu.cn</title>
<style>
body{
margin:0;
padding:0;
}
div{width:50%}
.tou{
height:100px;
background-color:#00CCFF;
width:auto;
}
.left {
       float:left;
       width:200px;
       background-color:#99CC00;
       height: 600px;
}
.zj{
       width:30%;
       height:600px;
       float:left;
       background-color:#99FF00;
}
.right{
       width:289px;
       height:600px;
       float:right;
       background-color:#999999;
}
.right2{
       width:33%;
       height:600px;
       float:left;
       background-color:#FF9900;
}
</style>
</head>
<body>
<div class="tou">我是头部</div>
<div class="left">我固定不动的</div>
<div class="zj">我是跟着浏览器变化的</div>
<div class="right2">我也是跟着浏览器变化的</div>
<div class="right">我是固定不动的</div>
</body>
</html>
浏览器缩小

作者: lili881217   发布时间: 2011-09-09

楼主真有意思。想告诉我们什么?

作者: jokkkka   发布时间: 2011-09-11