jquery和css3實(shí)現(xiàn)的炫酷時尚的菜單導(dǎo)航
今天為大家?guī)淼氖莏query和css3實(shí)現(xiàn)的不錯的導(dǎo)航菜單。點(diǎn)擊列表圖表后,內(nèi)容頁面向內(nèi)移動顯示菜單項(xiàng)。當(dāng)單擊關(guān)閉菜單按鈕時,菜單項(xiàng)隱藏,內(nèi)容頁恢復(fù)原位。看下圖
我們看下實(shí)現(xiàn)代碼:
html代碼:
<div style="position: relative; height: 400px; width: 825px; margin: auto;"> <div class="contener"> <div id="corp_page" style="overflow: scroll"> <div style="width: 100%"> <table align="center" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr> <td style="padding: 10px; font-weight: 100; color: #ffffff;" valign="top"> WIFEO/CODE </td> </tr> <tr> <td style="padding: 10px;" valign="top"> Post hoc impie perpetratum quod in aliis quoque iam timebatur, tamquam licentia crudelitati indulta per suspicionum nebulas aestimati quidam noxii damnabantur. quorum pars necati, alii puniti bonorum multatione actique laribus suis extorres nullo sibi relicto praeter querelas et lacrimas, stipe conlaticia victitabant, et civili iustoque imperio ad voluntatem converso cruentam, claudebantur opulentae domus et clarae. </td> </tr> </tbody> </table> </div> </div> </div> <div class="menu"> Item 2<br /> <br /> Item 3<br /> <br /> Item 4<br /> <br /> <img id="btn_menu_close" src="2.png" style="cursor: pointer;" /></div> <div style="top: 0; left: 0; position: absolute; cursor: pointer;"> <img id="btn_menu" src="1.png" /> </div> </div>
css代碼:
.contener { -webkit-perspective:600px; -moz-perspective:600px; -ms-perspective:600px; perspective:600px; top: 0; bottom: 0; left: 0; right:0; position: absolute; margin: 50px; z-index: 2; } #corp_page { top: 0; bottom: 0; left: 0; right:0; position: absolute; background-color:#DC4B39; padding: 20px; -webkit-transform: rotateY( 0deg ); -webkit-transition: all .3s; -webkit-transform-origin: 100% 100%; -webkit-transform-style: preserve-3d; -moz-transform: rotateY( 0deg ); -moz-transition: all .3s; -moz-transform-origin: 100% 100%; -moz-transform-style: preserve-3d; -ms-transform: rotateY( 0deg ); -ms-transition: all .3s; -ms-transform-origin: 100% 100%; -ms-transform-style:; transform: rotateY( 0deg ); transition: all .3s; transform-origin: 100% 100%; transform-style: preserve-3d; } .menu { top:0; bottom:0; left:90px; width: 200px; position: absolute; margin: 5px; display: none; margin-top:50px; background-color:transparent; }
js代碼:
$(document).ready(function () { $('#btn_menu').click(function () { $("#corp_page").css({ "-webkit-transform": "rotateY(-20deg)", "-webkit-transition": "all .4s linear", "-webkit-transform-origin": "100% 100%", "-webkit-transform-style": "preserve-3d", "-moz-transform": "rotateY(-20deg)", "-moz-transition": "all .4s", "-moz-transform-origin": "100% 100%", "-moz-transform-style": "preserve-3d", "-ms-transform": "rotateY(-20deg)", "-ms-transition": "all .4s", "-ms-transform-origin": "100% 100%", "-ms-transform-style": "preserve-3d", "transform": "rotateY(-20deg)", "transition": "all .4s", "transform-origin": "100% 100%", "transform-style": "preserve-3d" }); $(".menu").delay(170).css({ "z-index": "5", "-webkit-transition": "all .4s", "-moz-transition": "all .4s", "-ms-transition": "all .4s", "transition": "all .4s" }).fadeIn("fast"); }); $('#btn_menu_close,#corp_page').click(function () { $(".menu").fadeOut("fast").css({ "z-index": "1", "-webkit-transition": "all .4s", "-moz-transition": "all .4s", "-ms-transition": "all .4s", "transition": "all .4s" }); $("#corp_page").css({ "-webkit-transform": "rotateY(0deg)", "-webkit-transition": "all .7s linear", "-webkit-transform-origin": "100% 100%", "-webkit-transform-style": "preserve-3d", "-moz-transform": "rotateY(0deg)", "-moz-transition": "all .7s", "-moz-transform-origin": "100% 100%", "-moz-transform-style": "preserve-3d", "-ms-transform": "rotateY(0deg)", "-ms-transition": "all .7s", "-ms-transform-origin": "100% 100%", "-ms-transform-style": "preserve-3d", "transform": "rotateY(0deg)", "transition": "all .7s", "transform-origin": "100% 100%", "transform-style": "preserve-3d" }); }); })
- CSS3 media queries結(jié)合jQuery實(shí)現(xiàn)響應(yīng)式導(dǎo)航
- jQuery+CSS3實(shí)現(xiàn)仿花瓣網(wǎng)固定頂部位置帶懸浮效果的導(dǎo)航菜單
- 各式各樣的導(dǎo)航條效果css3結(jié)合jquery代碼實(shí)現(xiàn)
- jQuery+CSS3實(shí)現(xiàn)四種應(yīng)用廣泛的導(dǎo)航條制作實(shí)例詳解
- 使用jquery+CSS3實(shí)現(xiàn)仿windows10開始菜單的下拉導(dǎo)航菜單特效
- 7款風(fēng)格新穎的jQuery/CSS3菜單導(dǎo)航分享
- jquery+css3實(shí)現(xiàn)熊貓tv導(dǎo)航代碼分享
相關(guān)文章
jQuery訪問瀏覽器本地存儲cookie、localStorage和sessionStorage的基本用法
cookie,localStorage和sessionStorage都是瀏覽器本地存儲數(shù)據(jù)的地方,其用法不盡相同,今天小編通過本文給大家分享jQuery訪問瀏覽器本地存儲cookie、localStorage和sessionStorage的基本用法,需要的朋友參考下吧2017-10-10jquery實(shí)現(xiàn)仿JqueryUi可拖動的DIV實(shí)例
這篇文章主要介紹了jquery實(shí)現(xiàn)仿JqueryUi可拖動的DIV,實(shí)例分析了jquery模擬jqueryUI實(shí)現(xiàn)div拖動的相關(guān)技巧,具有一定參考借鑒價值,需要的朋友可以參考下2015-07-07解決jquery的ajax調(diào)取后端數(shù)據(jù)成功卻渲染失敗的問題
今天小編就為大家分享一篇解決jquery的ajax調(diào)取后端數(shù)據(jù)成功卻渲染失敗的問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-08-08Jquery ajaxsubmit上傳圖片實(shí)現(xiàn)代碼
這是數(shù)月前的事情了,場景是這樣的: 在進(jìn)行圖片上傳的時,我發(fā)現(xiàn)開發(fā)人員使用的上傳圖片方式是Iframe + 傳統(tǒng)的 http post 來處理的。2010-11-11