Web程序设计-实验02 CSS页面布局

【实验主题】

影视网站前台模板页设计

【实验任务】

1、浏览并分析多个影视网站(详见参考资源,建议自行搜索更多影视网站)的整体版面布局,对比同一网站不同页面(主页、列表页、详情页)的元素异同——剔除变化的,留下固定的元素就是本次任务。

2、新建 index.html和 style.css文件,用HTML标记编写页面元素,运用 CSS+DIV 实现页面布局。

1)至少包含 页首(header)、导航(nav)、内容(main)和页脚(footer)等几个单元。

2)在 页首(header)、导航(nav)和页脚(footer)等单元输入合适的内容(文字、图片等),页面添加 logo。

3)内容(main)单元暂时留空。

3、在完整地编写完成任务2后,仿照技术博客(详见参考资源),在内容(main)单元撰写实验报告,结合所写代码、配以图示说明,详细分析您的页面布局技术细节。

1)为避免字符转义的繁琐,报告中涉及的源代码可以作为内容放置到<textarea>元素中。

2)对报告中涉及的不同内容分别定义合理的 CSS样式,以方便舒适阅读。

【效果图】

全程手撸

 

 【index.html 文件】

<!DOCTYPE html>
<html><head><meta charset="utf-8"><title>影视列表页</title><link rel="stylesheet" href="style.css" /></head><body><div class="container"><div class="header"><a href="#">收藏</a>| HI,欢迎观看 !<a href="#">【登录】</a><a href="#">【注册】</a><form action="" method="post">客户服务<select name="seivice"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option></select>网站导航<select name="site"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option></select>我收藏的影片<select name="collect"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option></select></form></div><a class="banner"href="https://v.youku.com/v_show/id_XNjM3Nzg1NjE0MA==.html?s=bdee93b23a4e46c09039&scm=20140719.manual.15358.show_bdee93b23a4e46c09039&spm=a2hja.14919748_WEBHOME_NEW.drawer1.d_zj1_4"target="_blank"></a><div class="nav"><a href="#">首页</a><a href="#">电视剧</a><a href="#">电影</a><a href="#">娱乐</a><a href="#">综艺</a><a href="#">动漫</a><a href="#">微电影</a><a href="#">片花</a><a href="#">脱口秀</a></div><div class="sidebar"><div class="headSidebar">按地区</div><a href="#">大陆</a><a href="#">香港</a><a href="#">台湾</a><a href="#">韩国</a><a href="#">美国 </a><div class="headSidebar">按类型</div><a href="#">古装</a><a href="#">武侠</a><a href="#">警匪</a><a href="#">军事</a><a href="#">神话 </a><div class="headSidebar">按状态</div><a href="#">更新中</a><a href="#">全集</a><a href="#">近期上映</a><a href="#">仅预告</a></div><div class="middlecontent"><div class="watch">首页 > 电视剧 > 盗墓笔记</div><textarea name="code" cols="137" rows="50">* {margin: 0;padding: 0;/* 清除用户代理样式 */}.container {width: 1300px;margin: 0 auto;font-family: Arial, Helvetica, sans-serif;}a {text-decoration: none;}.header a {color: black;}.header a:hover {color: rgb(255, 102, 0);}.header {padding: 0px 60px;height: 30px;line-height: 30px;background-color: rgb(247, 247, 247);border-bottom-style: solid;border-bottom-color: rgb(218, 218, 218);font-size: 12px;}.header form {display: inline-block;float: right;}.banner {display: block;height: 120px;background: black url(./image/banner.jpg) no-repeat scroll 10px -195px;}.nav {font-size: 20px;height: 50px;text-align: center;background-color: rgb(36, 36, 35);margin-bottom: 10px;}.nav a {display: inline-block;width: 124px;color: white;line-height: 50px;}.nav a:hover {background-color: rgb(255, 102, 0);}.sidebar {float: left;width: 180px;}.middlecontent {float: left;padding-left: 20px;}.middlecontent .watch {width: 1000px;height: 50px;font-size: 20px;line-height: 50px;border-bottom-style: solid;border-bottom-color: rgb(132, 189, 0);margin-bottom: 20px;}.headSidebar {font-size: 20px;width: 180px;height: 50px;line-height: 50px;color: black;background-color: rgb(132, 189, 0);text-indent: 60px;}.sidebar a {font-size: 20px;display: block;width: 180px;height: 50px;line-height: 50px;color: black;background-color: rgb(250, 250, 250);text-indent: 60px;}.sidebar a:hover {background-color: rgb(255, 102, 0);}.textcol {clear: left;padding-top: 20px;font-size: 25px;color: rgb(132, 189, 0);}.collaborations {background-color: rgb(250, 250, 250);text-align: center;border-top-style: solid;border-top-color: rgb(132, 189, 0);}.collaborations a {display: inline-block;width: 180px;height: 72px;background-position: center;background-repeat: no-repeat;background-size: cover;margin: 10px;margin-bottom: 20px;}.collaborations .col1 {background-image: url(./image/cctv.png);}.collaborations .col2 {background-image: url(./image/youku.png);}.collaborations .col3 {background-image: url(./image/sohu.png);}.collaborations .col4 {background-image: url(./image/leshi.png);}.collaborations .col5 {background-image: url(./image/aiqiyi.png);}.collaborations .col6 {background-image: url(./image/mangguotv.png);}.collaborations .col7 {background-image: url(./image/tecentvideo.png);}.collaborations .col8 {background-image: url(./image/1.jpg);}.collaborations .col9 {background-image: url(./image/2.png);}.collaborations .col10 {background-image: url(./image/3.png);}.collaborations .col11 {background-image: url(./image/4.png);}.collaborations .col12 {background-image: url(./image/5.png);}.copyright {text-align: center;}</textarea></div><div class="textcol">合作专区</div><div class="collaborations"><a href="#" class="col1"></a><a href="#" class="col2"></a><a href="#" class="col3"></a><a href="#" class="col4"></a><a href="#" class="col5"></a><a href="#" class="col6"></a><a href="#" class="col7"></a><a href="#" class="col8"></a><a href="#" class="col9"></a><a href="#" class="col10"></a><a href="#" class="col11"></a><a href="#" class="col12"></a></div><div class="copyright">Copyright 2015-2020 Q- Walking Fashion E&s 漫步时尚广场(QST教育)版权所有</div><div class="copyright">中国青岛 高新区河东路8888号 青软教育集团 咨询热线:400-658-0166 400-658-1022</div></div></body>
</html>

 【style.css 文件】

