说一哈:此文章是网页设计最后的一个小作品,在最后使用JQuery做些交互效果时也参看别人的文章也有些不懂的地方,所以打算自己写一个做总结,如果想看JQuery部分的请直接空降第三节。

一、网页基本框架

1.站点结构导航

此文章是网页设计最后的一个小作品,在最后使用JQuery做些交互效果时也参看别人的文章也有些不懂的地方,所以打算自己写一个做总结,如果想看JQuery部分的请直接空降第三节。

2.网页结构框架

3.网页预览

www.igrid.top/1

二、HTML及CSS代码

1.HTML部分

<div class="div_head"><a name="index"></a><div class="div_logo"><img src="img/logo.png" height="100"></div><div class="div_bar"><table width="50%" border="0" align="right"><tbody><tr><td><a href="#index"><h2>首页</h3></a></td><td><a href="#story"><h2>剧情</h3></a></td><td><a href="#switch"><h2>平台</h3></a></td><td><a href="#about"><h2>关于</h3></a></td></tr></tbody></table></div>
</div>
<div class="div_index"><div class="div_leftword"><p class="p_2">超级马里奥</p><p class="p_1">奥德赛</p><p class="p_3">スーパーマリオ オデッセイ</p></div><div class="div_rightword"><div id="clock2"></div></div><div class="div_centerpic"><img src="img/fengmian.png"></div>
</div>
<div class="div_story"><a name="story"></a><div class="div_leftstory"><div class="div_leftstoryText"><p class="p_storyjuqing">剧情设计</p><p class="p_textabout">游戏故事叙述库巴绑走碧姬公主与来自帽子之国的帽子精灵女孩“缇雅菈”,逼迫碧姬公主与它结婚。身为碧姬公主爱人的玛利欧,为阻止婚礼,与缇雅菈的哥哥帽子精灵“恰比”连手,搭乘帽子型飞船“奥德赛号”周游世界,施展恰比附身的神奇帽子,拯救心爱的人归来。</p></div><div class="div_leftstoryPic"><img src="img/chara01.png"></div></div><div class="div_rightstory"><div class="div_rightstoryText"><p class="p_storyjuqing2">主要任务</p><p class="p_textabout2">在途中,马里奥将会收集到散落各地的“威力月亮”,这些月亮可以驱动奥德赛号前往不同国度进行冒险。已经公布的国度有都市之国、砂之国、料理之国、森之国、帽子之国、瀑布之国、雪之国、海之国等国度。当你在通关之后,每个王国都会解锁更多的能量月亮。</p><p class="p_textabout2">在每个王国中,你都能找到金属盒子,而你的帽子“坎比”会对它评论一番。然而,当你看完通关字幕并返回这里后,你可将帽子甩在盒子上将它送上天空。随即,这个盒子会打开并为你解锁更多新的能量月亮通关之后,你将可用游戏中收集的金币为马力欧购买更多帽子及服饰,其中有部分内容可通过amiibo解锁。另外一些物品,则需通过收集能量月亮来解锁。</p></div><div class="div_rightstoryPic"><img src="img/chara01(1).png" height="500"></div></div><div class="div_storySwitch"><img src="img/bar.png" class="pic_bar"><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><table width="100%"><tbody><tr><td height="76"><table width="70%" align="center"><tbody><tr><td><img src="img/title_joycon01.png" width="150" height="425" alt=""/></td><td><marquee bgcolor="#000000" width="100%" align="middle"><img src="img/marquee/mq1.jpg" height="410px"><img src="img/marquee/mq2.jpg" height="410px"><img src="img/marquee/mq3.jpg" height="410px"><img src="img/marquee/mq4.jpg" height="410px"><img src="img/marquee/mq5.jpg" height="410px"><img src="img/marquee/mq6.jpg" height="410px"></marquee></td><td><table width="50%" align="right"><tbody><tr><td><img src="img/title_joycon02.png" width="150" height="425" alt=""/></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><p>&nbsp;</p><table width="100%" class="table_switch"><tbody><tr><td height="413"><table width="30%"><tbody><tr></tr></tbody></table></div>
</div><div class="div_switch"><a name="switch"></a><div class="div_switchMain"><img src="img/switch_logo.png" class="pic_switch"></div><div class="div_switchShare"><table width="80%" border="0" align="center" cellspacing="30"><tbody><tr><td><p><img class="pic_about" src="img/switch_pic/pic1.jpg" width="350" height="350" alt=""/></p><p class="p_switch"><strong>TV模式</strong></p></td><td><p><img class="pic_about" src="img/switch_pic/pic2.jpg" width="350" height="350" alt=""/></p><p class="p_switch"><strong>桌面模式</strong></p></td><td><p><img class="pic_about" src="img/switch_pic/pic3.jpg" width="380" height="350" alt=""/></p><p class="p_switch"><strong>手提模式</strong></p></td></tr></tbody></table></div></div><div class="div_about"><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;<a name="about"></a></p><p>&nbsp;</p><table width="80%" border="0" align="center" cellspacing="30" class="table_about"><tbody><tr><td height="862" valign = "top"><p>&nbsp;</p><table width="90%" border="0" align="center"><tbody><tr><td valign = "top"><img src="img/about.jpg" width="400" height="238" alt="" class="pic_about" /><img src="img/about.png" width="400" height="227" alt=""/></td></tr></tbody></table></td><td valign = "top">&nbsp;<h2>超级马里奥:奥德赛</h2><p class="p_textabout">《超级马里奥:奥德赛 》(Super Mario Odyssey)是任天堂游戏公司发行的开放世界动作冒险游戏。2017年10月27日独占登陆新主机NS。本作是睽违15年继承超级马里奥64以及阳光马里奥高自由度血脉的箱庭探索3D马里奥正统续作。游戏对应官方繁体中文和简体中文。EDGE,IGN和Gamestop均给出满分评定,媒体均给出极高的正面评价,综评网站Metacritic奥德赛的综评为97。</p><p class="p_textabout">当我们切换到「掌机模式」游玩。掌机模式如同 TV 模式,画面表现和流畅度丝毫不缩水,带来 TV 和掌机无缝接轨的游玩体验,玩家如果在家以电视探索广大的世界之时,临时有其他要事出门时,也可以马上切换成掌机模式,在外继续完整的游戏体验</p><p class="p_textabout">17年1 月14 、 15 日Nintendo Switch 体验会2017,在『超级马力欧奥德赛』的表演展场上所举办
的与开发者对谈单元邀请到 3D 马力欧生父小泉欢晃以及制作阳光马力欧的元仓健太谈论这款 3D 马力欧究竟该如何呈现。小泉欢晃解释 3D 马力欧有两种之分,一种是像银河或 3D 乐园这种在进入游戏一开始就已经决定好过关方向的通关型及 64 或阳光这种在一个关卡内设置好几种过关点的箱庭探索型。</p><p class="p_textabout">这是继1996年N64平台《超级马里奥64》和2002年GC平台《超级马里奥:阳光》后,系列再度迎来沙箱风格的3D游戏。探索充满秘密和惊喜的大型3D王国,游戏场景涵盖城镇、森林、沙漠、果园等,马里奥将乘坐飞空艇在不同的主题世界来回穿梭,包括纽约风格的大都市“纽当城”(New Donk City)和“树林王国”(Wooded Kingdom)等。</p><p class="p_textabout">游戏故事叙述库巴绑走碧姬公主与来自帽子之国的帽子精灵女孩“缇雅菈”,逼迫碧姬公主与它结婚。身为碧姬公主爱人的玛利欧,为阻止婚礼,与缇雅菈的哥哥帽子精灵“恰比”连手,搭乘帽子型飞船“奥德赛号”周游世界,施展恰比附身的神奇帽子,拯救心爱的人归来。</p></td></tr></tbody></table></p><p>&nbsp;</p><p>&nbsp;</p><img src="img/bar.png" class="pic_bar"><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><table width="60%" align="center" class="report_table"><tbody><tr><td><form id="form1" name="form1" method="post"><p class="p_2">&nbsp;</p><p class="p_2">调查问卷</p><p class="p_2">&nbsp; </p></form><table width="50%" align="center"><tbody><tr><td><form id="form2" name="form2" method="post"><p><label for="textfield">姓名:</label><input type="text" name="textfield" id="textfield"></p><p><label for="select">性别:</label><select name="select" id="select"><option value="1">男</option><option value="2">女</option><option value="3">随便</option></select></p><p><label for="date">哪年生的:</label><input type="date" name="date" id="date"></p><p>您是:                        </p><p><label><input type="radio" name="你是:" value="0" id="你是:_0">游戏爱好者</label><br><label><input type="radio" name="你是:" value="1" id="你是:_1">老任忠实粉</label><br><label><input type="radio" name="你是:" value="2" id="你是:_2">超级社会王</label><br><label><input type="radio" name="你是:" value="3" id="你是:_3">论坛技术宅</label></p><p><label for="range">&quot;买不买&quot;指数:</label>不买<input name="range" type="range" id="range" autocomplete="off">买</p><table width="40%" align="center"><tbody><tr><td><input type="submit" name="submit" id="submit" value="交了吧"><input type="reset" name="reset" id="reset" value="不想交了"></td></tr></tbody></table><p>&nbsp;</p><p><br></p></form></td></tr></tbody></table></tr></tbody></table></div><div id="dg" style="z-index: 9999; position: fixed ! important; right: 0px; top: 0px;">  <div class="div_float"><a href="#index" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('button','','img/button/button_af.png',1)"><img src="img/button/button_bf.png" alt="" width="50" height="50" id="button"></a><p></p><a href="#story" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('button1','','img/button/button_af.png',1)"><img src="img/button/button_bf.png" alt="" width="50" height="50" id="button1"></a><p></p><a href="#switch" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('button2','','img/button/button_af.png',1)"><img src="img/button/button_bf.png" alt="" width="50" height="50" id="button2"></a><p></p><a href="#about" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('button3','','img/button/button_af.png',1)"><img src="img/button/button_bf.png" alt="" width="50" height="50" id="button3"></a></div></div> <div><p class="p_copy">沧州师范学院&copy;</p></div>

