静态网页设计html css:个人旅游图片博客HTML5 用DIV+CSS技术设计的个人网站(web前端网页制作课作业)
以下是一个使用HTML5和CSS3技术设计的简单个人旅游图片博客的示例代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>个人旅游图片博客</title>
<style>
body, html {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
}
.header {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px;
}
.nav {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}
.nav li {
float: left;
}
.nav li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
.nav li a:hover {
background-color: #111;
}
.content {
margin-left: 200px;
padding: 10px;
}
.sidebar {
background-color: #f2f2f2;
height: 100%;
width: 200px;
position: fixed;
top: 0;
left: 0;
overflow: auto;
}
.sidebar a {
display: block;
color: black;
padding: 16px;
text-decoration: none;
}
.sidebar a:hover:not(.active) {
background-color: #555;
color: white;
}
.main {
margin-left: 220px; /* Same as sidebar width */
padding: 10px;
}
.footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px;
position: fixed;
left: 0;
bottom: 0;
width: 100%;
}
</style>
</head>
<body>
<div class="header">
<h1>个人旅游图片博客</h1>
</div>
<div class="nav">
<ul>
<li><a href="#">首页</a></li>
<li><a href="#">旅行日志</a></li>
<li><a href="#">照片分享</a></li>
<li><a href="#">关于我们</a></li>
</ul>
</div>
<div class="content">
<div c
评论已关闭