61,112
社区成员
发帖
与我相关
我的任务
分享
<%@ page language="java" contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml2.dtd">
<html>
<head>
</head>
<body style="margin: 0px;padding: 0px;overflow: hidden;">
<table width="100%" height="100%" align="center" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="100%" height="100" id="top">
这是顶部
</td>
</tr>
<tr>
<td width="100%" height="40" id="center">
这是中部
</td>
</tr>
<tr>
<td width="100%" height="100%" id="bottom">
这是底部
</td>
</tr>
</tbody>
</table>
</body>
</html>
<%@ page language="java" contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml2.dtd">
<html>
<head>
<style type="text/css">
html{
height: 100%;
}
.top {
position: absolute;top: 0px;right: 0px;left: 0px;height: 100px;width: 100%;overflow: hidden;
}
.center {
position: absolute;top: 100px;right: 0px;left: 0px;height: 40px;width: 100%; overflow: hidden;
}
.bottom {
position: absolute;top: 140px;right: 0px;bottom: 0px;left: 0px;height: 100%;width: 100%;overflow: auto;
}
</style>
</head>
<body style="margin: 0px;padding: 0px;overflow: hidden;">
<div class="top">
这是顶部
</div>
<div class="center">
这是中部
</div>
<div class="bottom">
这是底部
</div>
</body>
</html>
html,body
{
margin:0px;
padding:0px;
text-align:center;
width:1024px;
}
#top
{
postion:absolute;
top:0px;
height:200px;
width:100%;
}
#bottom
{
postion:absolute;
bottom:0px;
height:200px;
width:100%;
}
#middle
{
width:100%;
height:100%;
background-color:red;
}
<html>
<head>示例</head>
<body>
<div id="top">顶部</div>
<div id="middle">中部</div>
<div id="">底部</div>
</body>
</html>
<html>
<head>
<style type="text/css">
html{
height: 100%;
}
.content {
height:100%; width:100%; overflow: hidden;
}
.top {
height:100px; width:100%; overflow: hidden;
}
.center {
height:40px; width:100%; overflow: hidden;
}
.bottom {
height:100%; width:100%; overflow:hidden;
}
</style>
</head>
<body>
<div class="content">
<div class="top">
这是顶部
</div>
<div class="center">
这是中部
</div>
<div class="bottom">
这是底部
</div>
</div>
</body>
</html>