<%--
Created by IntelliJ IDEA.
User: zhuhongbo
Date: 2021/5/30
Time: 17:32
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
<style type="text/css">
<!--
@import url("style.css");
-->
</style>
</head>
<body>
<div class="header">
</div>
<div class="navigator">
<ul class="navigator">
<li><a href="#">首页</a></li>
<li><a href="#">文章</a></li>
<li><a href="#">相册</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">论坛</a></li>
<li><a href="#">帮助</a></li>
</ul>
</div>
<div class="content">
<h3>前言</h3>
<p>CSS是英文Cascading Style Sheet的缩写,又称“层叠样式表”,简称为样式表</p>
<h3>理解DIV+CSS布局</h3>
<p>简单地说DIV+CSS被称为“web"标准中的常用术语</p>
</div>
<div class="footer">
<p>关于|广告服务|招聘|客服中心|QQ留言|网站管理|会员登录|购物车</p>
<p>CooyRight 清华大学出版社</p>
</div>
</body>
</html>
```css
body
{
font-family: Arial,Helvetica,sans-serif;
font-size: 12px;
margin: 0px;
height: auto;
width: 800px;
border: 1px solid #006633;
}
.header
{
height: 100px;
width: 800px;
background-image:url("/image/model.JPG");
background-repeat: no-repeat;
margin: 0px 0px 3px 0px;
}
.navigator
{
height: 25px;
width: 800px;
font-size:14px ;
list-style-type: none ;
}
.navigator li
{
float: left;
}
.navigator li a
{
color: #000000;
text-decoration: none;
padding-top:4px ;
display: block;
width: 131px;
height: 22px;
text-align: center;
background-color: #009966;
margin-left: 2px ;
}
.navigator li a:hover
{
background-color: #006633;
color: #FFFFFF;
}
.content
{
height: auto;
width: 780px;
line-height: 1.5em;
padding: 10px;
}
.content p
{
text-indent: 2em;
}
.content h3
{
font-size: 16px;
margin: 10px;
}
.footer
{
height: 50px;
width: 780px;
line-height: 2em;
text-align: center;
background-color: #009966;
padding: 10px;
}
*
{
margin: 0px;
padding: 0px;
}
效果图:
