<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{margin: 0;padding: 0;}
ul,ol li{list-style: none;}
ul{position: fixed;top: 30px;right:100px;width: 50px;height: 300px;border: 0px solid red;}
ul li{height: 50px;text-align: center;line-height: 50px;background: cadetblue;
color: #fff;font-weight: bold;cursor: pointer;border: 1px solid #fff;}
ul .active{background: coral;color: #666;}
html,body,ol{height: 100%;}
ol li{height: 100%;width: 100%;color: #fff;font-size: 20px;font-weight: bold;}
.li1{background: teal;}
.li2{background: brown;}
.li3{background: tomato;}
.li4{background: goldenrod;}
.li5{background: crimson;}
</style>
&
页面跳转(点击菜单栏,跳转到相对应模块高度,注意导入jquery-1.11.1.js包)
最新推荐文章于 2021-09-07 14:35:19 发布
本文介绍如何通过JavaScript实现点击菜单栏时,页面自动跳转到相应模块的特定高度。强调了需要引入jquery-1.11.1.js库来辅助完成这一功能。
摘要由CSDN通过智能技术生成