一个简单的网页布局模板

前端 9 浏览 2 分钟阅读

一个简单的网页布局模板。

<!DOCTYPE html>
<html>
<head>
<title>模板</title> 

<link type="text/css" rel="styleSheet"  href="/home/pi/temp/style.css" />
</head>
<body> 
<div class="wrap">
  <div class="header"></div>
  <div class="middle"></div>
  <div class="footer"></div>
</div>
</body>
</html>

style.css的内容,调用方式见上面:

*{
  padding:0;
  margin:0;
}

.wrap{
  width:990px;
  _height:600px;
  _background:red;
  margin:0 auto;
}

.header{
  height:200px;
  background:blue;
}

.middle{
  height:400px;
  background:green;
  margin:10px 0;
}

.footer{
  height:100px;
  background:yellow;
}

效果展示:

0

  1. This post has no comment yet

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

相关文章