时间:2023-10-05 06:12:01 | 来源:网站运营
时间:2023-10-05 06:12:01 来源:网站运营
HTML网页大作业代码【免费代码已上传】:精彩专栏推荐 文末获取联系 ✍️ 作者简介: 一个热爱把逻辑思维转变为代码的技术博主 作者主页: 【主页—— 获取更多优质源码】 web前端期末大作业: 【 毕设项目精品实战案例 (1000套) 】 程序员有趣的告白方式:【 HTML七夕情人节表白网页制作 (110套) 】 超炫酷的Echarts大屏可视化源码:【 echarts大屏展示大数据平台可视化(150套) 】 免费且实用的WEB前端学习指南: 【 web前端零基础到高级学习视频教程 120G干货分享】 关于作者: 历任研发工程师,技术组长,教学总监;曾于2016年、2020年两度荣获CSDN年度十大博客之星。 十载寒冰,难凉热血;多年过去,历经变迁,物是人非。 然而,对于技术的探索和追求从未停歇。 坚持原创,热衷分享,初心未改,继往开来!
Dreamweaver、HBuilder、Vscode 、Sublime 、Webstorm、Text 、Notepad++
等任意html编辑软件进行运行及修改编辑等操作)。 其中: (1) html文件包含:其中index.html是首页、其他html为二级页面; (2) css文件包含:css全部页面样式,文字滚动, 图片放大等; (3) js文件包含:js实现动态轮播特效, 表单提交, 点击事件等等(个别网页中运用到js代码)。<!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"> <title>home</title> <!-- 全局样式 --> <link rel="stylesheet" href="css/style.css"> <!-- 页面样式 --> <link rel="stylesheet" href="css/home.css"></head><body> <!-- 头部 --> <header> <div id="title"> <ul id="title_top"> <li> <a href=""> <img src="picture/home.png" alt=""> </a> </li> <li> <a href=""> <img src="picture/search.png" alt=""> </a> </li> <li> <a href=""> <img src="picture/info.png" alt=""> </a> </li> <li> <a href=""> <img src="picture/cart.png" alt=""> </a> </li> <li> <a href=""> <img src="picture/language.png" alt=""> </a> </li> </ul> <img id="logo" src="picture/logo.png" alt=""> <div id="title_botom"> <ul> <li> <a href="">about</a> </li> <span>|</span> <li> <a href="">design your own</a> </li> <span>|</span> <li> <a href="">products</a> </li> <span>|</span> <li> <a href="">discover</a> </li> <span>|</span> <li> <a href="">skate together</a> </li> <span>|</span> <li> <a href="">contact us</a> </li> </ul> </div> </div> </header> <!-- 轮播图块 --> <div class="content"> <ul class="wrapper"> <li><img src="picture/slide1.png"></li> <li><img src="picture/slide2.png"></li> <li><img src="picture/slide3.png"></li> <li><img src="picture/slide1.png"></li> </ul> <ul class="radius"> </ul> <div class="prev"> <span><</span> </div> <div class="next"> <span>></span> </div> </div> <!-- mmunity skatelovers块 --> <div id="mmunity"> <h2>skatelovers</h2> <h3>community</h3> <div id="mmunity_main"> <p>With our genuine passion for what we do, we hope to share this and</p> <p>the amazing sport of skateboarding to everyone in Hong Kong who</p> <p>has felt intimidated to try it out. Providing a community for all</p> <p>skateboard lovers, you can find everything about skateboarding here</p> <div id="DISCOVER"> <a href=""> DISCOVER MORE </a> </div> </div> <img src="picture/run.png" alt=""> </div> <!-- ue des块 --> <div id="uedes"> <h2>create</h2> <h3>unique design</h3> <div id="uedes_left"> <img src="picture/tongue.png" alt=""> </div> <div id="uedes_right"> <div style="display: flex;"> <div id="uedes_right_main"> <img src="picture/customize.png" alt=""> <p>Choose your deck and spare parts</p> </div> <div id="uedes_right_main"> <img src="picture/review.png" alt=""> <p>Review your design </p> </div> </div> <div style="display: flex;"> <div id="uedes_right_main"> <img src="picture/cart2.png" alt=""> <p>Checkout in cart </p> </div> <div id="uedes_right_main"> <img src="picture/delivery.png" alt=""> <p>Receive confirm email and wait for the package</p> </div> </div> <div id="getstart"> <a href=""> GET START ! </a> </div> </div> </div> <!-- youll块 --> <div id="youll"> <h2>you'll</h2> <h3>never skate alone </h3> <p>Creating a network of friends to skate with leads to new opportunities</p> <p> and experiences. Anyone can find and hang with other like-minded </p> <p> skate lovers in this skateboarding community. </p> <div id="SKATE"> <a href=""> SKATE TOGETHER </a> </div> <img src="picture/sun.png" alt=""> </div> <!-- 返回顶部 --> <div id="back"> <a href="#title"></a> </div> <footer> <div id="footer_top"> <div></div> <img src="picture/logo.png" alt=""> <div></div> </div> <div id="footer"> <div id="littlebox"> <div id="footer_title"> <div id="footer_title_left"> <p> FAQ </p> <p> terms & conditions </p> <p> privacy policy </p> </div> <div id="footer_title_main"> <img src="picture/whatsapp.png" alt=""> <img src="picture/instagram.png" alt=""> <img src="picture/facebook.png" alt=""> <img src="picture/twitter.png" alt=""> </div> <div id="footer_title_left"> <p> shipping info </p> <p> returns / exchange </p> <p> skateboard care </p> </div> </div> </div> <div id="clear"> </div> <p>Weekly Newspaper</p> <p>Want to get special offers? Join us!</p> <div id="shurukaung"> <input type="text" placeholder="name@email.com"> <p> <a href=""> subscribe </a> </p> </div> <div id="footer_bottom"> <span>all rights reserved 2022 © !</span> <span class="fenge">|</span> <span><img src="picture/logo.png" alt=""></span> </div> </div> </footer></body><script> window.onload = function() { var content = document.getElementsByClassName('content')[0] var wrapper = document.getElementsByClassName('wrapper')[0] var radius = document.getElementsByClassName('radius')[0] var prev = document.getElementsByClassName('prev')[0] var next = document.getElementsByClassName('next')[0] var imgWidth = wrapper.children[0].offsetWidth var wrapIndex = 0 //悬停显隐 content.onmouseover = function() { clearInterval(timer) next.style.opacity = "0.6"; prev.style.opacity = "0.6"; } content.onmouseout = function() { timer = setInterval(function() { next.onclick() }, 3500) next.style.opacity = "0"; prev.style.opacity = "0"; } //动态创建圆点指示器 function createLi() { for (let i = 0; i < wrapper.children.length - 1; i++) { let li = document.createElement("li") radius.appendChild(li) } radius.children[0].className = 'radius-active' } createLi() //指示器响应 function cirAction(wrapIndex) { for (let i = 0; i < radius.children.length; i++) { radius.children[i].classList.remove("radius-active") } if (wrapIndex === wrapper.children.length - 1) { radius.children[0].className = 'radius-active' } else { radius.children[wrapIndex].className = 'radius-active' } } //指示器控制 function cirMouse() { for (let i = 0; i < radius.children.length; i++) { radius.children[i].onmouseover = function() { clearInterval(timer); animate(wrapper, -i * imgWidth); wrapIndex = i; cirAction(wrapIndex) } } } cirMouse() //滑动动画 function animate(el, target) { clearInterval(el.timer) el.timer = setInterval(function() { let move = 25; let present = wrapper.offsetLeft; move = present > target ? -move : move; present += move; if (Math.abs(present - target) > Math.abs(move)) { wrapper.style.left = present + 'px' } else { clearInterval(el.timer); wrapper.style.left = target + 'px' } }, 16) } //next控制 next.onclick = function() { if (wrapIndex === wrapper.children.length - 1) { wrapIndex = 0; wrapper.style.left = 0 + 'px'; } wrapIndex++; animate(wrapper, -wrapIndex * imgWidth); cirAction(wrapIndex); } //prev控制 prev.onclick = function() { if (wrapIndex === 0) { wrapIndex = wrapper.children.length - 1; wrapper.style.left = -wrapIndex * imgWidth + 'px'; } wrapIndex--; animate(wrapper, -wrapIndex * imgWidth); cirAction(wrapIndex) } //自动滑动 var timer = setInterval(function() { next.onclick() }, 3500) }</script></html>
.content { width: 1280px; height: 963px; position: relative; overflow: hidden; margin: 0 auto;}.wrapper { width: 400%; height: 100%; margin: 0; padding: 0; position: absolute; top: 0; left: 0; display: flex; transition: none;}.wrapper li { flex: 1; list-style: none; margin: 0; padding: 0;}.wrapper li img { width: 100%;}.radius { height: 12px; margin: 0; padding: 0; position: absolute; bottom: 10px; left: 10px; display: flex; align-items: center;}.radius li { width: 8px; height: 8px; border-radius: 50%; background-color: white; opacity: 0.6; margin: 0 3px; padding: 0; list-style: none;}.radius-active { opacity: 1 !important; border: 2px solid rgb(255, 255, 255, 0.5); background-clip: padding-box;}.prev { width: 23px; line-height: 34px; text-align: center; position: absolute; left: 0; top: 50%; margin-top: -17px; background-color: rgba(169, 169, 169, 0); opacity: 0;}.next { width: 23px; line-height: 34px; text-align: center; position: absolute; right: 0; top: 50%; margin-top: -17px; background-color: rgba(169, 169, 169, 0); opacity: 0;}.prev span,.next span { font-weight: bold; color: white; font-size: 30px;}#mmunity { position: relative; width: 1280px; margin: 0 auto; text-align: center; padding-top: 90px; padding-bottom: 120px;}#mmunity_main { text-align: left; margin-left: 120px; font-family: dierge; color: #6C6D76; line-height: 30px; font-size: 16px; width: 500px; /* word-spacing: 5px; */}#DISCOVER { width: 183px; margin: 0 auto; height: 30px; font-size: 14px; font-family: diyige; font-weight: 600 !important; text-align: center; color: #63595A; line-height: 32px; border: 1px solid #63595A; border-radius: 32px; margin-top: 20px;}#mmunity img { position: absolute; width: 350px; top: 100px; right: 120px;}#uedes { width: 1280px; margin: 0 auto; background-image: url(../image/bg1.JPG); background-size: 100%; padding-top: 70px;}#uedes h2,h3 { width: 100%; text-align: center;}#uedes_left { position: relative; display: inline-block; text-align: left; left: 80px; top: -80px;}#uedes_left img { width: 380px;}#uedes_right { float: right; width: 650px; margin-top: 40px;}#uedes_right_main { display: inline-block; width: 220px; height: 220px; background-color: #d2d0d17d; border: 1px solid #4b4a4c; border-radius: 20px; text-align: center; margin-right: 50px; margin-bottom: 50px;}#uedes_right_main img { width: 40%; margin-top: 40px; margin-bottom: 20px;}#uedes_right_main p { width: 80%; margin: 0 auto; color: #808096; font-family: dierge;}#getstart { width: 140px; text-align: center; height: 30px; line-height: 30px; font-family: diyige; color: #ffff; border: 2px solid #fff; border-radius: 15px; margin-left: 175px;}#getstart a { color: #ffff;}#getstart a:hover { color: #2FBAD7;}#youll { width: 1280px; text-align: center; padding-top: 70px; padding-bottom: 40px; margin: 0 auto;}#youll p { color: #808096; font-family: dierge; line-height: 30px;}#SKATE { width: 190px; margin: 0 auto; text-align: center; height: 30px; line-height: 30px; border-radius: 15px; border: 1px solid black; margin-top: 30px; font-size: 14px;}#SKATE:hover { color: #2FBAD7;}#youll img { margin-top: 50px; width: 300px;}
请 “ 点赞” “✍️评论” “ 收藏”
一键三连哦! 【 关注我| 获取更多源码 | 优质文章】
带您学习各种前端插件、3D炫酷效果、图片展示、文字效果、以及整站模板 、大学生毕业HTML模板 、期末大作业模板 、等! 「在这里有好多 前端 开发者,一起探讨 前端 Node 知识,互相学习」!关键词:免费,作业