Web前端期末大作业-重庆旅游景区网页设计(HTML+CSS+JS)

news/2024/5/5 19:17:32/文章来源:https://blog.csdn.net/qq_365392777/article/details/127030647

🌩️ 精彩专栏推荐👇🏻👇🏻👇🏻
💂 作者主页: 【进入主页—🚀获取更多源码】
🎓 web前端期末大作业: 【📚HTML5网页期末作业 (1000套) 】
🧡 程序员有趣的告白方式:【💌HTML七夕情人节表白网页制作 (110套) 】


📂文章目录

  • 二、📚网站介绍
  • 三、🔗网站效果
    • ▶️1.视频演示
    • 🧩 2.图片演示
  • 四、💒 网站代码
    • 🧱HTML结构代码
    • 🏠CSS样式代码
  • 五、🎁更多源码


前端javascripthtmlcssweb

二、📚网站介绍

📔网站布局方面:计划采用目前主流的、能兼容各大主流浏览器、显示效果稳定的浮动网页布局结构。

📓网站程序方面:计划采用最新的网页编程语言HTML5+CSS3+JS程序语言完成网站的功能设计。并确保

网站代码兼容目前市面上所有的主流浏览器,已达到打开后就能即时看到网站的效果。

📘网站素材方面:计划收集各大平台好看的图片素材,并精挑细选适合网页风格的图片,然后使用PS做出适合网页尺寸的图片。

📒网站文件方面:网站系统文件种类包含:html网页结构文件、css网页样式文件、js网页特效文件、images网页图片文件;

📙网页编辑方面:网页作品代码简单,可使用任意HTML编辑软件(如:Dreamweaver、HBuilder、Vscode 、Sublime 、Webstorm、Text 、Notepad++ 等任意html编辑软件进行运行及修改编辑等操作)。
其中:
(1)📜html文件包含:其中index.html是首页、其他html为二级页面;
(2)📑 css文件包含:css全部页面样式,文字滚动, 图片放大等;
(3)📄 js文件包含:js实现动态轮播特效, 表单提交, 点击事件等等(个别网页中运用到js代码)。


三、🔗网站效果

▶️1.视频演示

E85JP 重庆旅游7页 带js 带轮播

🧩 2.图片演示

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
![在这里插入图片描述](https://img-blog.csdnimg.cn/60fc827d19f746ad9b8ddf06992fc931.png#pic_c
web前端
html5期末大作业
HTML静态网页作业
enter)


四、💒 网站代码