* {margin: 0;padding: 0;/* 清除用户代理样式 */
}.container {width: 1300px;margin: 0 auto;font-family: Arial, Helvetica, sans-serif;
}a {text-decoration: none;
}.header a {color: black;
}.header a:hover {color: rgb(255, 102, 0);
}.header {padding: 0px 60px;height: 30px;line-height: 30px;background-color: rgb(247, 247, 247);border-bottom-style: solid;border-bottom-color: rgb(218, 218, 218);font-size: 12px;
}.header form {display: inline-block;float: right;
}.banner {display: block;height: 120px;background: black url(./image/banner.jpg) no-repeat scroll 10px -195px;
}.nav {font-size: 20px;height: 50px;text-align: center;background-color: rgb(36, 36, 35);margin-bottom: 10px;
}.nav a {display: inline-block;width: 124px;color: white;line-height: 50px;
}.nav a:hover {background-color: rgb(255, 102, 0);
}.sidebar {float: left;width: 180px;
}.middlecontent {float: left;padding-left: 20px;
}.middlecontent .watch {width: 1000px;height: 50px;font-size: 20px;line-height: 50px;border-bottom-style: solid;border-bottom-color: rgb(132, 189, 0);margin-bottom: 20px;
}.headSidebar {font-size: 20px;width: 180px;height: 50px;line-height: 50px;color: black;background-color: rgb(132, 189, 0);text-indent: 60px;
}.sidebar a {font-size: 20px;display: block;width: 180px;height: 50px;line-height: 50px;color: black;background-color: rgb(250, 250, 250);text-indent: 60px;
}.sidebar a:hover {background-color: rgb(255, 102, 0);
}.textcol {clear: left;padding-top: 20px;font-size: 25px;color: rgb(132, 189, 0);
}.collaborations {background-color: rgb(250, 250, 250);text-align: center;border-top-style: solid;border-top-color: rgb(132, 189, 0);
}.collaborations a {display: inline-block;width: 180px;height: 72px;background-position: center;background-repeat: no-repeat;background-size: cover;margin: 10px;margin-bottom: 20px;
}.collaborations .col1 {background-image: url(./image/cctv.png);
}.collaborations .col2 {background-image: url(./image/youku.png);
}.collaborations .col3 {background-image: url(./image/sohu.png);
}.collaborations .col4 {background-image: url(./image/leshi.png);
}.collaborations .col5 {background-image: url(./image/aiqiyi.png);
}.collaborations .col6 {background-image: url(./image/mangguotv.png);
}.collaborations .col7 {background-image: url(./image/tecentvideo.png);
}.collaborations .col8 {background-image: url(./image/1.jpg);
}.collaborations .col9 {background-image: url(./image/2.png);
}.collaborations .col10 {background-image: url(./image/3.png);
}.collaborations .col11 {background-image: url(./image/4.png);
}.collaborations .col12 {background-image: url(./image/5.png);
}.copyright {text-align: center;
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/610886.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

[Linux_IMX6ULL驱动开发]-驱动的分层及实现

目录 驱动分层的思路 驱动分层的实现 上层驱动的实现 次设备号的使用 上层驱动代码 底层驱动的实现 底层驱动c文件的实现 底层驱动头文件实现 应用层文件的实现 驱动分层的思路 在上一篇文章中&#xff0c;博主实现了通过寄存器控制引脚&#xff0c;以此来达到控制LE…

华为OD技术面试-爬楼计数(动态规划)

背景 2024-03-16 华为od 技术面试&#xff0c;记录题目和模型 题目 分析 入门级的 动态规划算法&#xff0c;直接写就行了 缓存递归 代码 DZs {} def climbStairs(n):if n<0:return 0if DZs.get(n, 0)>0 :return DZs[n]if n2:jf 2elif n1:jf 1;else:jf1 climb…

R语言绘制一次和二次相关性热图

在数据探索的过程中&#xff0c;我们往往会对数据与数据的相关性进行分析&#xff0c;例如我们常用的corrplot包&#xff0c;或者psych包中的corr.test函数&#xff0c;对两两变量间的相关性进行分析。我们常常会看到这样的相关性热图&#xff1a; 但有时变量间的关系并非线性…

systemctl start docker报错(code=exited, status=1/FAILURE)

运行systemctl start docker报错内容如下: 输入systemctl status docker.service显示以下内容&#xff1a; 本次启动不起来与docker服务无关 具体解决问题是修改 /etc/docker/daemon.json&#xff0c;vim /etc/docker/daemon.json # 添加如下内容 {"registry-mirrors&qu…

【2024】使用Rancher管理k8s集群和创建k8s集群

Rancher管理k8s集群及创建k8s集群。 Rancher版本为:2.8.2目录 rancher管理k8s集群rancher创建k8s集群rancher管理k8s集群 使用rancher管理已经存在的k8s集群。 本部分内容需要自行准备好k8s集群及rancher平台,部署请看本人其他文章 。 登录到rancher平台后,点击集群管理,…

千视电子携NDI 6前沿技术,亮相北京CCBN展呈现轻量化媒体解决方案

千视携NDI 6技术闪耀2024 CCBN展会&#xff0c;呈现轻量化媒体解决方案 2024年4月24日至26日&#xff0c;北京首钢会展中心将举办第三十届中国国际广播电视网络技术展览会&#xff08;CCBN2024&#xff09;。这是中国广播电视行业的一项重要盛会&#xff0c;将有国内外超600家…

51-基于GitHubActions的CI实战

在Go项目开发中&#xff0c;我们要频繁地执行静态代码检查、测试、编译、构建等操作。如果每一步我们都手动执行&#xff0c;效率低不说&#xff0c;还容易出错。所以&#xff0c;我们通常借助CI系统来自动化执行这些操作。 当前业界有很多优秀的CI系统可供选择&#xff0c;例…

4-云原生监控体系-Grafana-基本使用

1. 介绍 使用Grafana&#xff0c;您可以通过漂亮、灵活的仪表板创建、探索和共享所有数据。查询、可视化、提醒和理解您的数据&#xff0c;无论数据存储在何处。 图片出处&#xff1a; https://grafana.com/grafana/ 官方网站 2. 界面介绍 Connections 可以配置数据源&#x…

Java后端基础知识(String类型)

String类的创建方式 String的特点 1.引用数据类型 2.是final类&#xff0c;一旦创建内容不可修改 3.String类对象相等的判断用equals&#xff08;&#xff09;方法完成&#xff0c;是判断地址数值 String的创建方式 1.直接创建 String str"hello";注意&#xff…

pom.xml爆红怎么处理?

其实很简单&#xff0c;右键点击pom.xml 点击Add as Maven Project 即可&#xff0c;等待加载完毕就行啦&#xff0c;会变成蓝色M标志&#xff0c;表示成功

个人博客系统项目(SpringBoot+Linux部署上线)

在学完SpringBoot框架、MyBatis后&#xff0c;直接开始做第一个项目&#xff1a;博客系统 首先&#xff0c;该博客系统包含核心功能有&#xff1a; 一、登录、注册、退出登录功能。 二、没有登陆前可以查看博客首页以及博客展示的分页处理&#xff0c;以及点击查看博客可以…

计算机网络知识等汇总补充

计算机网络知识汇总补充 一、四次挥手1、为什么TCP要等待2MSL2、如果说一个系统中&#xff0c;有大量的time_wait和close_wait&#xff0c;会是什么原因&#xff1f; 二、你是怎么解决粘包问题&#xff1f;三、你觉得哪些场景适合redis四、redis的持久化策略五、你会怎么保证my…