日本不卡不码高清免费观看,久久国产精品久久w女人spa,黄色aa久久,三上悠亚国产精品一区二区三区

您的位置:首頁技術(shù)文章
文章詳情頁

JS實現(xiàn)移動端可折疊導(dǎo)航菜單(現(xiàn)代都市風(fēng))

瀏覽:202日期:2024-05-01 09:27:20

效果圖

JS實現(xiàn)移動端可折疊導(dǎo)航菜單(現(xiàn)代都市風(fēng))

1.html部分

<!DOCTYPE html><html lang='en'><head> <meta charset='UTF-8'> <title>index</title> <link rel='stylesheet' rel='external nofollow' > <link rel='stylesheet' href='http://www.b3g6.com/bcjs/css/style.css' rel='external nofollow' ></head><body><div class='htmleaf-container'> <div id='wrapper'> <!-- 菜單 --> <div class='menu'> <img src='http://www.b3g6.com/bcjs/images/golden-gate-lights.jpg' /> <ul> <li><a href='http://www.b3g6.com/bcjs/14552.html'>About</a></li> <li><a href='http://www.b3g6.com/bcjs/14552.html'>Share</a></li> <li><a href='http://www.b3g6.com/bcjs/14552.html'>Activity</a></li> <li><a href='http://www.b3g6.com/bcjs/14552.html'>Settings</a></li> <li><a href='http://www.b3g6.com/bcjs/14552.html'>Contact</a></li> </ul> </div> <div class='screen'> <div class='navbar'></div> <div class='list'> <div class='item'><div class='img'></div><span></span><span></span><span></span> </div> <div class='item'><div class='img'></div><span></span><span></span><span></span> </div> <div class='item'><div class='img'></div><span></span><span></span><span></span> </div> <div class='item'><div class='img'></div><span></span><span></span><span></span> </div> </div> <div class='burger'> <div class='x'></div> <div class='y'></div> <div class='z'></div> </div> </div> </div></div><script src=’https://libs.baidu.com/jquery/1.10.2/jquery.min.js’></script><script src=’js/script.js’></script></body></html>

2.css部分

