<!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=gb2312" />
<title>Untitled Document</title>
</head>
<body style="height:100%; margin:0;">
<div style="width:100%; margin:0 auto; text-align:center; background:#FF9400; height:100px; position:absolute; top:0; line-height:100px;">head</div>
<div style="width:100%; margin:0 auto; background:#eee; height:100%;">
<div style="height:101px; background:#fff;"></div>
<div style="height:101px; background:#eee;"></div>
</div>
<div style="width:100%; margin:0 auto; text-align:center; background:#f00; height:100px; position:absolute; bottom:0; line-height:100px;">foot</div>
</body>
</html>
层div高度100%的一种,用绝对层遮罩上下
最新推荐文章于 2020-12-15 17:33:19 发布