css3立体旋转菜单特效代码

版权:原创 更新时间:1年以上
[该文章底部包含文件资源,可根据自己情况,决定是否下载资源使用,时间>金钱,如有需要,立即查看资源]

以下是 css3立体旋转菜单特效代码 的示例演示效果:

当前平台(PC电脑)
  • 平台:

部分效果截图:

css3立体旋转菜单特效代码

HTML代码(index.html):

<!DOCTYPE HTML>
<html>
<head>
<title>css3立体旋转菜单</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<br><br><br><br>
<ul class="menu">
	<li class="home current">
		<a href="http://www.baidu.com/">
			<span>Home</span>
			<span>Home</span>
			<span>Home</span>
			<span>Home</span>
		</a>
		<ul>
			<li><a href="">Sub Menu</a></li>
			<li><a href="">Sub Menu</a></li>
		</ul>
	</li>
	<li class="about">
		<a href="http://www.baidu.com/">
			<span>About</span>
			<span>About</span>
			<span>About</span>
			<span>About</span>
		</a>
	</li>
	<li class="contact">
		<a href="http://www.baidu.com/">
			<span>Contact</span>
			<span>Contact</span>
			<span>Contact</span>
			<span>Contact</span>
		</a>
		<ul>
			<li><a href="">Sub Menu</a></li>
			<li><a href="">Sub Menu</a></li>
		</ul>
	</li>
	<li class="twitter">
		<a href="http://www.baidu.com/">
			<span>Twitter</span>
			<span>Twitter</span>
			<span>Twitter</span>
			<span>Twitter</span>
		</a>
	</li>
</ul>
</body>
</html>















CSS代码(style.css):

