通过bootstrap插件制作响应式导航!
来源:互联网 发布:c语言if else多个 编辑:程序博客网 时间:2024/05/16 15:02
1.首先下载 Responsive Nav插件。解压得到responsive-nav.css和responsive-nav.js文件,创建一个demo.html文件,并将三个文件放在一个目录中。
2.打开demo文件做如下修改:
<!doctype html>
<head>
<meta charset="utf-8">
<title>响应式导航</title>
<link rel="stylesheet" href="responsive-nav.css">
<script src="responsive-nav.js"></script>
</head>
<body>
<nav class="navlee">
<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>
</nav>
<script>
var navigation = responsiveNav(".navlee");
</script>
</body>
</html>
3.打开js文件。将里面相对应代码修改为如下即可:
// Default options
this.options = {
animate: true, // Boolean: Use CSS3 transitions, true or false
transition: 284, // Integer: Speed of the transition, in milliseconds
label: "Menu", // String: Label for the navigation toggle
insert: "before", // String: Insert the toggle before or after the navigation
customToggle: "", // Selector: Specify the ID of a custom toggle
closeOnNavClick: false, // Boolean: Close the navigation when one of the links are clicked
openPos: "relative", // String: Position of the opened nav, relative or static
navClass: "navlee", // String: Default CSS class. If changed, you need to edit the CSS too!
navActiveClass: "js-nav-active", // String: Class that is added to <html> element when nav is active
jsClass: "js", // String: 'JS enabled' class which is added to <html> element
init: function(){}, // Function: Init callback
open: function(){}, // Function: Open callback
close: function(){} // Function: Close callback
};
4.打开css文件将里面的class名称修改为你demo里面nav的class即可!
- 通过bootstrap插件制作响应式导航!
- 使用bootstrap制作响应式导航栏
- 使用BootStrap制作响应式导航
- bootstrap响应式导航
- bootstrap响应式导航
- Bootstrap响应式导航
- 利用Responsive Nav.js插件制作响应式导航
- BootStrap响应式导航条
- Bootstrap---导航条响应式
- 响应式导航的制作
- Bootstrap学习--响应式导航栏
- Bootstrap实现响应式导航栏效果
- Bootstrap 折叠(Collapse)插件制作侧边栏导航菜单
- bootstrap制作导航条
- Bootstrap 前端框架制作响应式网站
- Bootstrap附加导航插件
- bootstrap附加导航插件
- BootStrap中怎样学习响应式导航条
- Windows系统数据与WMI存储空间的对应关系
- 即时通讯
- Android内核 netdevices.txt文档说明
- C++里面的一个technique : Type Traits
- 通过apk安装包直接获取入口类和包名暨PackageManager 类的介绍
- 通过bootstrap插件制作响应式导航!
- Android Framework层Power键关机流程(二,关机流程)
- 线程池四个中断策略
- HTML5实现手机摇一摇更换背景色
- iOS8新特性之基于地理位置的消息通知UILocalNotification
- java基础汇总(二)
- IOS8下的UIScrollView有子控件时滑动经常不能滚动解决办法
- js获取根目录的方法
- use tptp to monitor java application performance (1)