一款基于jquery的侧边栏导航
之前为大家介绍了好多导航菜单,今天给大家分享一款基于jquery的侧边栏导航。这款导航侧边滑出,适合放在手机网页或webapp。一看下实现的效果图:

实现的代码。
html代码:
<div style="position: relative; overflow: hidden;">
<div class="top">
<img src="menu.png" height="35" class="menu_btn" align="left" />
<font style="padding-left: 10px;">Material design animation</font>
</div>
<div id="grey_back">
</div>
<div id="menu_smartphone" class="menu_mobile_app" align="left">
<ul style="overflow-y: auto;">
<div class="background_profil">
</div>
<div class="pics_profil">
</div>
<div class="name_profil">
www.wifeo.com<font style="font-weight: 300; color: #999999;">/code</font></div>
<li><a href="#">MENU 1</a></li>
<li><a href="#">MENU 2</a></li>
<li><a href="#">MENU 3</a></li>
<li><a href="#">MENU 4</a></li>
</ul>
</div>
<div class="card">
</div>
<div class="card">
</div>
</div>
css代码:
#menu_smartphone
{
height: 100%;
position: absolute;
background: #ffffff;
top:;
bottom:;
left: -570px;
width: 570px;
}
#menu_smartphone ul
{
padding:;
margin:;
list-style: none;
color: #999999;
}
#menu_smartphone ul li
{
height: 70px;
padding-left: 10px;
line-height: 70px;
}
#menu_smartphone ul li:hover
{
background: #f7f7f7;
}
#menu_smartphone ul li a
{
color: #999999;
text-decoration: none;
font-family: 'Roboto';
font-weight:;
font-size: 25px;
}
.background_profil
{
background-image: url(fond.png);
height: 240px;
}
.pics_profil
{
width: 130px;
height: 130px;
border-radius: 50%;
background-size: cover;
background-image: url(welcome.png);
margin-top: -65px;
}
.name_profil
{
font-size: 37px;
font-family: 'Roboto';
font-weight:;
color: #666666;
margin-top: -50px;
margin-left: 140px;
margin-bottom: 40px;
}
.top
{
background-color: #e51c23;
height: 70px;
position: absolute;
top: 0px;
width: 100%;
line-height: 70px;
color: #ffffff;
font-size: 20px;
font-weight:;
font-family: 'Roboto';
padding-left: 10px;
text-align: left;
}
#grey_back
{
display: none;
background-color: #000000;
opacity: 0.7;
width: 100%;
height: 100%;
position: absolute;
top:;
}
.card
{
width: 90%;
height: 300px;
background-color: #ffffff;
margin: 10px;
padding: 20px;
color: #666666;
font-weight:;
font-size: 36px;
text-align: center;
font-family: 'Roboto';
box-shadow: 0 0 2px #999999;
}
.menu_btn
{
cursor: pointer;
left: 0px;
margin-top: 16px;
}
js代码:
$(document).ready(function () {
var isMenuOpen = false;
$('.menu_btn').click(function () {
if (isMenuOpen == false) {
$("#menu_smartphone").clearQueue().animate({
left: '0px'
})
$("#grey_back").fadeIn('fast');
$(this).fadeOut(200);
$(".close").fadeIn(300);
isMenuOpen = true;
}
});
$('#grey_back').click(function () {
if (isMenuOpen == true) {
$("#menu_smartphone").clearQueue().animate({
left: '-570px'
})
$("#page").clearQueue().animate({
"margin-left": '0px'
})
$("#grey_back").fadeOut('fast');
$(this).fadeOut(200);
$(".menu_btn").fadeIn(300);
isMenuOpen = false;
}
});
});
注:本文爱编程原创文章,转载请注明原文地址:http://www.w2bc.com/Article/9180
一款基于jquery的侧边栏导航的更多相关文章
- 基于jquery的侧边栏分享导航
今天给大家分享一款基于jquery的侧边栏分享导航.这款分享钮一直固定于左侧,鼠标经过的时候凸出显示,这款分享按钮适用浏览器:IE8.360.FireFox.Chrome.Safari.Opera.傲 ...
- 一款基于jQuery仿淘宝红色分类导航
今天给大家分享一款基于jQuery仿淘宝红色分类导航.这款分类导航适用浏览器:IE8.360.FireFox.Chrome.Safari.Opera.傲游.搜狗.世界之窗.效果图如下: 在线预览 ...
- 一款基于jquery和css3的响应式二级导航菜单
今天给大家分享一款基于jquery和css3的响应式二级导航菜单,这款导航是传统的基于顶部,鼠标经过的时候显示二级导航,还采用了当前流行的响应式设计.效果图如下: 在线预览 源码下载 实现的代码. ...
- 一款基于jquery固定于顶部的导航
今天给大家分享一款基于jquery固定于顶部的导航,这款导航当浏览器滚动条位于顶部时,导航高度较高,当浏览器滚动向下滚动时,导航高度自动减低,并位于顶部.效果图如下: 在线预览 源码下载 实现的代 ...
- 一款基于jquery滑动后固定于顶部的导航
之前已为大家介绍了好多css3实现的导航菜单.今天分享一款基于jquery滑动后固定于顶部的导航.这款导航的特点是初始位于顶部下面一百个像素,当鼠标滚动时到下方,导航一直处于顶部.效果图如下: 在线预 ...
- 一款基于jQuery的仿百度首页滑动选项卡
今天给大家分享一款基于jQuery的仿百度首页滑动选项卡.这款选项卡适用浏览器:IE8.360.FireFox.Chrome.Safari.Opera.傲游.搜狗.世界之窗.效果图如下: 在线预览 ...
- 10款基于jquery实现的超酷动画源码
1.jQuery二级下拉菜单 下拉箭头翻转动画 之前我们分享过不少基于jQuery的二级下拉菜单,甚至是多级的下拉菜单,比如这款jQuery/CSS3飘带状多级下拉菜单就非常华丽.但今天要介绍的这款j ...
- 10款基于jquery的web前端特效及源码下载
1.jQuery时间轴插件:jQuery Timelinr 这是一款可用于展示历史和计划的时间轴插件,尤其比较适合一些网站展示发展历程.大事件等场景.该插件基于jQuery,可以滑动切换.水平和垂直滚 ...
- 基于jQuery垂直多级导航菜单代码
基于jQuery垂直多级导航菜单代码是一款黑色风格的jQuery竖直导航菜单特效下载.效果图如下: 在线预览 源码下载 实现的代码. html代码: <ul class="ce&q ...
随机推荐
- 启动ip wizard时报the ip wizard does not support dhcp
启动ip wizard时报the ip wizard does not support dhcp 阅读:5502012-05-11 11:15 标签:loadrunner 打开ip wizard:开始 ...
- NFS详解
00.什么是 NFS (Network FileSystem) NFS 就是 Network FileSystem 的缩写,最早之前是由 sun这家公司所发展出来的. 他最大的功能就是可以透过网络,让 ...
- xmlhttp.readyState==4 && xmlhttp.status==200的探究
作为一个后端人员,很惭愧,对Ajax的使用只局限在功能实现层面的交互,对底层通过XMLHttpRequest对象来使用的知识却没有仔细研究过.现总结如下 1. XMLHttpRequest 对象的相关 ...
- ASP.NET 加入返回参数ReturnValue
说明:很多时候,在DBHelper函数中,都能看到以下的代码: cmd.Parameters.Add(, ParameterDirection.ReturnValue, , , string.Empt ...
- DropBox 超实用的免费文件网络同步、备份、分享工具
http://www.iplaysoft.com/dropbox.html DropBox 就是一款非常好用的免费网络文件同步工具(当然它也算是一个服务).当你在电脑A使用DropBox时,指定文件夹 ...
- python - multi-mechanize 安装笔记
1. multi-mechanize 是什么Multi-Mechanize 是一个开源的性能和负载测试框架,它并发运行多个 Python 脚本对网站或者服务生成负载(组合事务).测试输出报告保存为HT ...
- 再看C#中的托付和事件
在一口一个设计模式--观察者模式中.我们已经知道怎样应用观察者模式,但通过近期的深入学习,发现观察者模式存在下面缺陷: 1.抽象通知者依赖于抽象观察者: 2.每一个详细观察者被调用的方法必须一致. 比 ...
- Python直接赋值、浅拷贝和深度拷贝解析
直接赋值:其实就是对象的引用(别名). 浅拷贝(copy):拷贝父对象,不会拷贝对象的内部的子对象. 深拷贝(deepcopy): copy 模块的 deepcopy 方法,完全拷贝了父对象及其子对象 ...
- 多进程对 MySQL update的影响
今天要做数据清洗的时候,要更新一个数据库字段,考虑到用多进程去更新数据库,也许程序会跑得快一些,结果开了64个进程, 结果是其他程序更新的时候,速度非常慢,最后发现的原因是,数据库中有64个SQL语句 ...
- servlet中 getRealPath deprecated(被废弃)
servlet中, HttpRequestServlent req; req.getRealPath 被废弃,使用this.getServletContext().getRealPath()替代: