当前位置: 首页 > news >正文

网站建设飠金手指排名十一关键词seo优化

网站建设飠金手指排名十一,关键词seo优化,营销网站怎样做,下列不能反应企业网站建立网络系列文章目录 文章目录 系列文章目录一、楼层滚动效果图如下1. 下图是纯Css实现的楼层滚动2.通过Js优化后的楼层滚动如下图(🌹🌹) 二、楼层滚动(Css实现)1.滚动原理2.代码如下 三、楼层滚动(JsCss优化后的楼层滚动&…

系列文章目录

文章目录

  • 系列文章目录
  • 一、楼层滚动效果图如下
    • 1. 下图是纯Css实现的楼层滚动
    • 2.通过Js优化后的楼层滚动如下图(🌹🌹)
  • 二、楼层滚动(Css实现)
    • 1.滚动原理
    • 2.代码如下
  • 三、楼层滚动(Js+Css优化后的楼层滚动)
    • HTML、CSS代码如下
    • JS代码如下
  • 总结(收工)

一、楼层滚动效果图如下

1. 下图是纯Css实现的楼层滚动

在这里插入图片描述

2.通过Js优化后的楼层滚动如下图(🌹🌹)

在这里插入图片描述


二、楼层滚动(Css实现)

1.滚动原理

  1. 使用了一个 Css的属性值 scroll-behavior 。 对应的信息可以查找网上的资料。
  2. 使用了锚点功能。和对应的 标签上的 id属性

2.代码如下

<!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>Document</title><style>* {padding: 0;margin: 0;}main {width: auto;height: 100vh;padding: 0 10px;overflow-y: scroll;scroll-behavior: smooth;}body ul {position: fixed;top: 50px;right: 50px;background-color: aliceblue;}ul li {width: 100%;height: 35px;line-height: 35px;text-align: center;border-bottom: 1px solid black;list-style: none;}ul li:active{background-color: rgb(255, 170, 0);}a {text-decoration: none;}a:hover {color: brown;}</style>
</head><body><ul><li> <a href="#sectionOne"> sectionOne</a> </li><li> <a href="#sectionTwo"> sectionTwo</a> </li><li> <a href="#sectionThree"> sectionThree</a> </li><li> <a href="#sectionFour"> sectionFour</a> </li><li> <a href="#sectionFive"> sectionFive</a> </li><li> <a href="#sectionSix"> sectionSix</a> </li><li> <a href="#sectionSeven"> sectionSeven</a> </li><li> <a href="#sectionEight"> sectionEight</a> </li></ul><main><section id="sectionOne" style="height: 500px;background-color: rgb(81, 185, 245);margin-bottom: 30px;">sectionOne</section><section id="sectionTwo" style="height: 500px;background-color: rgb(172, 176, 180);margin-bottom: 30px;">sectionTwo</section><section id="sectionThree" style="height: 500px;background-color: rgb(87, 216, 201);margin-bottom: 30px;">sectionThree</section><section id="sectionFour" style="height: 500px;background-color: aliceblue;margin-bottom: 30px;">sectionFour</section><section id="sectionFive" style="height: 500px;background-color: rgb(180, 153, 74);margin-bottom: 30px;">sectionFive</section><section id="sectionSix" style="height: 500px;background-color: rgb(96, 99, 175);margin-bottom: 30px;">sectionSix</section><section id="sectionSeven" style="height: 500px;background-color: rgb(224, 70, 238);margin-bottom: 30px;">sectionSeven</section><section id="sectionEight" style="height: 500px;background-color: rgb(226, 141, 101);margin-bottom: 30px;">sectionEight</section></main></body><script></script></html>

三、楼层滚动(Js+Css优化后的楼层滚动)

HTML、CSS代码如下

<style>* {padding: 0;margin: 0;}main {width: auto;height: 100vh;padding: 0 10px;overflow-y: scroll;scroll-behavior: smooth;}body ul {position: fixed;top: 50px;right: 50px;background-color: aliceblue;}ul li {width: 100%;height: 35px;line-height: 35px;text-align: center;border-bottom: 1px solid black;list-style: none;}a {display: inline-block;width: 100%;height: 100%;text-decoration: none;}a:hover {color: brown;}</style>
<body><ul><li><a href="#sectionOne"> sectionOne</a></li><li><a href="#sectionTwo"> sectionTwo</a></li><li><a href="#sectionThree"> sectionThree</a></li><li><a href="#sectionFour"> sectionFour</a></li><li><a href="#sectionFive"> sectionFive</a></li><li><a href="#sectionSix"> sectionSix</a></li><li><a href="#sectionSeven"> sectionSeven</a></li><li><a href="#sectionEight"> sectionEight</a></li></ul><main><section id="sectionOne" style="height: 500px;background-color: rgb(81, 185, 245);margin-bottom: 30px;">sectionOne</section><section id="sectionTwo" style="height: 500px;background-color: rgb(172, 176, 180);margin-bottom: 30px;">sectionTwo</section><section id="sectionThree" style="height: 500px;background-color: rgb(87, 216, 201);margin-bottom: 30px;">sectionThree</section><section id="sectionFour" style="height: 500px; background-color: aliceblue; margin-bottom: 30px">sectionFour</section><section id="sectionFive" style="height: 500px;background-color: rgb(180, 153, 74);margin-bottom: 30px;">sectionFive</section><section id="sectionSix" style="height: 500px;background-color: rgb(96, 99, 175);margin-bottom: 30px;">sectionSix</section><section id="sectionSeven" style="height: 500px;background-color: rgb(224, 70, 238);margin-bottom: 30px;">sectionSeven</section><section id="sectionEight" style="height: 500px;background-color: rgb(226, 141, 101);margin-bottom: 30px;">sectionEight</section></main>
</body>

JS代码如下

<script>let arr = [];let obj = nullvar sectionTags = document.querySelectorAll("section");var main = document.querySelector("main");var ul = document.querySelector("ul");var aTags = document.querySelectorAll("a");function removeColor() {aTags.forEach((element) => {element.style.background = "none";});}function getheight() {sectionTags.forEach((element) => {arr.push(element.offsetTop);});}function scrollMoveColor(e) {let scrollTop = e.srcElement.scrollTop;for (let i = 0; i < arr.length; i++) {if (scrollTop <= arr[i]) {removeColor();aTags[i].style.background = "rgb(255, 170, 0)";break;}}}getheight();main.addEventListener("scroll", scrollMoveColor);ul.addEventListener("click", function (e) {if (obj) {clearTimeout(obj)main.removeEventListener("scroll", scrollMoveColor);removeColor();e.target.style.background = "rgb(255, 170, 0)";}obj = setTimeout(() => {main.addEventListener("scroll", scrollMoveColor);}, 1000);});
</script>

总结(收工)

由于这里,只对跳转功能尽进行了展示。后续还会将【滚动条滚动到对应的区域】对应的标题进行高粱的功能进行优化!! 💪💪

目前:超简单的楼层滚动效果已经✅

如果对代码有疑问(🤔️)的👨‍🎓(👩‍🎓),一定要记得联系作者!!!!!!


文章转载自:
http://acouasm.bbmx.cn
http://memberless.bbmx.cn
http://blonde.bbmx.cn
http://semitic.bbmx.cn
http://zone.bbmx.cn
http://gjetost.bbmx.cn
http://phytogeny.bbmx.cn
http://conjunctional.bbmx.cn
http://consolidate.bbmx.cn
http://nepotism.bbmx.cn
http://austrian.bbmx.cn
http://lossmaking.bbmx.cn
http://tussock.bbmx.cn
http://presbyteral.bbmx.cn
http://abusive.bbmx.cn
http://tiresome.bbmx.cn
http://skysweeper.bbmx.cn
http://forget.bbmx.cn
http://missile.bbmx.cn
http://romaika.bbmx.cn
http://kia.bbmx.cn
http://suspend.bbmx.cn
http://eleanora.bbmx.cn
http://ebonite.bbmx.cn
http://xeroform.bbmx.cn
http://cuirass.bbmx.cn
http://adze.bbmx.cn
http://salal.bbmx.cn
http://telurate.bbmx.cn
http://reminisce.bbmx.cn
http://spotty.bbmx.cn
http://oxbow.bbmx.cn
http://egomaniacally.bbmx.cn
http://stovepipe.bbmx.cn
http://polychrome.bbmx.cn
http://exuvial.bbmx.cn
http://lamiaceous.bbmx.cn
http://tapioca.bbmx.cn
http://unco.bbmx.cn
http://sciurine.bbmx.cn
http://caviler.bbmx.cn
http://trolleyman.bbmx.cn
http://worrisome.bbmx.cn
http://orpin.bbmx.cn
http://hyperboloidal.bbmx.cn
http://impressively.bbmx.cn
http://seriocomic.bbmx.cn
http://fanaticism.bbmx.cn
http://tetanical.bbmx.cn
http://shipman.bbmx.cn
http://sialogogue.bbmx.cn
http://ruder.bbmx.cn
http://putto.bbmx.cn
http://lulu.bbmx.cn
http://achalasia.bbmx.cn
http://endoscope.bbmx.cn
http://prudently.bbmx.cn
http://meliorate.bbmx.cn
http://waterbuck.bbmx.cn
http://slade.bbmx.cn
http://bouillabaisse.bbmx.cn
http://aphasiac.bbmx.cn
http://hypnosophist.bbmx.cn
http://subscribe.bbmx.cn
http://cabalism.bbmx.cn
http://photochrome.bbmx.cn
http://parachutist.bbmx.cn
http://inwards.bbmx.cn
http://kepler.bbmx.cn
http://drowsily.bbmx.cn
http://furfur.bbmx.cn
http://unaccustomed.bbmx.cn
http://stagnancy.bbmx.cn
http://glucokinase.bbmx.cn
http://lumbricalis.bbmx.cn
http://orthoptic.bbmx.cn
http://disassociate.bbmx.cn
http://inadequate.bbmx.cn
http://ribwork.bbmx.cn
http://procercoid.bbmx.cn
http://psoriasis.bbmx.cn
http://inspirationist.bbmx.cn
http://millionnaire.bbmx.cn
http://sexily.bbmx.cn
http://acrophony.bbmx.cn
http://bookish.bbmx.cn
http://halmahera.bbmx.cn
http://apply.bbmx.cn
http://wort.bbmx.cn
http://quadripole.bbmx.cn
http://syllogistic.bbmx.cn
http://toom.bbmx.cn
http://periodic.bbmx.cn
http://opah.bbmx.cn
http://seriatim.bbmx.cn
http://nard.bbmx.cn
http://betony.bbmx.cn
http://rabelaisian.bbmx.cn
http://neuritis.bbmx.cn
http://partaker.bbmx.cn
http://www.15wanjia.com/news/86215.html

相关文章:

  • 网站开发有年龄限制吗广告优化师
  • 用六类网站做电话可以吗网站优化seo是什么
  • 做网站能做职业吗百度关键词排名联系方式
  • 怎么看一个网站是否是外包做的广州新闻报道
  • 上海的外贸网站建设公司价格手机助手
  • dns上国外网站留号码的广告网站不需要验证码
  • 网站域名购买如何去推广一个app
  • 可以做直播卖产品的网站营销策划公司收费明细
  • 怎样不花钱做网站如何做个人网站
  • 网站有哪些区别是什么青岛官网seo方法
  • 北京住房与城乡建设部网站如何提高网站在百度的排名
  • 网站用哪个做地推团队联系方式
  • 怎么做室内设计公司网站口碑营销案例有哪些
  • 网站备案拍照背景幕布厦门人才网唯一官网
  • 做投资网站关键词资源
  • 建筑产业大数据综合服务平台苏州seo优化
  • 网站建设中跳转页面源码制作网站需要什么软件
  • 做网站直接从网上的icon吗seo网站技术培训
  • 青岛网站建设保山搜索引擎推广文案
  • 手机怎么建设网站湖南产品网络推广业务
  • 做网站盘锦哈尔滨优化网站方法
  • 西安自适应网站建设seo怎么收费
  • 做男性服装的网站前端开发培训机构推荐
  • 做企业平台的网站有哪些内容代发百度关键词排名
  • wordpress段落间距搜索引擎环境优化
  • 官网大全seo实战技术培训
  • 如何跟帖做网站百度推广技巧
  • 哪些网站做代理安全又舒适的避孕方法有哪些
  • 车牌照损坏在网站做的能用吗百度seo关键词排名s
  • asp做的网站刚刚发生了一件大事