jquery固定标题控制插件Midnight.js

所属分类:UI-背景

 41550  532  查看评论 (7)
分享到微信朋友圈
X
 jquery固定标题控制插件Midnight.js ie兼容10

使用方法 

创建一个固定标题

<nav class="fixed">
  <a class="logo">Logo</a>
</nav>


确保标题位置固定然后选取你页面有导航栏的部分,添加数据-midnight="你的类",这个类正好是你的标题要使用的风格。如果你不使用属性或只留下空白。默认的标题将被用于这部分。

<section data-midnight="white">
  <h1>A section with a dark background, so a white nav would look better here</h1>
</section>
<div data-midnight="blue">
  <h1>A blue nav looks better here</h1>
</div>
<footer>
  <h1>This will just use the default header</h1>
</footer>


多个标题在必要时将创建基于这些部分中声明的类。

你可以在你的css样式类.midnightHeader使用。您的类(类替换为正确的)。例如:

.midnightHeader.default {
  background: none;
  color: black;
}
.midnightHeader.white {
  background: white;
  color: black;
}
.midnightHeader.blue {
  background: blue;
  color: white;
}
.midnightHeader.red {
  background: red;
  color: white;
}


加载并初始化它

<script src="midnight.jquery.js"></script>
<script>
  // Start midnight
  $(document).ready(function(){
    // Change this to the correct selector for your nav.
    $('nav.fixed').midnight();
  });
</script>


相关插件-背景

首页大屏背景图平滑切换

首页大屏背景图平滑切换
  背景
 38786  388

jquery固定标题控制插件Midnight.js

midnight.js是在页面滚动时控制多标题设计的开关jQuery插件,所以对应下面的内容你总能看到一个标题。
  背景
 41551  532

全屏背景滚动

基于HTML5的炫酷个人网站模板
  背景
 76045  1076

jQuery动态改变文字和背景颜色效果

jQuery动态改变文字和背景颜色效果
  背景
 48371  373

讨论这个项目(7)回答他人问题或分享插件使用方法奖励jQ币 评论用户自律公约

    lilei1 0
    2017/3/7 15:38:41
    lilei1 0
    2017/3/7 15:38:37
    lilei1 0
    2017/3/7 15:38:30
    西瓜 0
    2015/5/26 17:06:51
    @摘下怀念 - /记住美妙 可以正常下载,下载直接用网页下载,不要用迅雷等下载软件。 回复
    摘下怀念 - /记住美妙 0
    2015/5/26 17:05:18
    课时下载不了,这是什么呢,哎
        Ttttsky0
        2016/8/15 15:08:28
        支持一下作者。。花上点钱
        jws20030
        2017/10/26 14:27:12

        可以的啊

    回复
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
😃
  • 😀
  • 😉
  • 😥
  • 😵
  • 😫
  • 😘
  • 😡
  • 👍
  • 🌹
  • 👏
  • 🍺
  • 🍉
  • 🌙
  • 💖
  • 💔
取消回复