DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> HTML基礎知識 >> HTML5特效代碼 >> CSS3制作立體動畫導航菜單
CSS3制作立體動畫導航菜單
編輯:HTML5特效代碼     
效果如下(請使用支持CSS的浏覽器查看):
  • Home
  • About Me
  • Portfolio
  • Blog
  • Resources
  • Contact Me
  • 首頁
  • 關於
  • jQuery AJAX
  • 導航樣式
  • 側邊導航
  • 樹形菜單
  • Home
  • About Me
  • Portfolio
  • Blog
  • Resources
  • Contact Me
  • 首頁
  • 關於
  • jQuery AJAX
  • 導航樣式
  • 側邊導航
  • 樹形菜單


也可以點擊網址查看效果:http:///keleyi/phtml/html5/12.htm

請使用支持CSS3的浏覽器訪問本頁面,獲得更好效果。

源代碼:

<style>
.keleyi-com-nav{
width:520px;
height: 50px;
font:bold 0/50px Arial;
text-align:center;
margin:40px auto 0;
border-radius: 8px;
}
.keleyi-com-nav a{display: inline-block;
-webkit-transition: all 0.2s ease-in;
-moz-transition: all 0.2s ease-in;
-o-transition: all 0.2s ease-in;
-ms-transition: all 0.2s ease-in;
transition: all 0.2s ease-in;
}
.keleyi-com-nav a:hover{
-webkit-transform:rotate(10deg);
-moz-transform:rotate(10deg);
-o-transform:rotate(10deg);
-ms-transform:rotate(10deg);
transform:rotate(10deg);
}
.black{
background: #2c2c2c;
box-shadow: 0 7px 0 #0b0b0b;
}
.red{
background: #f65f57;
box-shadow: 0 7px 0 #ba4a45;
}
.blue{
background: #36b7e5;
box-shadow: 0 7px 0 #3595b8;
}
.green{
background: #9cd564;
box-shadow: 0 7px 0 #86b65b;
}
.keleyi-com-nav li{
position:relative;
display:inline-block;
padding:0 16px;
font-size: 13px;
text-shadow:1px 2px 4px rgba(0,0,0,.5);
list-style: none outside none;
}

.keleyi-com-nav li::before,
.keleyi-com-nav li::after{
content:"";
position:absolute;
top:14px;
height: 25px;
width: 1px;
}
.keleyi-com-nav li::after{
right: 0;
background: -moz-linear-gradient(top, rgba(255,255,255,0), rgba(255,255,255,.2) 50%, rgba(255,255,255,0));
background: -webkit-linear-gradient(top, rgba(255,255,255,0), rgba(255,255,255,.2) 50%, rgba(255,255,255,0));
background: -o-linear-gradient(top, rgba(255,255,255,0), rgba(255,255,255,.2) 50%, rgba(255,255,255,0));
background: -ms-linear-gradient(top, rgba(255,255,255,0), rgba(255,255,255,.2) 50%, rgba(255,255,255,0));
background: linear-gradient(top, rgba(255,255,255,0), rgba(255,255,255,.2) 50%, rgba(255,255,255,0));
}
.black li::before{
left: 0;
background: -moz-linear-gradient(top, #2c2c2c, #000 50%, #2c2c2c);
background: -webkit-linear-gradient(top, #2c2c2c, #000 50%, #2c2c2c);
background: -o-linear-gradient(top, #2c2c2c, #000 50%, #2c2c2c);
background: -ms-linear-gradient(top, #2c2c2c, #000 50%, #2c2c2c);
background: linear-gradient(top, #2c2c2c, #000 50%, #2c2c2c);
}
.red li::before{
left: 0;
background: -moz-linear-gradient(top, #ff625a, #9e3e3a 50%, #ff625a);
background: -webkit-linear-gradient(top, #ff625a, #9e3e3a 50%, #ff625a);
background: -o-linear-gradient(top, #ff625a, #9e3e3a 50%, #ff625a);
background: -ms-linear-gradient(top, #ff625a, #9e3e3a 50%, #ff625a);
background: linear-gradient(top, #ff625a, #9e3e3a 50%, #ff625a);
}
.blue li::before{
left: 0;
background: -moz-linear-gradient(top, #34b0dc, #237a99 50%, #34b0dc);
background: -webkit-linear-gradient(top, #34b0dc, #237a99 50%, #34b0dc);
background: -o-linear-gradient(top, #34b0dc, #237a99 50%, #34b0dc);
background: -ms-linear-gradient(top, #34b0dc, #237a99 50%, #34b0dc);
background: linear-gradient(top, #34b0dc, #237a99 50%, #34b0dc);
}
.green li::before{
left: 0;
background: -moz-linear-gradient(top, #9cd564, #7aa450 50%, #9cd564);
background: -webkit-linear-gradient(top, #9cd564, #7aa450 50%, #9cd564);
background: -o-linear-gradient(top, #9cd564, #7aa450 50%, #9cd564);
background: -ms-linear-gradient(top, #9cd564, #7aa450 50%, #9cd564);
background: linear-gradient(top, #9cd564, #7aa450 50%, #9cd564);
}
.keleyi-com-nav li:first-child::before{
background: none;
}
.keleyi-com-nav li:last-child::after{
background: none;
}

.keleyi-com-nav a,
.keleyi-com-nav a:hover{
color:#fff;
text-decoration: none;
}
</style>
<ul class="keleyi-com-nav black">
<li><a href="http:///a/bjac/utovcdwr.htm">Home</a></li>
<li><a href="http:///dev/36d87291ba370420.htm">About Me</a></li>
<li><a href="http:///dev/9c4dbaff0fca9c64.htm">Portfolio</a></li>
<li><a href="http:///a/bjac/k3pi4ehx.htm">Blog</a></li>
<li><a href="http:///a/bjac/nmwpqgag.htm">Resources</a></li>
<li><a href="http:///game/1/">Contact Me</a></li>
</ul>
<ul class="keleyi-com-nav red">
<li><a href="http:///">首頁</a></li>
<li><a href="http:///ablut/">關於</a></li>
<li><a href="http:///a/bjac/kjsrt3b0.htm">jQuery AJAX</a></li>
<li><a href="http:///a/bjac/182di68b.htm">導航樣式</a></li>
<li><a href="http:///a/bjac/mt97p5y9.htm">側邊導航</a></li>
<li><a href="http:///dev/3068696139522ae4.htm">樹形菜單</a></li>
</ul>
<ul class="keleyi-com-nav blue">
<li><a href="http:///a/bjac/et551617.htm">Home</a></li>
<li><a href="http:///a/bjac/3wjq3xm2.htm">About Me</a></li>
<li><a href="http:///a/bjac/7slnymte.htm">Portfolio</a></li>
<li><a href="http:///a/bjac/mnmpm4bv.htm">Blog</a></li>
<li><a href="http:///a/bjac/c07969353e71816f.htm">Resources</a></li>
<li><a href="http:///a/bjac/532bedbffca1affa.htm">Contact Me</a></li>
</ul>
<ul class="keleyi-com-nav green">
<li><a href="http:///">首頁</a></li>
<li><a href="http:///ablut/">關於</a></li>
<li><a href="http:///a/bjac/kjsrt3b0.htm">jQuery AJAX</a></li>
<li><a href="http:///a/bjac/182di68b.htm">導航樣式</a></li>
<li><a href="http:///a/bjac/mt97p5y9.htm">側邊導航</a></li>
<li><a href="http:///dev/3068696139522ae4.htm">樹形菜單</a></li>
</ul>
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved