今天在微博里面看到别人分享的一个立体效果,我觉得挺好的,就拿下来自己存着,万一以后用到。

效果如下:

index.html

<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>CSS3 3D立方体菜单导航DEMO演示</title> </head> <body>
<iframe frameborder="0" scrolling="no" src="index2.html" width="100%" height="500px"></iframe>
<div style="text-align:center;clear:both">
<script src="/gg_bd_ad_720x90.js" type="text/javascript"></script>
<script src="/follow.js" type="text/javascript"></script>
</div>
</body>
</html>

index2.html

<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>CSS3 3D立方体菜单导航DEMO演示</title> <link rel="stylesheet" href="css/normalize.min.css"> <link rel='stylesheet prefetch' href='https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css'> <link rel="stylesheet" href="css/style.css"> </head> <body>
<nav id="nav" role='navigation'>
<h2>sdasd</h2> <ul id="cube">
<li class="side">
<ul>
<li></li>
<li></li>
<li class="home"><i class="round icon-home icon-2x"></i></li>
<li class="about"><i class="icon-user icon-2x"></i><span>About us</span></li>
<li class="shop"><i class="icon-dollar icon-2x"></i><span><br />Store</span></li>
<li class="social"><i class="icon-comments-alt icon-2x"></i><span>Social</span></li>
<li class="misc"><i class="icon-asterisk icon-2x"></i><span>Projects</span></li>
</ul>
</li>
<li class="side">
<ul>
<li><i class="icon-chevron-left icon-2x"></i><span><br />Back</span></li>
<li class="shop"><h3>Store</h3></li>
<li class="shop"><i class="icon-dollar icon-2x round"></i></li>
<li class="shop"><i class="icon-fighter-jet icon-2x"></i><span>Planes</span></li>
<li class="shop"><i class="icon-rocket icon-2x"></i><span>Rockets</span></li>
<li class="shop"><i class="icon-gift icon-2x"></i><span>Gifts</span></li>
<li class="shop"><i class="icon-beer icon-2x"></i><span>BEER</span></li>
<li class="shop"><i class="icon-mobile-phone icon-2x"></i><span>Mobiles</span></li>
<li class="shop"><i class="icon-female icon-2x"></i><span>Wifes</span></li>
</ul>
</li>
<li class="side">
<ul>
<li><i class="icon-chevron-left icon-2x"></i><span><br />Back</span></li>
<li></li>
<li class="misc"><i class="round icon-asterisk icon-2x"></i></li>
<li class="misc" data-url="patternwall.net"><i class="icon-th icon-2x"></i><span>Patternwall</span></li>
</ul>
</li>
<li class="side">
<ul>
<li><i class="icon-chevron-left icon-2x"></i><span><br />Back</span></li>
<li></li>
<li class="about"><i class="round icon-user icon-2x"></i></li>
<li class="about"><i class="icon-book icon-2x"></i><span>History</span></li>
<li class="about"><i class="icon-group icon-2x"></i><span>Our team</span></li>
</ul>
</li>
<li class="side">
<ul>
<li class="social"><i class="icon-chevron-left icon-2x"></i><span><br />Back</span></li>
<li class="dribbble"><h3>Dribbble</h3></li>
<li class="dribbble"><i class="icon-dribbble icon-2x round"></i></li>
<li></li>
<li class="dribbble" data-url="dribbble.com/Vaddo"><i class="icon-dribbble icon-4x"></i></li>
<li></li>
<li class="dribbble" data-url="dribbble.com/Vaddo"><p>I would like to join Dribbble :)<br /> Could somebody invite me please?</p></li>
</ul>
</li>
<li class="side">
<ul>
<li><i class="icon-chevron-left icon-2x"></i><span><br />Back</span></li>
<li class="social"><h3>Social</h3></li>
<li class="social"><i class="icon-comments-alt icon-2x round"></i></li>
<li class="social" data-url="github.com/Vaddo"><i class="icon-github-alt icon-2x"></i><span>Github</span></li>
<li class="social" data-url="twitter.com/vadimhermann"><i class="icon-twitter icon-2x"></i><span>Twitter</span></li>
<li class="dribbble" data-url="click!"><i class="icon-dribbble icon-2x"></i><span>Dribbble</span></li>
<li class="social" data-url="xing.com/profile/Vadim_Hermann"><i class="icon-xing icon-2x"></i><span>XING</span></li>
</ul>
</li>
</ul>
</nav> <script src='js/jquery.min.js'></script> <script src="js/index.js"></script> </body>
</html>