🧱HTML结构代码


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>重庆旅游</title><link rel="stylesheet" type="text/css" href="css/style.css" /><link rel="stylesheet" href="css/swiper.css" /><link rel="stylesheet" href="css/font/iconfont.css" /></head><body><div id="page"><!-- 轮播图主体 --><div class="swipe" id="swipe"><!-- 模糊背景 --><div class="bg" id="swipe_bg"></div><!-- 图片区域 --><section><!-- 图片显示 --><div class="img-box" id="swipe_img_box"><a href="#" class="link" id="swipe_link"><img src="images/banner.jpg" alt="" class="img" id="swipe_img" /></a></div><!-- 指示点 --><div class="select" id="swipe_select"></div><!-- 左侧翻页按钮 --><div class="btn left" id="swipe_btn_left"><!-- 字体图标:左箭头 --><i class="iconfont icon-zuojiantou" aria-hidden="true"></i></div><!-- 右侧翻页按钮 --><div class="btn right" id="swipe_btn_right"><!-- 字体图标:右箭头 --><i class="iconfont icon-youjiantou" aria-hidden="true"></i></div></section></div><div class="nav"><ul><li><a href="index.html">首页</a></li><li><a href="index_1.html">美食</a></li><li><a href="index_2.html">景点</a></li><li><a href="index_3.html">酒店</a></li><li><a href="index_1.1.html">攻略</a></li></ul></div><div class="tuce"><h1>重庆</h1><h2>美食  景点 特产 民族 <span class="yq">友情链接:<a href="http://www.cqta.gov.cn/" target="_blank">重庆市旅游政务网</a></span></h2><div class="left_in"><img src="images/d1.png" width="410" /><img src="images/d2.jpg" width="410" height="310" /></div><div class="right_in"><h3>院校</h3><ul><li><a href="#"><img src="images/cp_1.jpg" /></a><p>重庆大学<br />创办于1929年 <br />学校占地面积5212亩</p></li><li><a href="#"><img src="images/cp_2.jpg" /></a><p>重庆医科大学 <br />创建于1956年 <br />“211”院校</p></li><li><img src="images/cp_3.jpg" border="0" usemap="#Map" /><map name="Map" id="Map"><area shape="poly" coords="65,134,124,75,178,52,222,130,136,192,53,181" href="#" /></map><p>重庆邮电大学 <br />创办于1950年3月 <br />开设有53个本科专业</p></li><li><img src="images/cp_4.jpg" border="0" usemap="#Map2" /><map name="Map2" id="Map2"><area shape="circle" coords="159,148,96" href="#" /></map><p>重庆工商大学 <br />始创于1952年 <br />是入选“小211工程“的高校之一</p></li></ul></div></div><div class="footer"><p>重庆旅游</p></div></div></body><script>// 当前轮播图编号let current_index = -1// 自动轮播定时器let swipe_timer = null// 轮播图的图片地址与跳转链接let links = [{ image: 'images/banner.jpg', target: '#1' },{ image: 'images/d2.jpg', target: '#2' },{ image: 'images/s.jpg', target: '#3' }]// 需要操作到的元素let swipe = document.getElementById('swipe')let swipe_bg = document.getElementById('swipe_bg')let swipe_img_box = document.getElementById('swipe_img_box')let swipe_link = document.getElementById('swipe_link')let swipe_img = document.getElementById('swipe_img')let swipe_select = document.getElementById('swipe_select')let swipe_btn_left = document.getElementById('swipe_btn_left')let swipe_btn_right = document.getElementById('swipe_btn_right')// 事件// 切换图片let select = (index) => {// 停止播放stop()// 转数字index = Number(index)// 越界超过最大数量,直接返回if (index >= links.length) {return}// 选中当前已选中的,直接返回if (current_index == index) {return}// 取消当前指示点的选中状态if (current_index > -1) {swipe_select.children[current_index].classList.remove('checked')}// 变更当前轮播图的编号current_index = index// 找到当前元素let current_link = links[current_index]// 背景变化swipe_bg.style.backgroundImage = 'url(' + current_link.image + ')'// 前景变化swipe_img.setAttribute('src', current_link.image)// 链接变化swipe_link.setAttribute('href', current_link.target)// 增加新的指示点的选中状态swipe_select.children[current_index].classList.add('checked')}// 自动切换图片let autoSelect = (index) => {// 转数字index = Number(index)// 越界超过最大数量,直接返回if (index >= links.length) {return}// 选中当前已选中的,直接返回if (current_index == index) {return}// 取消当前指示点的选中状态swipe_select.children[current_index].classList.remove('checked')// 变更当前轮播图的编号current_index = index// 找到当前元素let current_link = links[current_index]// 前景图片// 第一步调整过渡时间swipe_img.style.transition = 'opacity 0.5s ease-in 0s'// 第二步调整不透明度为0.2swipe_img.style.opacity = 0.2// 第三步延迟变换img图片,并重新定义透明度以及过渡时间和过渡方式setTimeout(() => {// 背景变化swipe_bg.style.backgroundImage = 'url(' + current_link.image + ')'// 前景变化swipe_img.setAttribute('src', current_link.image)// 链接变化swipe_link.setAttribute('href', current_link.target)// 不透明度变化swipe_img.style.transition = 'opacity 0.7s ease-out 0s'swipe_img.style.opacity = 1// 增加新的指示点选中状态// 如果已经通过手动点击了,选中则此处不再执行if (!document.querySelector('.swipe .checked')) {swipe_select.children[current_index].style.transition = 'background-color 0.5s'swipe_select.children[current_index].classList.add('checked')}}, 500)}// 播放let play = () => {// 3秒切换一次swipe_timer = setInterval(() => {// 设置新的indexlet index = current_index + 1// 右翻越界,切到第一张if (index >= links.length) {index = 0}// 加载新图片(这里选择自动,增加切换效果)autoSelect(index)}, 3000)}// 停止let stop = () => {if (swipe_timer) {clearInterval(swipe_timer)swipe_timer = null}}// 初始化let init = () => {for (let i = 0; i < links.length; i++) {// 创建a元素let item = document.createElement('a')// 修改属性item.setAttribute('class', 'item')item.setAttribute('href', '#')item.setAttribute('data-index', i)// 追加元素swipe_select.appendChild(item)}// 默认第一张select(0)// 绑定各个事件并开始轮播bind()play()}// 绑定let bind = () => {// 左翻事件监听swipe_btn_left.addEventListener('click', () => {// 设置新的indexlet index = current_index - 1// 左翻越界,切到最后一张if (index < 0) {index = links.length - 1}// 加载新图片select(index)play()})// 右翻事件监听swipe_btn_right.addEventListener('click', () => {// 设置新的indexlet index = current_index + 1// 右翻越界,切到第一张if (index >= links.length) {index = 0}// 加载新图片select(index)play()})// 循环绑定指示器点击事件for (const key in swipe_select.children) {if (swipe_select.children.hasOwnProperty(key)) {const element = swipe_select.children[key]element.addEventListener('click', (e) => {// 取消默认点击跳转e.preventDefault()// 跳转到当前指示点中data-index所指定的图片select(e.target.dataset.index)})}}}// 页面加载完毕,执行初始化window.addEventListener('load', () => {init()})</script>
</html>