/*basic*/@import 'https://fonts.googleapis.com/css?family=Raleway:200,500,700,800'; @font-face { font-family:icomoon; src:url(../fonts/icomoon.eot?rretjt); src:url(../fonts/icomoon.eot?#iefixrretjt) format(’embedded-opentype’), url(../fonts/icomoon.woff?rretjt) format(’woff’), url(../fonts/icomoon.ttf?rretjt) format(’truetype’), url(../fonts/icomoon.svg?rretjt#icomoon) format(’svg’); font-weight:400; font-style:normal}[class^=icon-],[class*=' icon-'] { font-family:icomoon; speak:none; font-style:normal; font-weight:400; font-variant:normal; text-transform:none; line-height:1; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale}body,html { font-size:100%; padding:0; margin:0}*,*:after,*:before { -webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box}.clearfix:before,.clearfix:after { content:' '; display:table}.clearfix:after { clear:both}body { background:#f9f7f6; color:#404d5b; font-weight:500; font-size:1.05em; font-family:segoe ui,lucida grande,Helvetica,Arial,microsoft yahei,FreeSans,Arimo,droid sans,wenquanyi micro hei,hiragino sans gb,hiragino sans gb w3,fontawesome,sans-serif}a { color:#2fa0ec; text-decoration:none; outline:none}a:hover,a:focus { color:#74777b}.htmleaf-container { margin:0 auto; text-align:center; overflow:hidden}.htmleaf-content { font-size:150%; padding:1em 0}.htmleaf-content h2 { margin:0 0 2em; opacity:.1}.htmleaf-content p { margin:1em 0; padding:5em 0 0; font-size:.65em}.bgcolor-1 { background:#f0efee}.bgcolor-2 { background:#f9f9f9}.bgcolor-3 { background:#e8e8e8}.bgcolor-4 { background:#2f3238; color:#fff}.bgcolor-5 { background:#df6659; color:#521e18}.bgcolor-6 { background:#2fa8ec}.bgcolor-7 { background:#d0d6d6}.bgcolor-8 { background:#3d4444; color:#fff}.bgcolor-9 { background:#ef3f52; color:#fff}.bgcolor-10 { background:#64448f; color:#fff}.bgcolor-11 { background:#3755ad; color:#fff}.bgcolor-12 { background:#3498db; color:#fff}.htmleaf-header { padding:1em 190px; letter-spacing:-1px; text-align:center}.htmleaf-header h1 { color:#fff; font-weight:600; font-size:2em; line-height:1; margin-bottom:0; font-family:segoe ui,lucida grande,Helvetica,Arial,microsoft yahei,FreeSans,Arimo,droid sans,wenquanyi micro hei,hiragino sans gb,hiragino sans gb w3,fontawesome,sans-serif}.htmleaf-header h1 span { font-family:segoe ui,lucida grande,Helvetica,Arial,microsoft yahei,FreeSans,Arimo,droid sans,wenquanyi micro hei,hiragino sans gb,hiragino sans gb w3,fontawesome,sans-serif; display:block; font-size:60%; font-weight:400; padding:.8em 0 .5em; color:#c3c8cd}.htmleaf-demo a { color:#1d7db1; text-decoration:none}.htmleaf-demo { width:100%; padding-bottom:1.2em}.htmleaf-demo a { display:inline-block; margin:.5em; padding:.6em 1em; border:3px solid #1d7db1; font-weight:700}.htmleaf-demo a:hover { opacity:.6}.htmleaf-demo a.current { background:#1d7db1; color:#fff}.htmleaf-links { position:relative; display:inline-block; white-space:nowrap; font-size:1.5em; text-align:center}.htmleaf-links::after { position:absolute; top:0; left:50%; margin-left:-1px; width:2px; height:100%; background:#dbdbdb; content:’’; -webkit-transform:rotate3d(0,0,1,22.5deg); transform:rotate3d(0,0,1,22.5deg)}.htmleaf-icon { display:inline-block; margin:.5em; padding:0 0; width:1.5em; text-decoration:none}.htmleaf-icon span { display:none}.htmleaf-icon:before { margin:0 5px; text-transform:none; font-weight:400; font-style:normal; font-variant:normal; font-family:icomoon; line-height:1; speak:none; -webkit-font-smoothing:antialiased}.htmleaf-footer { width:100%; padding-top:10px}.htmleaf-small { font-size:.8em}.center { text-align:center}.related { position:absolute; top:100%; left:0; width:100%; color:#fff; background:#333; text-align:center; font-size:1.25em; padding:.5em 0; overflow:hidden}.related>a { vertical-align:top; width:calc(100% - 20px); max-width:340px; display:inline-block; text-align:center; margin:20px 10px; padding:25px; font-family:segoe ui,lucida grande,Helvetica,Arial,microsoft yahei,FreeSans,Arimo,droid sans,wenquanyi micro hei,hiragino sans gb,hiragino sans gb w3,fontawesome,sans-serif}.related a { display:inline-block; text-align:left; margin:20px auto; padding:10px 20px; opacity:.8; -webkit-transition:opacity .3s; transition:opacity .3s; -webkit-backface-visibility:hidden}.related a:hover,.related a:active { opacity:1}.related a img { max-width:100%; opacity:.8; border-radius:4px}.related a:hover img,.related a:active img { opacity:1}.related h3 { font-family:microsoft yahei,sans-serif}.related a h3 { font-weight:300; margin-top:.15em; color:#fff}.icon-htmleaf-home-outline:before { content:'e5000'}.icon-htmleaf-arrow-forward-outline:before { content:'e5001'}@media screen and (max-width:50em) { .htmleaf-header { padding:3em 10% 4em}.htmleaf-header h1 { font-size:2em}}@media screen and (max-width:40em) { .htmleaf-header h1 { font-size:1.5em}}@media screen and (max-width:30em) { .htmleaf-header h1 { font-size:1.2em}}/*demo1*/* { margin:0; padding:0}body { background:#383c55; width:100%; height:100%; font:12px open sans,sans-serif}#wrapper { width: 100%; height: 100%; overflow: hidden; position: absolute; background: #111;}div.screen { width: 100%; height: 100%; overflow:hidden; position:absolute; top:0; left:0; background:#31558a; -webkit-transition:all 500ms cubic-bezier(0,.995,.99,1); -moz-transition:all 500ms cubic-bezier(0,.995,.99,1); -ms-transition:all 500ms cubic-bezier(0,.995,.99,1); -o-transition:all 500ms cubic-bezier(0,.995,.99,1); transition:all 500ms cubic-bezier(0,.995,.99,1)}div.screen.animate { left:80%; -webkit-transition:all 500ms cubic-bezier(0,.995,.99,1); -moz-transition:all 500ms cubic-bezier(0,.995,.99,1); -ms-transition:all 500ms cubic-bezier(0,.995,.99,1); -o-transition:all 500ms cubic-bezier(0,.995,.99,1); transition:all 500ms cubic-bezier(0,.995,.99,1)}.list { margin-top: 100px; text-align: left;}.item { height: 328px; padding-left: 182px; clear: both;}.item .img,.item span { background:#214273; border-radius:3px}.item .img { float: left; width: 200px; height: 200px; margin-left: -93px;}.item span { height: 30px; width: 62%; margin-bottom: 48px; margin-left: 9%; float: left;}.item span:nth-of-type(3) { width:75px; margin-botom:0}div.burger { height: 100px; width: 100px; position: absolute; top: 11px; left: 50px; cursor: pointer;}div.x,div.y,div.z { position:absolute; margin:auto; top:0; bottom:0; background:#fff; border-radius:2px; -webkit-transition:all 200ms ease-out; -moz-transition:all 200ms ease-out; -ms-transition:all 200ms ease-out; -o-transition:all 200ms ease-out; transition:all 200ms ease-out}div.x,div.y,div.z { height: 10px; width: 60px; -webkit-transition:all 100ms ease-out; -moz-transition:all 100ms ease-out; -ms-transition:all 100ms ease-out; -o-transition:all 100ms ease-out; transition:all 100ms ease-out}div.y.squize { width:0; -webkit-transition:all 100ms ease-out; -moz-transition:all 100ms ease-out; -ms-transition:all 100ms ease-out; -o-transition:all 100ms ease-out; transition:all 100ms ease-out}div.y { top:39px;}div.z { top:80px;}div.open div.x,div.open div.z { top:19px; -webkit-transition:all 70ms ease-out; -moz-transition:all 70ms ease-out; -ms-transition:all 70ms ease-out; -o-transition:all 70ms ease-out; transition:all 70ms ease-out}div.rotate30 { -ms-transform:rotate(30deg); -webkit-transform:rotate(30deg); transform:rotate(30deg); -webkit-transition:all 70ms ease-out; -moz-transition:all 70ms ease-out; -ms-transition:all 70ms ease-out; -o-transition:all 70ms ease-out; transition:all 70ms ease-out}div.rotate150 { -ms-transform:rotate(150deg); -webkit-transform:rotate(150deg); transform:rotate(150deg); -webkit-transition:all 70ms ease-out; -moz-transition:all 70ms ease-out; -ms-transition:all 70ms ease-out; -o-transition:all 70ms ease-out; transition:all 70ms ease-out}div.rotate45 { -ms-transform:rotate(45deg); -webkit-transform:rotate(45deg); transform:rotate(45deg); -webkit-transition:all 100ms ease-out; -moz-transition:all 100ms ease-out; -ms-transition:all 100ms ease-out; -o-transition:all 100ms ease-out; transition:all 100ms ease-out}div.rotate135 { -ms-transform:rotate(135deg); -webkit-transform:rotate(135deg); transform:rotate(135deg); -webkit-transition:all 100ms ease-out; -moz-transition:all 100ms ease-out; -ms-transition:all 100ms ease-out; -o-transition:all 100ms ease-out; transition:all 100ms ease-out}div.navbar { height:200px; background:#385e97}div.menu { height:568px; width:320px; margin-left:-190px; opacity:0; position:relative; -webkit-transition:all 500ms cubic-bezier(0,.995,.99,1); -moz-transition:all 500ms cubic-bezier(0,.995,.99,1); -ms-transition:all 500ms cubic-bezier(0,.995,.99,1); -o-transition:all 500ms cubic-bezier(0,.995,.99,1); transition:all 500ms cubic-bezier(0,.995,.99,1)}#menu-bg { position:absolute; left:-10px; top:-120px; opacity:.3; -webkit-transition:all 500ms cubic-bezier(0,.995,.99,1); -moz-transition:all 500ms cubic-bezier(0,.995,.99,1); -ms-transition:all 500ms cubic-bezier(0,.995,.99,1); -o-transition:all 500ms cubic-bezier(0,.995,.99,1); transition:all 500ms cubic-bezier(0,.995,.99,1)}div.menu.animate #menu-bg { width: 350%; left: -143px; -webkit-transition:all 500ms cubic-bezier(0,.995,.99,1); -moz-transition:all 500ms cubic-bezier(0,.995,.99,1); -ms-transition:all 500ms cubic-bezier(0,.995,.99,1); -o-transition:all 500ms cubic-bezier(0,.995,.99,1); transition:all 500ms cubic-bezier(0,.995,.99,1)}div.menu.animate { width:100%; margin-left: -110px; opacity: 1; -webkit-transition: all 500ms cubic-bezier(0,.995,.99,1); -moz-transition: all 500ms cubic-bezier(0,.995,.99,1); -ms-transition: all 500ms cubic-bezier(0,.995,.99,1); -o-transition: all 500ms cubic-bezier(0,.995,.99,1); transition: all 500ms cubic-bezier(0,.995,.99,1);}div.menu ul { position: relative; padding-top: 200px;}div.menu ul li { list-style: none; width: 100%; margin-top: 120px; text-align: left; padding-left: 300px; font-size: 50px;}div.menu ul li a { color:#fff; text-decoration:none; letter-spacing:1px}div.menu.animate ul li { margin-left: 80px; -webkit-transition:all 800ms cubic-bezier(0,.995,.99,1); -moz-transition:all 800ms cubic-bezier(0,.995,.99,1); -ms-transition:all 800ms cubic-bezier(0,.995,.99,1); -o-transition:all 800ms cubic-bezier(0,.995,.99,1); transition:all 800ms cubic-bezier(0,.995,.99,1)}div.menu.animate li:nth-of-type(1) { transition-delay:0s}div.menu.animate li:nth-of-type(2) { transition-delay:.06s}div.menu.animate li:nth-of-type(3) { transition-delay:.12s}div.menu.animate li:nth-of-type(4) { transition-delay:.18s}div.menu.animate li:nth-of-type(5) { transition-delay:.24s}

3.JS部分

$(document).ready(function() { if (’ontouchstart’ in window) { var click = ’touchstart’; } else { var click = ’click’; } $(’div.burger’).on(click, function () { if (!$(this).hasClass(’open’)) { openMenu(); } else { closeMenu(); } }); $(’div.menu ul li a’).on(click, function (e) { e.preventDefault(); closeMenu(); }); function openMenu() { $(’div.burger’).addClass(’open’); $(’div.y’).fadeOut(100); $(’div.screen’).addClass(’animate’); setTimeout(function () { $(’div.x’).addClass(’rotate30’); $(’div.z’).addClass(’rotate150’); $(’.menu’).addClass(’animate’); setTimeout(function () {$(’div.x’).addClass(’rotate45’);$(’div.z’).addClass(’rotate135’); }, 100); }, 10); } function closeMenu() { $(’div.screen, .menu’).removeClass(’animate’); $(’div.y’).fadeIn(150); $(’div.burger’).removeClass(’open’); $(’div.x’).removeClass(’rotate45’).addClass(’rotate30’); $(’div.z’).removeClass(’rotate135’).addClass(’rotate150’); setTimeout(function () { $(’div.x’).removeClass(’rotate30’); $(’div.z’).removeClass(’rotate150’); }, 50); setTimeout(function () { $(’div.x, div.z’).removeClass(’collapse’); }, 70); }});

以上就是JS實現(xiàn)移動端可折疊導(dǎo)航菜單(現(xiàn)代都市風(fēng))的詳細(xì)內(nèi)容,更多關(guān)于JS實現(xiàn)折疊導(dǎo)航菜單的資料請關(guān)注好吧啦網(wǎng)其它相關(guān)文章!

標(biāo)簽: JavaScript
相關(guān)文章:
日本不卡不码高清免费观看,久久国产精品久久w女人spa,黄色aa久久,三上悠亚国产精品一区二区三区
日韩久久一区二区三区| 精品深夜福利视频| 高清日韩中文字幕| 欧美亚洲综合视频| 亚洲精品三级| www.九色在线| 免费成人性网站| 伊人精品视频| 日韩a一区二区| 婷婷综合电影| 伊人久久大香线蕉av超碰演员| 麻豆91小视频| 日韩精品一二三| 日本va欧美va欧美va精品| 蜜臀av在线播放一区二区三区| 99国产精品久久久久久久| 在线日韩成人| 亚洲精品四区| 日韩av在线播放中文字幕| 欧美交a欧美精品喷水| 久久精品三级| 欧美日本久久| 成人一二三区| 中文字幕一区久| 久久激情婷婷| 天使萌一区二区三区免费观看| 亚洲网站视频| 国产99在线| 日韩欧美另类一区二区| 国产精品66| 国产精品福利在线观看播放| 久久久久久色 | 日韩精品欧美大片| 久久国产生活片100| 国产极品模特精品一二| 精品日韩一区| 久久精品国内一区二区三区水蜜桃| 久久九九99| 综合激情婷婷| 美女久久久精品| 婷婷激情一区| 免费的成人av| 亚洲综合日韩| 国产精品毛片久久久| 日韩国产激情| 美女毛片一区二区三区四区| 美女精品视频在线| 今天的高清视频免费播放成人| 免费日韩一区二区| 日韩国产一二三区| 四虎成人av| 欧美aa国产视频| 麻豆久久精品| 亚洲永久av| 激情91久久| 日韩激情综合| 久久久久午夜电影| 一区二区三区国产在线| 国产精品红桃| 久久香蕉精品| 国产高清视频一区二区| 四虎4545www国产精品 | 麻豆精品在线观看| 亚洲婷婷免费| 国产精品一区二区免费福利视频 | 日韩手机在线| 91视频久久| 国产日韩一区二区三区在线播放| 日韩成人三级| 国产亚洲第一伦理第一区| 国产亚洲毛片| 日韩综合一区| 清纯唯美亚洲综合一区| 久久aⅴ国产紧身牛仔裤| 麻豆91在线播放| 黑丝一区二区三区| 日韩欧美少妇| 久久激情综合网| 国产一区二区中文| 国产成人久久精品一区二区三区| 久久人人99| 国产精品黄色片| 亚洲综合婷婷| 激情六月综合| 欧美精品第一区| 热久久国产精品| 久久视频国产| 水蜜桃久久夜色精品一区| 美女视频黄 久久| 久久亚洲国产精品一区二区| 日韩精品不卡一区二区| 麻豆成人综合网| 涩涩涩久久久成人精品| 99pao成人国产永久免费视频| 中文字幕色婷婷在线视频| 亚洲乱码一区| 国产一区日韩欧美| 国产免费av国片精品草莓男男| 日本va欧美va瓶| 亚洲一区国产| 亚洲a在线视频| 免费污视频在线一区| 麻豆精品在线| 欧美日韩91| 国产亚洲欧美日韩在线观看一区二区 | 欧美精品国产| 国产欧美日韩免费观看| 日韩精品视频网| 亚洲最大av| 欧美日韩亚洲一区三区| 日韩三区四区| 亚洲最新av| 欧美亚洲色图校园春色| 亚洲综合小说| 欧美一级专区| 日韩一区二区三区高清在线观看| 亚洲精华国产欧美| 亚洲精品123区| 亚洲精品在线国产| 在线一区免费观看| 午夜久久福利| 中文字幕日本一区| 综合亚洲视频| 日韩av黄色在线| 红杏一区二区三区| 老牛国内精品亚洲成av人片| 欧美激情亚洲| 日韩久久一区二区三区| 婷婷成人在线| 一区久久精品| 日韩国产精品久久久久久亚洲| 91九色综合| 国产日韩欧美在线播放不卡| 精品三级av在线导航| 久久av超碰| 成人在线视频免费看| 久久久国产精品网站| 日韩精品1区| 红桃视频国产一区| 日韩一区欧美二区| 日韩精品第二页| 国产精品美女在线观看直播| 精品一区二区三区中文字幕在线| 国产网站在线| 国内精品福利| 亚洲一卡久久| 日韩高清成人在线| 在线人成日本视频| 1024精品一区二区三区| 欧美精品资源| 日韩手机在线| 久久久久97| 欧美日韩一区二区三区视频播放| 一区二区电影在线观看| 日韩和欧美一区二区三区| 国产福利一区二区三区在线播放| 久久精品一区二区不卡| 视频一区二区中文字幕| 国产日韩欧美在线播放不卡| 精品国产99| 亚洲欧美日韩国产一区| 精品国产乱码久久久| 久久精品青草| 亚洲精品99| 国产精品毛片aⅴ一区二区三区| 热三久草你在线| 久久不射中文字幕| 日本欧美国产| 久久99伊人| 亚欧洲精品视频在线观看| 一区二区三区四区日本视频| 亚洲色诱最新| 亚州av日韩av| 激情久久五月| 欧美日韩一区二区三区四区在线观看| 日本不卡视频一二三区| 国产成人a视频高清在线观看| 亚洲三级视频| 亚洲作爱视频| 国产伊人久久| 国产精品流白浆在线观看| 亚洲网址在线观看| 在线精品小视频| 韩国三级一区| 国产一区二区久久久久| 欧美亚洲自偷自偷| 午夜天堂精品久久久久| 免费国产自线拍一欧美视频| 欧美成人国产| 日韩精品一区二区三区免费观影| 久久精品国产免费| 日本久久二区| 久久亚洲欧洲| 午夜一区在线| 日韩高清不卡| 激情视频网站在线播放色| 麻豆一区二区三区| 国产欧美一区二区色老头| 久久激情综合网| 欧美亚洲色图校园春色|