body{margin:0;padding:0;background:#f9f9f9;}
.menu{-webkit-perspective:100000;-moz-perspective:100000;-o-perspective:100000;-ms-perspective:100000;perspective:1200;display:block;width:800px;height:65px;margin:0 auto;list-style:none;padding:0;padding:0 0 0 30px;border-radius:5px;background-color:#546065;}
.menu li{-webkit-transform-style:preserve-3d;-moz-transform-style:preserve-3d;-o-transform-style:preserve-3d;-ms-transform-style:preserve-3d;transform-style:preserve-3d;height:21px;width:140px;margin:0 10px 0 0;float:left;position:relative;-webkit-transition:all 0.2s linear;-moz-transition:all 0.2s linear;-o-transition:all 0.2s linear;-ms-transition:all 0.2s linear;transition:all 0.2s linear;}
.menu li a{display:block;color:#fff;font-weight:bold;box-sizing:border-box;height:inherit;width:inherit;font-size:1.2em;text-decoration:none;text-transform:uppercase;font-family:Arial,sans-serif;}
.menu li a span{height:inherit;width:inherit;padding:22px 0;text-align:center;position:absolute;left:0;display:block;}
.current{-webkit-transform:rotate3d(1,0,0,-90deg) translateZ(-20px);-moz-transform:rotate3d(1,0,0,-90deg) translateZ(-20px);-o-transform:rotate3d(1,0,0,-90deg) translateZ(-20px);-ms-transform:rotate3d(1,0,0,-90deg) translateZ(-20px);transform:rotate3d(1,0,0,-90deg) translateZ(-20px);}
.menu li a span:first-of-type{-webkit-transform:translateZ(74px);-moz-transform:translateZ(74px);-o-transform:translateZ(74px);-ms-transform:translateZ(74px);transform:translateZ(74px);background-color:#3e4649;box-shadow:inset 0px 0px 15px rgba(0,0,0,0.1);}
.menu li a span:nth-of-type(2){background:#fa623f;box-shadow:inset 0px 35px 30px -30px rgba(255,255,255,0.1);-webkit-transform:rotate3d(1,0,0,90deg) translateZ(32px) translateY(42px);-moz-transform:rotate3d(1,0,0,90deg) translateZ(32px) translateY(42px);-o-transform:rotate3d(1,0,0,90deg) translateZ(32px) translateY(42px);-ms-transform:rotate3d(1,0,0,90deg) translateZ(32px) translateY(42px);transform:rotate3d(1,0,0,90deg) translateZ(32px) translateY(42px);}
.menu li a span:nth-of-type(3){background:#f8876d;box-shadow:inset 0px 35px 30px -30px rgba(255,255,255,0.1);-webkit-transform:rotate3d(1,0,0,180deg) translateZ(-9px);-moz-transform:rotate3d(1,0,0,180deg) translateZ(-9px);-o-transform:rotate3d(1,0,0,180deg) translateZ(-9px);-ms-transform:rotate3d(1,0,0,180deg) translateZ(-9px);transform:rotate3d(1,0,0,180deg) translateZ(-9px);}
.menu li a span:nth-of-type(4){background:#3e4649;-webkit-transform:rotate3d(1,0,0,270deg) translateZ(33px) translateY(-42px);-moz-transform:rotate3d(1,0,0,270deg) translateZ(33px) translateY(-42px);-o-transform:rotate3d(1,0,0,270deg) translateZ(33px) translateY(-42px);-ms-transform:rotate3d(1,0,0,270deg) translateZ(33px) translateY(-42px);transform:rotate3d(1,0,0,270deg) translateZ(33px) translateY(-42px);}
.menu > li:hover{-webkit-transform:rotate3d(1,0,0,-90deg) translateZ(-20px);-moz-transform:rotate3d(1,0,0,-90deg) translateZ(-20px);-o-transform:rotate3d(1,0,0,-90deg) translateZ(-20px);-ms-transform:rotate3d(1,0,0,-90deg) translateZ(-20px);transform:rotate3d(1,0,0,-90deg) translateZ(-20px);}
.menu > .current:hover{-webkit-transform:rotate3d(1,0,0,-180deg) translateY(-44px);-moz-transform:rotate3d(1,0,0,90deg) translateZ(-64px);-o-transform:rotate3d(1,0,0,-180deg) translateY(-44px);-ms-transform:rotate3d(1,0,0,-180deg) translateY(-44px);transform:rotate3d(1,0,0,-180deg) translateY(-44px);}
.menu > .current span:nth-of-type(4),.menu > li:hover span:nth-of-type(4){background:#fa623f;}
.menu > .current:hover span:nth-of-type(4){background:#f8876d;}
.menu ul{opacity:0;width:100%;border-radius:0;padding:0;}
.menu > li:hover ul{opacity:1;height:auto;background:#fa623f;-webkit-transition:opacity 0.1s linear 0.3s;-moz-transition:opacity 0.1s linear 0.3s;-o-transition:opacity 0.1s linear 0.3s;-ms-transition:opacity 0.1s linear 0.3s;transition:opacity 0.1s linear 0.3s;-webkit-transform:rotate3d(1,0,0,90deg) translateY(114px);-moz-transform:rotate3d(1,0,0,90deg) translateY(115px);-o-transform:rotate3d(1,0,0,90deg) translateY(114px);-ms-transform:rotate3d(1,0,0,90deg) translateY(114px);transform:rotate3d(1,0,0,90deg) translateY(114px);position:absolute;left:0;top:65px;}
.menu > li ul{-webkit-transform:rotate3d(1,0,0,90deg);-moz-transform:rotate3d(1,0,0,90deg);-o-transform:rotate3d(1,0,0,90deg);-ms-transform:rotate3d(1,0,0,90deg);transform:rotate3d(1,0,0,90deg);}
.menu > .current:hover ul{-webkit-transform:rotate3d(1,0,0,180deg) translateY(145px);-moz-transform:rotate3d(1,0,0,270deg) translateY(31px);-o-transform:rotate3d(1,0,0,180deg) translateY(141px);-ms-transform:rotate3d(1,0,0,180deg) translateY(161px);transform:rotate3d(1,0,0,180deg) translateY(161px);top:65px;background:#f8876d;}
.menu ul li{display:block;float:none;border-radius:0;background:inherit;width:170px;height:40px;}
.menu ul li a{box-sizing:border-box;padding:8px 0 0 25px;background:inherit;width:inherit;}
.menu ul li a:hover{background-color:#eb350b;}
.menu ul .current a:hover{background-color:#ce5f45;}
.menu .contact{width:170px;}
/* ========================== */
/* ========= IGNORE ========= */
/* ========================== */
#travel{padding:10px;background:rgba(0,0,0,0.6);border-bottom:2px solid rgba(0,0,0,0.2);font-variant:normal;text-decoration:none;margin-bottom:50px;}
#travel a{font-family:'Georgia',serif;text-decoration:none;border-bottom:1px solid #f9f9f9;color:#f9f9f9;}
.header{font-family:Arial,sans-serif;text-align:center;margin-bottom:60px;}
.header h2{font-size:2em;}
附件:下载该文件资源,减少时间成本(增值服务)
留言
该资源可下载
File Source
.rar
1.77 KB
Html Js 菜单导航特效6
最新结算
股权转让协议意向书模板
类型: .docx 金额: CNY 2.23¥ 状态: 待结算 详细>
股权转让协议意向书模板
类型: .docx 金额: CNY 0.28¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 0.29¥ 状态: 待结算 详细>
CSS3图片向上3D翻转渐隐消失特效
类型: .rar 金额: CNY 2.31¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 2.39¥ 状态: 待结算 详细>
.net c# 将金额转人名币大写金额
类型: .rar 金额: CNY 0.3¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 2.23¥ 状态: 待结算 详细>
合伙退伙协议书范本模板
类型: .doc 金额: CNY 0.28¥ 状态: 待结算 详细>
我们力求给您提供有用的文章,再此基础上,会附加营收资源,不做任何广告,让平台可以更好发展 若您发现您的权利被侵害,或使用了您的版权,请发邮件联系 sunlifel@foxmail.com ggbig觉得 : 不提供源码的文章不是好文章
合作伙伴
联系我们
  • QQ:21499807
  • 邮箱:sunlifel@foxmail.com
  • QQ扫一扫加QQ
    QQ扫一扫
Copyright 2023-2024 ggbig.com·皖ICP备2023004211号-1
打赏文章