zoukankan      html  css  js  c++  java
  • Responsive Nav

    引入文件

    <!-- 引入这些文件至 <head> 中 -->
    <link rel="stylesheet" href="responsive-nav.css">
    <script src="responsive-nav.js"></script>

    添加标签

    <div id="nav">
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Projects</a></li>
        <li><a href="#">Contact</a></li>
      </ul>
    </div>

    启动此插件

    <!-- 将下面这段代码放置在 </body> 之前 -->
    <script>
      var navigation = responsiveNav("#nav");
    </script>

    调整参数

    var navigation = responsiveNav("#nav", {

    // Selector: The ID of the wrapper animate: true, // Boolean: 是否启动CSS过渡效果(transitions), true 或 false transition: 400, // Integer: 过渡效果的执行速度,以毫秒(millisecond)为单位 label: "Menu", // String: Label for the navigation toggle insert: "after", // String: Insert the toggle before or after the navigation customToggle: "", // Selector: Specify the ID of a custom toggle openPos: "relative", // String: Position of the opened nav, relative or static jsClass: "js", // String: 'JS enabled' class which is added to <html> el debug: false, // Boolean: Log debug messages to console, true 或 false init: function(){}, // Function: Init callback open: function(){}, // Function: Open callback close: function(){} // Function: Close callback });

    可调用的方法

    // 销毁插件
    navigation.destroy();
    
    // Toggle
    navigation.toggle();
  • 相关阅读:
    用户模版
    VC让对话框显示就最大化
    C#中char[]与string之间的转换
    c#调用C++DLL参数对应
    解决:对 PInvoke 函数的调用导致堆栈不对称问题 <转载>
    git 命令的使用
    me 云面试
    Django 自定义模板语法
    Django session 源码流程
    云计算的介绍
  • 原文地址:https://www.cnblogs.com/sdream/p/5464788.html
Copyright © 2011-2022 走看看