导航菜单

jQuery 滑块导航顶部固定特效代码

阿里云


jQuery 滑块导航顶部固定特效代码,在页面滚动的时候固定一个元素到浏览器窗口的顶部,让其总是保持在视图中可见。这款导航的特点是初始位于顶部下面一百个像素,当鼠标滚动时到下方,导航一直处于顶部。这个插件作用于多页的网站,但是对于单页的布局有额外的功能。借助 CSS,还可以实现当前视图关联的导航菜单的高亮显示功能。非常符合时下网页的审美需求,支持鼠标下拉滑动,欢迎对此段代码有兴趣的朋友前来下载使用。

  1. <link rel="stylesheet" href="css/style.css">
  2. <script src="js/jquery.min.js"></script>
  3. <script src="js/script.js"></script>
  4. <section class="et-hero-tabs">
  5.   <h1>粘性滑块导航</h1>
  6.   <h3>滑动内容与粘性选项卡导航</h3>
  7.     <div class="et-hero-tabs-container">
  8.         <a class="et-hero-tab" href="#tab-es6">ES6</a>
  9.         <a class="et-hero-tab" href="#tab-flexbox">Flexbox</a>
  10.         <a class="et-hero-tab" href="#tab-react">React</a>
  11.         <a class="et-hero-tab" href="#tab-angular">Angular</a>
  12.         <a class="et-hero-tab" href="#tab-other">Other</a>
  13.         <span class="et-hero-tab-slider"></span>
  14.     </div>
  15. </section>
  16. <!-- Main -->
  17. <main class="et-main">
  18.   <section class="et-slide" id="tab-es6">
  19.     <h1>ES6</h1>
  20.     <h3>something about es6</h3>
  21.   </section>
  22.   <section class="et-slide" id="tab-flexbox">
  23.     <h1>Flexbox</h1>
  24.     <h3>something about flexbox</h3>
  25.   </section>
  26.   <section class="et-slide" id="tab-react">
  27.     <h1>React</h1>
  28.     <h3>something about react</h3>
  29.   </section>
  30.   <section class="et-slide" id="tab-angular">
  31.     <h1>Angular</h1>
  32.     <h3>something about angular</h3>
  33.   </section>
  34.   <section class="et-slide" id="tab-other">
  35.     <h1>Other</h1>
  36.     <h3>something about other</h3>
  37.   </section>
  38. </main>
  39. <script src="js/jquery.min.js"></script>
也想出现在这里?联系我们
创客主机

jQuery 滑块导航顶部固定特效代码

已有 285 人购买
  • tc1q
查看演示升级 VIP立刻购买

演示地址 下载地址
收藏
(1)

发表回复

热销模板

Ashade - 作品展示摄影相册WordPress汉化主题
LensNews

本站承接 WordPress / PbootCMS / DedeCMS 等
系统建站、仿站、开发、定制等业务!