js文件:

index.js

//
// Inspired by JTK-Developments
// ----
// https://codepen.io/jtkDvlp/pen/lswmu
// $(".side").on("click", "li", function(){
$("#cube").removeClass().addClass($(this).attr("class"));
}).on("mouseover", "li", function(){
var me = $(this);
var attr = me.attr("data-url"); if(attr != undefined){
$("h2").text(attr).css("visibility", "visible");
}
});

css文件:

style.css

body {
position: absolute;
top:;
right:;
bottom:;
left:;
background-color: #E7EAE3;
-moz-box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.4);
-webkit-box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.4);
box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.4);
} ul {
list-style: none;
margin:;
padding:;
} p {
line-height: 22px;
position: absolute;
left:;
font-size: 12px;
right:;
color: rgba(255, 255, 255, 0.5);
font-style: italic;
cursor: default;
} nav {
height: 240px;
width: 240px;
position: absolute;
left:;
right:;
top:;
bottom:;
margin: auto;
perspective: 1000px;
-webkit-perspective: 1000px;
-moz-perspective: 1000px;
} h2 {
color: #9EA7B3;
font-weight: normal;
font-style: italic;
text-align: center;
font-size: 18px;
margin-top: -40px;
visibility: hidden;
-moz-transition: all 0.4s ease;
-o-transition: all 0.4s ease;
-webkit-transition: all 0.4s ease;
transition: all 0.4s ease;
} h3 {
color: rgba(255, 255, 255, 0.3) !important;
cursor: default;
font-weight: normal;
margin:;
line-height: 42px;
font-size: 14px;
} .side {
color: white;
background-color: #2C2C2C;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
-moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}
.side span {
font-size: 12px;
position: relative;
top: -36px;
color: rgba(255, 255, 255, 0.3);
opacity:;
-moz-transition: opacity 0.4s ease;
-o-transition: opacity 0.4s ease;
-webkit-transition: opacity 0.4s ease;
transition: opacity 0.4s ease;
}
.side li {
width: 50px;
height: 50px;
float: left;
margin-left: 22px;
margin-top: 20px;
text-align: center;
line-height: 60px;
-moz-transition: color 0.4s ease;
-o-transition: color 0.4s ease;
-webkit-transition: color 0.4s ease;
transition: color 0.4s ease;
}
.side li:hover {
color: #FD6347;
}
.side li:hover span {
opacity:;
} .round {
color: rgba(255, 255, 255, 0.3);
font-size: 22px;
line-height: 26px;
padding: 4px;
width: 28px;
height: 28px;
position: relative;
top: -6px;
display: inline-block;
background-color: rgba(255, 255, 255, 0.1);
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
} #cube {
position: absolute;
height: 100%;
width: 100%;
transform-style: preserve-3d;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-moz-transform: translateZ(-120px);
-ms-transform: translateZ(-120px);
-webkit-transform: translateZ(-120px);
transform: translateZ(-120px);
-moz-transition: -moz-transform 0.6s cubic-bezier(0.11, 0.93, 0.65, 0.92);
-o-transition: -o-transform 0.6s cubic-bezier(0.11, 0.93, 0.65, 0.92);
-webkit-transition: -webkit-transform 0.6s cubic-bezier(0.11, 0.93, 0.65, 0.92);
transition: transform 0.6s cubic-bezier(0.11, 0.93, 0.65, 0.92);
} .side {
position: absolute;
top:;
right:;
bottom:;
left:;
} .icon-dribbble.icon-5x {
color: #CB376F;
} .icon-4x {
color: #DC5C8B !important;
} .side:nth-child(6n+1) {
-moz-transform: rotateY(0deg) translateZ(120px);
-ms-transform: rotateY(0deg) translateZ(120px);
-webkit-transform: rotateY(0deg) translateZ(120px);
transform: rotateY(0deg) translateZ(120px);
} .side:nth-child(6n+2) {
-moz-transform: rotateY(90deg) translateZ(120px);
-ms-transform: rotateY(90deg) translateZ(120px);
-webkit-transform: rotateY(90deg) translateZ(120px);
transform: rotateY(90deg) translateZ(120px);
} .side:nth-child(6n+3) {
-moz-transform: rotateX(180deg) translateZ(120px);
-ms-transform: rotateX(180deg) translateZ(120px);
-webkit-transform: rotateX(180deg) translateZ(120px);
transform: rotateX(180deg) translateZ(120px);
} .side:nth-child(6n+4) {
-moz-transform: rotateY(-90deg) translateZ(120px);
-ms-transform: rotateY(-90deg) translateZ(120px);
-webkit-transform: rotateY(-90deg) translateZ(120px);
transform: rotateY(-90deg) translateZ(120px);
} .side:nth-child(6n+5) {
-moz-transform: rotateX(-90deg) translateZ(120px);
-ms-transform: rotateX(-90deg) translateZ(120px);
-webkit-transform: rotateX(-90deg) translateZ(120px);
transform: rotateX(-90deg) translateZ(120px);
} .side:nth-child(6n+6) {
-moz-transform: rotateX(90deg) translateZ(120px);
-ms-transform: rotateX(90deg) translateZ(120px);
-webkit-transform: rotateX(90deg) translateZ(120px);
transform: rotateX(90deg) translateZ(120px);
} #cube.home {
-moz-transform: translateZ(-120px) rotateY(0deg);
-ms-transform: translateZ(-120px) rotateY(0deg);
-webkit-transform: translateZ(-120px) rotateY(0deg);
transform: translateZ(-120px) rotateY(0deg);
}
#cube.about {
-moz-transform: translateZ(-120px) rotateY(90deg);
-ms-transform: translateZ(-120px) rotateY(90deg);
-webkit-transform: translateZ(-120px) rotateY(90deg);
transform: translateZ(-120px) rotateY(90deg);
}
#cube.misc {
-moz-transform: translateZ(-120px) rotateX(180deg);
-ms-transform: translateZ(-120px) rotateX(180deg);
-webkit-transform: translateZ(-120px) rotateX(180deg);
transform: translateZ(-120px) rotateX(180deg);
}
#cube.social {
-moz-transform: translateZ(-120px) rotateX(-90deg);
-ms-transform: translateZ(-120px) rotateX(-90deg);
-webkit-transform: translateZ(-120px) rotateX(-90deg);
transform: translateZ(-120px) rotateX(-90deg);
}
#cube.shop {
-moz-transform: translateZ(-120px) rotateY(-90deg);
-ms-transform: translateZ(-120px) rotateY(-90deg);
-webkit-transform: translateZ(-120px) rotateY(-90deg);
transform: translateZ(-120px) rotateY(-90deg);
}
#cube.dribbble {
-moz-transform: translateZ(-120px) rotateX(90deg);
-ms-transform: translateZ(-120px) rotateX(90deg);
-webkit-transform: translateZ(-120px) rotateX(90deg);
transform: translateZ(-120px) rotateX(90deg);
}

