网络设计作业(HTML CSS实现)

需积分: 0 1 下载量 11 浏览量 更新于2023-11-23 收藏 2.01MB DOCX 举报
ent .banner .text{ position:absolute; top:50%; left:50%; transform: translate(-50%,-50%); color:white; text-align:center; font-size:24px;}.content .banner .text p{ margin-bottom:20px;}.content .banner .text a{ display: inline-block; padding:10px 20px; background:white; color:black; text-decoration:none; border-radius: 5px;}.content .banner .text a:hover{ background:gray;}/* 相册 */.album{ display:flex; flex-wrap: wrap; justify-content: space-around;}.album img{ width: 30%; margin-bottom: 20px;}.album img:hover{ transform: scale(1.1);}/* 视频 */.video{ display:flex; flex-wrap: wrap; justify-content: space-around;}.video video{ width:45%; margin-bottom:20px;}/* 文字 */.text-section{ width:80%; margin:0 auto;}.text-section p{ font-size:20px; line-height: 1.5;}/* 关于 */.about-section{ width:80%; margin:0 auto;}.about-section h2{ font-size:25px; margin-bottom:10px;}【导航栏 foot 底部的 css 源代码】footer{ background:black; color:white; text-align:center; padding:20px 0; position:relative; bottom:0; width:100%;}footer p{ margin:0;}/* 导航栏 */nav{ display: flex; justify-content: space-around; background: #f4f4f4;}.nav a{ text-decoration:none; color: black; padding: 10px 20px;}.nav a:hover{ background:gray; color:white;} 二、html 文件 导航 foot 区的 css 源代码【首页】<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="style.css"> <title>Document</title></head><body> <div class="content"> <div class="banner"> <img src="banner.jpg" alt=""> <div class="text"> <p>Welcome to our website</p> <a href="#">Learn More</a> </div> </div> </div> <a href="#" class="button"> <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> </a></body></html>【相册】<!DOCTYPE html><html></html>【视频】<!DOCTYPE html><html></html>【文字】<!DOCTYPE html><html></html>【关于】<!DOCTYPE html><html></html>【导航栏 foot 底部的 css 源代码】<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="style.css"> <title>Document</title></head><body> <nav class="nav"> <a href="index.html">首页</a> <a href="album.html">相册</a> <a href="video.html">视频</a> <a href="text.html">文字</a> <a href="about.html">关于</a> </nav> <footer> <p>© 2022 Created by XXX</p> </footer></body></html> 三、页面展示具体页面展示请见附件内的网页文件。总结本次期末作业,我在纯 html 和 css 实现的网页中,分别展示了首页、相册、视频、文字、关于五个子页面,并且在每个页面都使用了独立的 css 文件来展示样式。导航栏和底部的信息也进行了统一的设计。这次作业让我学到了如何结合 html 和 css 来实现页面的布局和样式展示。希朿自己在今后的学习生活中能够不断提高这方面的能力,做出更多美观实用的网页。
2023-06-10 上传