一款基于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 ...
随机推荐
- maven profiles、filters、resources学习笔记 及 常用 plugin demo
这里只记了学习以下博客后,自己做的一个总结. 来源:http://blog.csdn.net/fengchao2016/article/details/72726101 profiles定义了一些不同 ...
- nginx反向代理proxy_set_header自定义header头无效
公司使用nginx作为负载均衡,有时候需要自定义header头发送给后端的真实服务器. 想过去应该是非常的简单的事情. 例子如下: 设置代理服务器ip头 1 proxy_set_header X- ...
- HDUOJ----4501小明系列故事——买年货(三维背包)
小明系列故事——买年货 Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total ...
- HDUOJ-4104 Discount
Discount Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Su ...
- 用Python实现BP神经网络(附代码)
用Python实现出来的机器学习算法都是什么样子呢? 前两期线性回归及逻辑回归项目已发布(见文末链接),今天来讲讲BP神经网络. BP神经网络 全部代码 https://github.com/lawl ...
- Linux命令-定时任务命令:crontab
linux定时任务命令相当于windows=>附件=>系统工具=>计划任务程序. 要想让linux定时任务生效,首先应该先启动crond服务,并且给这个服务设置开机自自动. 默认li ...
- 整理mysql的28个知识点(转)
版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/weixin_39220472/article/details/80247011整理mysql28个知 ...
- Orm框架开发之NewExpression合并问题
之前都是看别人写博客,自己没有写博客的习惯.在工作的过程中,总是会碰到许多的技术问题.有很多时候想记录下来,后面一直有许多的问题等着解决.总想着等系统完成了,再回头总结下.往往结果就把这事抛到脑后了. ...
- Ubuntu 10.04 安装流程
ubuntu 10.04 安装流程 需安装libxrender-dev才能跑html5 来自为知笔记(Wiz)
- Form_如何通过标准功能查找数据源(概念)
2014-06-01 Created By BaoXinjian