博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
jquery和css3实现的很酷的菜单导航
阅读量:6580 次
发布时间:2019-06-24

本文共 4761 字,大约阅读时间需要 15 分钟。

今天为大家带来的是jquery和css3实现的不错的。点击列表图表后,内容页面向内移动显示菜单项。当单击关闭菜单按钮时,菜单项隐藏,内容页恢复原位。看下图

 

   

 

我们看下实现代码:

html代码:

WIFEO/CODE
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.
View Code

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;}
View Code

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"                });            });        })
View Code

注:本文原创文章,转载请注明原文地址:

你可能感兴趣的文章
设置分录行按钮监听事件
查看>>
C Primer Plus 第5章 运算符、表达式和语句 5.2基本运算符
查看>>
java并发库之Executors常用的创建ExecutorService的几个方法说明
查看>>
23种设计模式(1):单例模式
查看>>
socket 编程入门教程(五)UDP原理:4、“有连接”的UDP
查看>>
Jquery获取iframe中的元素
查看>>
Laravel 学习笔记5.3之 Query Builder 源码解析(下)
查看>>
Struts2简单入门实例
查看>>
2012CSDN年度博客之星评选http://vote.blog.csdn.net/item/blogstar/xyz_lmn
查看>>
BZOJ 4037 [HAOI2015]数字串拆分 ——动态规划
查看>>
SpringBoot实战总汇--详解
查看>>
2018年7月1日笔记
查看>>
尝试使用iReport4.7(基于Ubuntu Desktop 12.04 LTS)
查看>>
动态规划:金矿模型
查看>>
子元素应该margin-top为何会影响父元素【转】
查看>>
AJAX 状态值(readyState)与状态码(status)详解
查看>>
BZOJ3668:[NOI2014]起床困难综合症(贪心)
查看>>
LightOJ 1245(Harmonic Number (II))
查看>>
小知识记录
查看>>
css3 animate 和关键帧 @-webkit-keyframes
查看>>