2.CSS部分

body {/*background-color: #AECD7D;*/background-color:#C90103;
}
.div_head{width: 100%;height: 130px;
}
.div_logo{width:auto;height:100px;margin-left: 100px;margin-top: 20px;float: left;
}
.div_bar{width: 800px;height: 100px;margin-top: 30px;margin-right: 80px;float: right;
}
.div_index{height: 560px;width: 100%;
}
.div_leftword{height: 600px;width: 500px;position: absolute;top: 300px;left: 50px;
}
.div_rightword{height: 600px;width: 500px;position: absolute;top: 350px;left: 1100px;
}
.div_centerpic{width: 300px;height: 800px;margin-left: 200px;position: absolute;top: 126px;left: 450px;
}
.div_story{height: 2000px;width: 100%;
}
.div_leftstory{height: 430px;width: 100%;background-color: white;
}
.div_leftstoryText{width: 30%;position:absolute;top: 860px;left: 200px;vertical-align: middle;
}
.div_leftstoryPic{width: 40%;position:absolute;top: 820px;right: 50px;
}
.div_rightstory{height: 650px;
}
.div_rightstoryText{width: 30%;position: absolute;top: 1350px;right: 300px;
}
.div_rightstoryPic{width: 40%;position: absolute;top: 1200px;left: 160px;
}
.div_storySwitch{height: 600px;width: 100%;
}
.div_switch{height: 1000px;
}
.div_switchMain{height: 800px;
}
.div_switchShare{width: 100%;background-color: #FFFFFF;height: 500px;
}
.div_about{height: 2200px;}
.div_float{height: 300px;width: 60px;margin-top: 300px;
}.pic_switch{position: absolute;top: 2600px;left: 650px;width: 400px;height: auto;
}
.pic_bar{float: right;
}
.p_2{text-align: center;color: #000000;font-family:"font1";font-size: 40px;margin: 0 auto;
}
.p_1{text-align: center;color: #FFFFFF;font-family:"font1";font-size: 80px;margin: 0 auto;
}
.p_3{text-align: center;color: #000000;font-family:"font1";font-size: 19px;margin: 0 auto;
}
.p_about{font-size: 10px;color: #FFFFFF;text-indent: 2em;font-family: "微软雅黑";
}
.p_copy{text-align: center;font-family:"微软雅黑";color:#FFFFFF;font-size: 15px;
}.pic_about{border-radius: 5px;
}
.p_textabout{text-indent: 2em;
}.p_switch{text-align: center;font-size: 20px;font-family: "微软雅黑";
}
.p_storyjuqing{font-family: "微软雅黑";font-size: 20px;font-weight: bold;
}
.p_storyjuqing2{font-family: "微软雅黑";font-size: 20px;font-weight: bold;color: #FFFFFF;
}
.p_textabout2{text-indent: 2em;color: #FFFFFF;
}
.report_table{background-color: #FFFFFF;border-radius: 5px;
}
.table_about{background: #FFFFFF;
}
li{list-style:none;
}
@font-face {font-family:"font1";src:url(../font1.TTF);
}

