HTML 网页结构
怎么做出这样的效果,以下代码分享
<!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>无标题文档</title>
<style>
body{background-color:#CCC;border:1px double black;height:500px;}
#header{background-color:#CCC;border:1px double black;height:150px;width:70%;margin:20px auto;}
.demo{background-color:#CCC;border:1px double black;height:40px;width:70%;margin:35px auto;line-height:40px;padding-left:8px;}
#body{background-color:#FFF;border:1px double black;height:250px;width:70%;margin:20px auto;}
.demo1{background-color:#FFF;border:1px double black;height:40px;width:70%;margin:20px auto;line-height:40px;padding-left:8px;}
</style>
</head>
<body>
<html>
<div id="header">
<head>
<p class="demo"><title>页面标题</title></p>
</head>
</div>
<div id="body">
<body>
<p class="demo1"><h2>这是一个标题</h2></p>
<p class="demo1"><p>这是一个段落。</p></p>
<p class="demo1"><p>这是另外一个段落。</p></p>
</body>
</div>
</html>
</body>
</html>
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。