一款基于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 ...
随机推荐
- JQuery 在线参考手册
官方JQuery API http://api.jquery.com/ 在线参考手册 http://www.w3school.com.cn/jquery/index.asp 在线参考手册1 ...
- iOS-仿京东6位密码支付输入框
概述 用于安全支付的密码支付输入框. 详细 代码下载:http://www.demodashi.com/demo/10709.html 开发需求中有时候我们需要用于安全支付的功能, 需要设置APP钱包 ...
- 老毛桃pe装机工具备份系统
电脑故障可以说是难以避免的,误操作或者修改了哪个设置系统就莫名其妙崩溃了.这在日常使用当中并不鲜见,许多用户就会寻求备份系统方法.有没有好的一键备份系统教程可以参考呢?在本篇教程中,就容我跟大家讲讲怎 ...
- PHP API中,MYSQL与MYSQLI的持久连接区别
转载自:http://www.cnxct.com/some-differences-between-mysql-and-mysqli-of-persistent-connection/ 很久很久以前, ...
- 安装Python 3.6
原文地址:https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/00143160904 ...
- matplotlib热图
1.基础知识点回顾 1.plot(x, y, marker='D')表示绘制折线图,marker设置样式菱形. 2.scatter(x, y, marker='s', color='r')绘制散点图, ...
- python os库学习笔记
os.getcwd(): 获取当前目录 os.name: 获取当前使用的操作系统 eg: print os.name os.remove(): 删除指定文件 eg: os.remove('test.t ...
- redis 学习札记4-sortset
redis 学习笔记4--sortset redis学习笔记3--sortSet 终于到最后一个数据结构了,加油!! 整体结构图: http://dl.iteye.com/upload/picture ...
- ORACLE11g中毒恢复
很不幸的,win2003server疏于管理,中毒了,清理了病毒以后.oracle也瘫痪了.上次备份还在一周前,这一周的数据咋办? 首先的想法,是另找一台机器,装个一模一样的oracle.再把被删的文 ...
- python3 functools partial 用于函数的包装器详解
一.partial 的作用: partial 用于对一个已有函数进行包装,达到功能的定制的目的. 二.例子: 假设我们要完成两个功能,第一个功能是完成两个数相加,第二个功能是给一个自增一下 1.传统方 ...