三、JQuery的引用和使用

1.JQuery引用

1.下载JQuery库并放在自己网页的目录下       https://jquery.com/download/

2.在html内引入库文件

<script src="js/jquery.js" type="text/javascript"></script>

3.尽情造作吧~

2.JQuery的使用

1.流畅的锚点

先在html中写一个浮动的div,在里面写出普通的锚点,格式如下:

<a href="#story"></a>

加上鼠标经过图像,成品代码如下:

<div class="div_float"><a href="#index" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('button','','img/button/button_af.png',1)"><img src="img/button/button_bf.png" alt="" width="50" height="50" id="button"></a><p></p><a href="#story" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('button1','','img/button/button_af.png',1)"><img src="img/button/button_bf.png" alt="" width="50" height="50" id="button1"></a><p></p><a href="#switch" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('button2','','img/button/button_af.png',1)"><img src="img/button/button_bf.png" alt="" width="50" height="50" id="button2"></a><p></p><a href="#about" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('button3','','img/button/button_af.png',1)"><img src="img/button/button_bf.png" alt="" width="50" height="50" id="button3"></a>
</div>

在<script type="text/javascript"><script>中加入如下效果代码

$(document).ready(function() {  $('a[href*=#]').click(function() {  if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {  var $target = $(this.hash);  $target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']');  if ($target.length) {  var targetOffset = $target.offset().top;  $('html,body').animate({  scrollTop: targetOffset  },  1000);  return false;  }  }  });
});

 2.好看的小表za