normalize.min.css

button,hr,input{overflow:visible}audio,canvas,progress,video{display:inline-block}progress,sub,sup{vertical-align:baseline}html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:} menu,article,aside,details,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:;position:relative}sub{bottom:-.25em}sup{top:-.5em}audio:not([controls]){display:none;height:}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:}button,input{}button,select{text-transform:none}[type=submit], [type=reset],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:;white-space:normal}progress{}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}[hidden],template{display:none}/*# sourceMappingURL=normalize.min.css.map */

3D立体菜单导航的更多相关文章

  1. js矩阵菜单或3D立体预览图片效果

    js矩阵菜单或3D立体预览图片效果 下载地址: http://files.cnblogs.com/elves/js%E7%9F%A9%E9%98%B5%E8%8F%9C%E5%8D%95%E6%88% ...

  2. JQuery攻略(六)菜单导航

    jQuery菜单导航的基础应用 此章节有 1.0 页面导航 1.01面包屑菜单 1.02菜单悬停 1.03菜单快捷键 1.04两个单独的菜单 1.05折叠菜单 1.01面包屑菜单 html <b ...

  3. Vue.js 实现的 3D Tab菜单

    今天给大家带来一款基于VueJS的3D Tab菜单,它跟我们之前分享的许多CSS3 Tab菜单不同的是,它可以随着鼠标移动呈现出3D立体的视觉效果,每个tab页面还可以通过CSS自定义封面照片.它的核 ...

  4. ASP.NET MVC5+EF6+EasyUI 后台管理系统(38)-Easyui-accordion+tree漂亮的菜单导航

    系列目录 本节主要知识点是easyui 的手风琴加树结构做菜单导航 有园友抱怨原来菜单非常难看,但是基于原有树形无限级别的设计,没有办法只能已树形展示 先来看原来的效果 改变后的效果,当然我已经做好了 ...

  5. 3D旋转菜单

    今天来个3D旋转菜单,是纯css3实现的,主要用到transform,transition,backface-visibility. 主要是transform这个变换,它是今天猪脚. transfor ...

  6. css3实现3D立体翻转效果

    1.在IE下无法显示翻转效果,火狐和谷歌可以 /*样式css*/ .nav-menu li { display: inline; } .nav-menu li a { color: #fff; dis ...

  7. 3D立体照片墙

    代码如下:   <!DOCTYPE html> <html> <head lang="en"> <meta charset="U ...

  8. 菜单导航/URHere/面包屑,通过CSS中的content简洁表达代码

    比如我们要写一个菜单导航/URHere/面包屑,如: 首页 > 个人中心 > 修改密码 代码: <ul> <li><a href="javascri ...

  9. 我的权限系统设计实现MVC4 + WebAPI + EasyUI + Knockout(二)菜单导航

    一.前言 上篇博客中已经总体的说了一下权限系统的思路和表结构设计,那接下来我们就要进入正文了,先从菜单导航这个功能开始. 二.实现 这个页面基本不用什么需求分析了,大家都很明白,不过在这个页面要多维护 ...

随机推荐

  1. UVA - 11214 Guarding the Chessboard (可重复覆盖,DLX+IDA*)

    题目链接 正解是IDA*+四个方向判重,但由于是个裸的可重复覆盖问题,可以用DLX水过~ 每个格子与放上皇后能干掉的标记连边,跑可重复覆盖DLX.注意要用IDA*来优化,否则会超时. #include ...

  2. HDU4940 Destroy Transportation system(有上下界的最大流)

    Problem Description Tom is a commander, his task is destroying his enemy’s transportation system. Le ...

  3. 1150 Travelling Salesman Problem(25 分)

    The "travelling salesman problem" asks the following question: "Given a list of citie ...

  4. Codeforces 808D. Array Division

    题目大意 给定你一个长为\(n\)的序列,问能否在最多一次取出某一元素然后插入到某一点后可以将整个序列分成两段使得其两段的元素之和相同. \(n \leq 10^5\) 题解 发现插入操作实际上是让某 ...

  5. 总结:实体类和(XML或二进制)之间相互转(序列化和反序列化)

    XML和实体类之间相互转换(序列化和反序列化) C# XML反序列化与序列化举例:XmlSerializer XML文件与实体类的互相转换   通过我前面的几篇收藏的文章,今天来自己做个对实体类对象序 ...

  6. VC2005中将Picture控件显示图片保存为BMP,JPG等格式

    1.在stdafx.h头文件中加入 #include <atlimage.h> 2.保存图片 方法一:   HBITMAP hBitmap = NULL; //创建位图段 BITMAPIN ...

  7. java编程思想第九章接口

    9.1抽象类和抽象方法 为什么要有抽象类? 是希望通过通用接口操作一系列类. 那么抽象类的形式是什么样的呢? 声明类的使用使用abstract关键字,且在该类中应该具有抽象方法. 注:抽象方法被关键字 ...

  8. JSP Servlet中的Request和Response的简单研究

    本文参考了几篇文章所得,参考目录如下: 1.http://www.cnblogs.com/guangshan/p/4198418.html 2.http://www.iteye.com/problem ...

  9. 第一篇 PHP开发环境搭建以及多站点配置(基于windows 7系统)

    从今天开始,我将用PHP开发一些小的网站,大家知道LAMP(Linux)组合的优势,使PHP受到广大中小企业的喜欢.使PHP与JAVA,ASP三分天下,PHP具有跨平台性,所以在windows一样是可 ...

  10. C# 保护进程不被结束(源代码)防任务管理器结束进程

    C# 保护进程不被结束(源代码)防任务管理器结束进程 Posted on 2013-03-25 16:03 快乐家++ 阅读(3173) 评论(3) 编辑 收藏 闲来无事,英语又学的太痛苦.看到我妈妈 ...