🏠CSS样式代码

@charset "utf-8";
/* CSS Document */
body, html, div, blockquote, img, label, p, h1, h2, h3, h4, h5, h6, pre, ul, ol,
li, dl, dt, dd, form, a, fieldset, input, th, td
{margin: 0; padding: 0; border: 0; outline: none;}
body {	font-family: "微软雅黑";font-size: 14px;color:#000000;line-height: 20px;text-align:left; background:url(../images/bej.jpg);}
td,th {font-family: "微软雅黑";font-size: 12px;color: #000000;}
a {color: #000000;} 
A:link {TEXT-DECORATION: none;} 
A:visited {TEXT-DECORATION: none;}ul,li{list-style-type:none;}
.clearit{clear:both;}
#page{width:980px; margin:0 auto; background: rgba(255,255,255, 0.5 )}
.nav{width:980px; height:40px; line-height:40px; text-align:center; background:#56b2e5;}
.nav ul li{width:120px; float:left; margin-left:40px; display:inline; font-size:14px;}
.nav ul li a{color:#FFFFFF; font-size: 16px}
.nav ul li A:hover {color:#2059a6}
.zuo{width:400px; float:left;}
.you{width:540px; float:right; font-size:14px; font-family:"微软雅黑"; line-height:26px; padding:0 10px;}
.jieshao{width:960px; padding:10px; background:#FFFFFF;}
.tuce h2{font-size:14px; line-height:24px; color: #000; font-weight:bold; text-align:left; border-bottom:2px solid  #CCC; margin-bottom:20px;}
.tuce{ width:960px; padding:0 10px; overflow:hidden;}
.tuce p{padding-top:5px; font-size:14px; line-height:30px;}
.left_in{ width:410px; float:left; overflow:hidden; margin-right:15px;}
.left_in img {margin-top:10px;}
.right_in{ width:530px; float:right}
.right_in ul li{ width:240px; margin:10px; background:#FFFFFF; float:left; }
.right_in ul li img{ width:240px; border-bottom:1px solid #CCC; }
.right_in ul li p{ padding:10px; color:#666;}.footer{background:#56b2e5; margin-top:10px;} 
.footer p{text-align:center;padding:20px 0; color:#FFFFFF;}
.xinxi{width:960px; padding:10px; background:#FFFFFF;}.center_in{ width:980px; margin:0 auto;}
.center_in ul li{ width:220px; margin:10px; background:#FFFFFF; float:left; }
.center_in ul li img{ width:220px; border-bottom:1px solid #CCC; }
.center_in ul li p{ padding:10px; color:#666;}.center_left{ width:500px; float:left;}
.center_right{ width:450px; float:right; line-height:30px;}.yq{ float:right; color:#666}
h1{ font-family:"微软雅黑"; line-height:80px;}.ao { margin-right:30px; line-height:40px; }

五、🎁更多源码

1.如果我的博客对你有帮助 请 “👍点赞” “✍️评论” “💙收藏” 一键三连哦!

2.💗【👇🏻👇🏻👇🏻🉑关注我| 获取更多源码】 带您学习各种前端插件、3D炫酷效果、图片展示、文字效果、以及整站模板 、大学生毕业HTML模板 、等!

📣以上内容技术相关问题💌欢迎一起交流学习👇🏻👇🏻👇🏻

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

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

相关文章

CO41创建生产订单维护增强字段

一、CO41计划订单中新增增强字段 报表中新增字段&#xff0c;并可维护&#xff0c;当点击转换创建生产订单时&#xff0c;将四个字段的值&#xff0c;维护到生产订单对应的字段中 二、增强结构 在SFC_POCO中新增对应的字段 三、屏幕增强 找到前台屏幕对应的函数组COUP和0200…

ssm大学校园慈善拍卖网站的设计与实现毕业设计源码250910

目 录 摘要 1 绪论 1.1 研究背景及意义 1.2研究现状 1.3论文结构与章节安排 2 大学校园慈善拍卖网站系统分析 2.1 可行性分析 2.2 系统流程分析 2.2.1 数据增加流程 2.2.2 数据修改流程 2.2.3数据删除流程 2.3 系统功能分析 2.3.1功能性分析 2.3.2非功能性分析 …

MyBatis(二)

视频链接&#xff1a;https://www.bilibili.com/video/BV1bu411z77K/?vd_source9545770e4a2968c05878ffac8589ec6c 视频选集&#xff1a;P70— P101 文章目录1.#{}和${}1.1 #{} 占位符1.2 ${} 字符串拼接或字符串替换2.返回主键2.1 业务需求2.2 代码实现3.UUID的用法4.动态sql…

无人机/穿越机等遥控器/接收机厂商

本人最近迷恋上了穿越机。整理一些资料&#xff0c;方便后来人学习。。有其他更新资料&#xff0c;欢迎留言&#xff0c;争取打造成好的工具书。 新手入门可以看百科&#xff1a; 了解穿越机的一切 | 装机百科 穿越机电子系统表&#xff1a; 方案厂商坐标代表作其他RadioLink…

代码源于生活我们需要观察力想象力和创造力

出现窗户把手不能控制卡槽卡扣的问题 原因&#xff1a; 由于控制把手和窗户的螺丝松动&#xff0c;导致把手没有办法控制里边竖着的东西&#xff0c;没有办法控制卡扣和卡槽吻合松开。 分析&#xff08;按照计算机思维&#xff09;&#xff1a; 1、研究对象&#xff1a;把…

新来个阿里 P7,仅花 2 小时,做出一个多线程永动任务,看完直接跪了

今天教大家做一个 Java 的多线程永动任务&#xff0c;这个示例的原型是公司自研的多线程异步任务项目&#xff0c;我把里面涉及到多线程的代码抽离出来&#xff0c;然后进行一定的改造。 里面涉及的知识点非常多&#xff0c;特别适合有一定工作经验的同学学习&#xff0c;或者…

C++ Reference: Standard C++ Library reference: C Library: cmath: logb

C官网参考链接&#xff1a;https://cplusplus.com/reference/cmath/logb/ 函数 <cmath> <ctgmath> logb C99 double logb(double x); float logbf(float x); long double logbl(long double x); C11 double logb(double x); float logb(float x); lo…

C++ Reference: Standard C++ Library reference: C Library: cmath: atanh

C官网参考链接&#xff1a;https://cplusplus.com/reference/cmath/atanh/ 函数 <cmath> <ctgmath> atanh C99 double atanh (double x); float atanhf (float x); long double atanhl (long double x); C11 double atanh (double x); float atanh (floa…

迅为IMX8MM开发板视频硬解码H264解码

我们解码并播放 H264 视频文件&#xff0c;输入以下命令 gst-launch-1.0 filesrc location/gstreamer/video/1080p_60fps_h264.mp4 typefindtrue ! \ video/quicktime ! aiurdemux ! queue max-size-time0 ! vpudec ! imxvideoconvert_g2d ! \ video/x-raw, formatRGB16, wi…

ffmpeg播放器(一) 视频解码与播放

1、环境搭建 首先需要导入所需要的包include、armeabi-v7a。 然后跟项目建立连接&#xff0c;在CMakeList.txt&#xff0c;并做了相关的解释&#xff1a; cmake_minimum_required(VERSION 3.4.1)file(GLOB source_file src/main/cpp/*.cpp) //cpp文件下所有的包 # Declares a…

打印字符串、排序、引用调用

设计一个函数print打印字符串&#xff0c;如果只传string型参数s&#xff0c;则字符串长度跟10比较&#xff0c;大于10&#xff0c;打印前10个字符&#xff0c;小于10&#xff0c;全部输出s&#xff1b;如果传string型参数s和int型n&#xff0c;则字符串长度跟n比较&#xff0c…

教师在初中数学课堂该如何有效提问(内有示例)

数学是中学数学的一个重要组成部分&#xff0c;它在培养学生的思维和创造力方面具有很大的作用。 在我国当前的教育体制改革与发展中&#xff0c;中学数学教学应按照新课标的要求&#xff0c;改变教学方法&#xff0c;提高学生的数学综合素质。但是&#xff0c;在实际的教学过…

高性能数据访问中间件 OBProxy(五):一文讲透数据路由

上篇文章我们介绍了 OBProxy 的连接管理&#xff0c;通过连接管理功能&#xff0c;OBProxy 和 OBServer 联系起来&#xff0c;同时 OBProxy 屏蔽了连接的复杂性&#xff0c;让用户使用起来和单机数据库一样简单。完成接入后&#xff0c;接下来的一个重要功能就是数据路由&#…

[luogu3980]志愿者招募

记$x_{i}$为第$i$类志愿者数量$,y_{j}=\sum_{j\in [s_{i},t_{i}]}x_{i}-a_{j}$​,则问题即$$\forall i\in [1,m],x_{i}\ge 0\\\forall j\in [1,n],y_{j}\ge 0\\y_{1}-\sum_{s_{i}=1}x_{i}=-a_{1}\\\sum_{t_{i}=n}x_{i}-y_{n}=a_{n}\\\forall j\in [2,n],y_{j}+\sum_{t_{i}=j-1…

redis主从+哨兵+集群模式搭建详解

一、redis主从安装 1. 下载redis Download | Redis 我这里选择的是redis-6.2.7版本 这里三台机器&#xff0c;都需要安装redis node1 192.168.157.128 node2 192.168.157.129 node3 192.168.157.130 2. 安装redis # 解压redis tar -zxvf redis-6.2.7.tar.gz # 编译安装…

数据分析 面经(已拿到offer)

北航计算机专业&#xff08;计院太卷&#xff0c;现考虑转向信息安全方向&#xff09;本科二年级&#xff0c;闲来无事找份日常实习试试水 考虑数分岗也是因为楼主目前大二&#xff0c;专业课学习不够深入&#xff0c;开发技术尚不成熟&#xff0c;而sql、excel和数据可视化比…

四元数是什么

1、四元数的构成 四元数是简单的超复数&#xff0c;由实数加上三个虚数单位组成&#xff0c;主要用于在三维空间中表示旋转 四元数原理包含大量数学相关知识&#xff0c;较为复杂&#xff0c;比如&#xff1a;复数、四维空间等等 因此此文章只对其基本构成和基本公式进行学习…

多视图属性网络异常检测系列一

论文《Deep Anomaly Detection on Attributed Networks》近期会对多视图属性网络异常检测系列进行学习记录 这篇虽然不是多视图的,但可以说是属性网络上异常检测的典型,已是近年属性网络异常检测必参考的一篇文献。背景 由于属性网络中附加的节点属性补充了知识发现中的原始网…

.Net Redis的秒杀Dome和异步执行

1.先到官网下载Redis部署好 Redis 教程 | 菜鸟教程 2.创建一个上游业务项目&#xff08;这里用控制台项目了&#xff0c;Framwork4.7.2&#xff09; NuGet包下载SerivceStack.Redis 创建一个RedisMessgaeQueue(Redis连接帮助类) using ServiceStack.Redis; using System;name…

PCIe系列专题之三:3.0 数据链路层概述

一、故事前传 之前我们讲了对PCIe的一些基础概念作了一个宏观的介绍&#xff0c;了解了PCIe是一种封装分层协议&#xff08;packet-based layered protocol),主要包括事务层&#xff08;Transaction layer), 数据链路层&#xff08;Data link layer)和物理层&#xff08;Physi…