模板,网上大把大把的,其他使用同理。

html内先引入下网上的模板js文件

<script src="js/jquery.MyDigitclock.js"></script>

在<script type="text/javascript"><script>中加入如下效果代码

$(document).ready(function(){$(function(){$("#clock2").MyDigitClock({fontSize:70, fontFamily:"Century gothic", fontColor: "#FFF", fontWeight:"bold", bAmPm:true,background:'#C90103',bShowHeartBeat:true});
});
});

写一个div,id为clock2

<div class="div_rightword"><div id="clock2"></div>

完成

四、结束啦

第一次分享自己的东西,很多地方说的不好,以后会慢慢丰富自己的,啾咪!

【JQuery】JQuery使用——网页作业相关推荐

  1. HTML静态网页作业——基于html+css+javascript+jquery+bootstarp响应式成都家乡介绍网页...

    家乡旅游景点网页作业制作 网页代码运用了DIV盒子的使用方法,如盒子的嵌套.浮动.margin.border.background等属性的使用,外部大盒子设定居中,内部左中右布局,下方横向浮动排列,大 ...

  2. HTML静态网页作业——基于html+css+javascript+jquery+bootstarp响应式成都家乡介绍网页

    家乡旅游景点网页作业制作 网页代码运用了DIV盒子的使用方法,如盒子的嵌套.浮动.margin.border.background等属性的使用,外部大盒子设定居中,内部左中右布局,下方横向浮动排列,大 ...

  3. 竖直菜单 html,jQuery实现的网页竖向菜单效果代码

    本文实例讲述了jQuery实现的网页竖向菜单效果代码.分享给大家供大家参考.具体如下: 这是一款基于jQuery实现竖向的网页菜单代码,可折叠展开的二级网页菜单,修改一下可用在后台管理中,显示在左侧的 ...

  4. JQuery 定期刷新网页,保持登录状态Session

    前言 360极速浏览器 13.0.2206.0 (正式版本) (32 位) 操作系统 Windows 10 OS Version 1909 (Build 18363.1379) JavaScript ...

  5. jQuery版本的网页开关灯、jQuery版本网页开关灯的另一种写法

    jQuery版本的网页开关灯 <!DOCTYPE html> <html lang="en"> <head><meta charset=& ...

  6. 国外常用的jQuery响应式网页模板

    简介: jQuery响应式网页,外国网站常用的风格 网盘下载地址: http://kekewangLuo.cc/LQpN52cS37a0 图片:

  7. android瀑布流视频自动播放,jquery实现的网页自动播放声音

    jquery实现的网页自动播放声音 复制代码 代码如下: $(function(){ //这里参考了以下两个站点的介绍 //http://www.w3school.com.cn/html/html_a ...

  8. HTML期末作业-旅游网页作业Html+css+Bootstarp

    HTML期末作业-旅游网页作业Html+css+JavaScript+Bootstarp,共有8个页面 部分网页截图 网页源码 <!DOCTYPE html> <html lang= ...

  9. 学生个人单页面网页作业 学生网页设计成品 静态HTML网页单页制作 dreamweaver网页设计与制作代码 web前端期末大作业

    HTML实例网页代码, 本实例适合于初学HTML的同学.该实例里面有设置了css的样式设置,有div的样式格局,这个实例比较全面,有助于同学的学习,本文将介绍如何通过从头开始设计个人网站并将其转换为代 ...

  10. web网页设计实例作业 ——电影泰坦尼克号(4页) HTML+CSS+JavaScript 学生HTML个人网页作业作品下载 个人网页设计制作 大学生个人网站作业模板 简单个人网页制作

    HTML5期末大作业:电影网站设计--电影泰坦尼克号(4页) HTML+CSS+JavaScript 学生HTML个人网页作业作品下载 个人网页设计制作 大学生个人网站作业模板 简单个人网页制作 文章 ...

最新文章

  1. NodeJS API简介
  2. python的软件叫什么-Python 是什么软件?
  3. 简单几行代码带你快速了解淘宝双十一的强大技术支撑点Sentinel+Nacos
  4. RabbitMQ系列教程之三:发布\/订阅(Publish\/Subscribe)
  5. junit5和junit4_JUnit 5符合AssertJ
  6. 亿级APP支付宝在移动端的高可用技术实践
  7. 一起学Windows phone7开发(五.一个时钟的例子)
  8. Rust : evmap库多读多写尝试
  9. 慧荣SM2258XT+B17颗粒,固态硬盘无法格式化已开卡成功,经验分享+量产工具,SM2259XT2类似
  10. 【网络】解决校园网Wi-Fi登录页无法自动弹出
  11. 为什么网站打得开,却ping不通, 网站却打得开
  12. 苹果笔记本安装系统显示英文的解决办法
  13. raid控制器缓存和硬盘缓存
  14. 测试工程师从面试到入职
  15. python转cython_10分钟带你入门Cython
  16. 2021 ICPC Asia EC网络预选赛I、II
  17. 直播软件搭建直播服务架构
  18. 特大通知!!!CSDN和简书博客以后同步更新
  19. 聚观早报 | 元旦机票预订量增长145%;小米集团副总裁崔宝秋离职
  20. vue开发web端实现列表左右联动效果

热门文章

  1. IOS 模仿qq分组那样展开与收起
  2. DeFi仍是鲸鱼的专属?前5名地址竟能占总供应量的40%以上
  3. 分析几款主流电子阅读器对TXT的分页处理
  4. cryptojs支持rsa加密_CryptoJS文件加密与解密
  5. CTF学习笔记一——RSA加密
  6. P1522 [USACO2.4]牛的旅行 Cow Tours
  7. 华为鸿蒙系统覆盖机型,华为公布升级计划:鸿蒙OS系统开始推送,覆盖百款机型...
  8. 吃货减肥福音!舔一舔尝遍天下美味?
  9. svm算法python实现_(转载)python应用svm算法过程
  10. 趣味python教程_Python趣味打怪:60秒学会一个例子,147段简单代码助你从入门到大师 | 中文资源...