帮我写一个html图书页面
时间: 2023-12-19 11:06:07 浏览: 82
book_图书馆HTML页面_
5星 · 资源好评率100%
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>图书页面</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #2f4f4f;
color: #fff;
padding: 10px;
text-align: center;
}
nav {
background-color: #ddd;
padding: 10px;
text-align: center;
}
nav ul {
list-style: none;
margin: 0;
padding: 0;
}
nav li {
display: inline-block;
margin-right: 10px;
}
nav a {
color: #333;
text-decoration: none;
padding: 5px;
}
nav a:hover {
background-color: #333;
color: #fff;
}
.container {
margin: 10px auto;
padding: 10px;
width: 90%;
max-width: 800px;
}
h1 {
font-size: 32px;
margin: 0 0 10px;
padding: 0;
}
h2 {
font-size: 28px;
margin: 0 0 10px;
padding: 0;
}
h3 {
font-size: 24px;
margin: 0 0 10px;
padding: 0;
}
p {
font-size: 16px;
line-height: 1.5;
margin: 0 0 10px;
padding: 0;
}
table {
border-collapse: collapse;
margin: 0 0 10px;
padding: 0;
width: 100%;
}
th, td {
border: 1px solid #ccc;
padding: 5px;
text-align: left;
}
th {
background-color: #eee;
}
footer {
background-color: #2f4f4f;
color: #fff;
padding: 10px;
text-align: center;
}
</style>
</head>
<body>
<header>
<h1>图书页面</h1>
</header>
<nav>
<ul>
<li><a href="#">首页</a></li>
<li><a href="#">图书列表</a></li>
<li><a href="#">关于我们</a></li>
<li><a href="#">联系我们</a></li>
</ul>
</nav>
<div class="container">
<h2>图书列表</h2>
<table>
<thead>
<tr>
<th>图书名称</th>
<th>作者</th>
<th>ISBN</th>
</tr>
</thead>
<tbody>
<tr>
<td>《JavaScript高级程序设计》</td>
<td>Nicholas C. Zakas</td>
<td>9787121270629</td>
</tr>
<tr>
<td>《JavaScript权威指南》</td>
<td>David Flanagan</td>
<td>9787121272623</td>
</tr>
<tr>
<td>《CSS禅意花园》</td>
<td>Dave Shea, Molly E. Holzschlag</td>
<td>9787115234834</td>
</tr>
</tbody>
</table>
</div>
<footer>
<p>© 2021 图书页面</p>
</footer>
</body>
</html>
阅读全文