Toggle navigation
在线编辑器
在线代码
文本比较
jQuery下载
前端库
在线手册
登录/注册
下载代码
html
css
js
分享到微信朋友圈
X
html
Menu1
Submenu1
Submenu2
Submenu3
Menu2
Submenu1
Submenu2
Menu3
Submenu1
Submenu2
Submenu3
Submenu4
css
ul { list-style: none; } a { text-decoration: none; color: black;} body { font-family: 'Dosis', sans-serif; background: #FF5722; } #menu-wrapper { overflow: hidden; max-width: 100%; cursor: pointer; } #menu-wrapper #hamburger-menu { position: relative; width: 25px; height: 20px; margin: 15px; } #menu-wrapper #hamburger-menu span { opacity: 1; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; left: 0; display: block; width: 100%; height: 2px; border-radius: 10px; color: black; background-color: white; position: absolute; -webkit-transform: rotate(0deg); transform: rotate(0deg); -webkit-transition: .4s ease-in-out; transition: .4s ease-in-out; } #menu-wrapper #hamburger-menu span:nth-child(1) { top: 0; } #menu-wrapper #hamburger-menu span:nth-child(2) { top: 9px; } #menu-wrapper #hamburger-menu span:nth-child(3) { top: 18px; } #menu-wrapper #hamburger-menu.open span:nth-child(1) { top: 9px; -webkit-transform: rotate(135deg); transform: rotate(135deg); } #menu-wrapper #hamburger-menu.open span:nth-child(2) { opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; left: -60px; } #menu-wrapper #hamburger-menu.open span:nth-child(3) { top: 9px; -webkit-transform: rotate(-135deg); transform: rotate(-135deg); } #menu-container .menu-list .menu-submenu { padding-top: 20px; padding-bottom: 20px; } #menu-container .menu-list { padding-left: 0; display: block; position: absolute; width: 100%; max-width: 450px; background: white; box-shadow: rgba(100,100,100,0.2) 6px 2px 10px; z-index: 999; overflow-y: auto; overflow-x: hidden; left: -100%; } #menu-container .menu-list li.accordion-toggle, #menu-container .menu-list .menu-login { font-size: 16px; padding: 20px; text-transform: uppercase; border-top: 1px solid #dbdcd2; } #menu-container .menu-list li:first-of-type { border-top: 0; } .accordion-toggle, .accordion-content { cursor: pointer; font-size: 16px; position: relative; letter-spacing: 1px; } .accordion-content { display: none; } .accordion-toggle a:before, .accordion-toggle a:after { content: ''; display: block; position: absolute; top: 50%; right: 30px; width: 15px; height: 2px; margin-top: -1px; background-color: #5a5858; -webkit-transform-origin: 50% 50%; -ms-transform-origin: 50% 50%; transform-origin: 50% 50%; -webkit-transition: all 0.3s; transition: all 0.3s ease-out; } .accordion-toggle a:before { -webkit-transform: rotate(-90deg); -ms-transform: rotate(-90deg); transform: rotate(-90deg); opacity: 1; z-index: 2; } .accordion-toggle.active-tab { background: yellowgreen; transition: all 0.3s ease; } .accordion-toggle a.active:before { -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); background: #fff !important; } .accordion-toggle a.active:after { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); background: #fff !important; opacity: 0; }
JavaScript
$(function() { function slideMenu() { var activeState = $("#menu-container .menu-list").hasClass("active"); $("#menu-container .menu-list").animate({left: activeState ? "0%" : "-100%"}, 400); } $("#menu-wrapper").click(function(event) { event.stopPropagation(); $("#hamburger-menu").toggleClass("open"); $("#menu-container .menu-list").toggleClass("active"); slideMenu(); $("body").toggleClass("overflow-hidden"); }); $(".menu-list").find(".accordion-toggle").click(function() { $(this).next().toggleClass("open").slideToggle("fast"); $(this).toggleClass("active-tab").find(".menu-link").toggleClass("active"); $(".menu-list .accordion-content").not($(this).next()).slideUp("fast").removeClass("open"); $(".menu-list .accordion-toggle").not(jQuery(this)).removeClass("active-tab").find(".menu-link").removeClass("active"); }); }); // jQuery load
粒子
时间
文字
hover
canvas
3d
游戏
音乐
火焰
水波
轮播图
鼠标跟随
动画
css
加载动画
导航
菜单
按钮
滑块
tab
弹出层
统计图
svg
×
Close
在线代码下载提示
开通在线代码永久免费下载,需支付20jQ币
开通后,在线代码模块中所有代码可终身免费下!
您已开通在线代码永久免费下载,关闭提示框后,点下载代码可直接下载!
您已经开通过在线代码永久免费下载
对不起,您的jQ币不足!可通过发布资源 或
直接充值获取jQ币
取消
开通下载
<!doctype html> <html> <head> <meta charset="utf-8"> <title>jQuery汉堡包风琴菜单-jq22.com</title> <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script> <style>
</style> </head> <body>
<script>
</script>
</body> </html>
2012-2021 jQuery插件库版权所有
jquery插件
|
jq22工具库
|
网页技术
|
广告合作
|
在线反馈
|
版权声明
沪ICP备13043785号-1
浙公网安备 33041102000314号