今天给大家分享一款基jquery超炫的动画导航菜单。这款导航菜单,初始时页面中间一个按钮,单击按钮,菜单从左侧飞入页中。再次单击按钮,导航飞入左侧消息。动画效果很非常炫。一起看下效果图:

在线预览   源码下载

实现的代码。

html代码:

 <ul>
<li><a href="http://www.w2bc.com">First</a></li>
<li><a href="http://www.w2bc.com">Second</a></li>
<li><a href="http://www.w2bc.com">Third</a></li>
<li><a href="http://www.w2bc.com">Fourth</a></li>
<li><a href="http://www.w2bc.com">Fifth</a></li>
</ul>
<button>
Animate</button>
<script src='jquery.js'></script>
<script> $('button').on('click', function () {
$('ul').toggleClass('animate');
}); //@ sourceURL=pen.js
</script>

css代码:

 body
{
text-align: center;
} ul
{
width: 400px;
padding:;
margin: 0 auto;
}
ul.animate li
{
transform: translate(0);
}
ul.animate li:nth-of-type(1)
{
transition-delay: 0.05s;
}
ul.animate li:nth-of-type(2)
{
transition-delay: 0.1s;
}
ul.animate li:nth-of-type(3)
{
transition-delay: 0.15s;
}
ul.animate li:nth-of-type(4)
{
transition-delay: 0.2s;
}
ul.animate li:nth-of-type(5)
{
transition-delay: 0.25s;
} li
{
list-style: none;
display: block;
padding: 20px;
margin: 12px 0;
border-radius: 5px;
font-family: Helvetica, sans-serif;
color: #fff;
background: #8DE48D;
transform: translate(-500%);
transition: transform 0.75s cubic-bezier(0.175, 0.885, 0.32, 1.08);
}
li:nth-of-type(5)
{
transition-delay: 0.15s;
}
li:nth-of-type(4)
{
transition-delay: 0.3s;
}
li:nth-of-type(3)
{
transition-delay: 0.45s;
}
li:nth-of-type(2)
{
transition-delay: 0.6s;
}
li:nth-of-type(1)
{
transition-delay: 0.75s;
} button
{
padding: 12px 18px;
border: none;
border-radius: 3px;
color: #fff;
background: #7DBED8;
}
button:focus
{
outline: none;
}

注:本文爱编程原创文章,转载请注明原文地址:http://www.w2bc.com/Article/9693

最新文章

  1. JS和JSON的区别
  2. redis数据类型之—Set
  3. HTML制作个人简历
  4. HDU1269 迷宫城堡
  5. Git Commands
  6. 《BI项目笔记》用Excel2013连接和浏览OLAP多维数据集
  7. HashMap的面试总结(摘抄)
  8. SpringMVC与ajax相关知识练习与存档
  9. JVM常用参数配置
  10. 在Windows下部署安装hexo
  11. Python ftplib
  12. AngularJS - contorller app module
  13. Windows phone 之Xml操作
  14. CentOS6.6普通用户使用sudo命令借用root用户权限
  15. 苹果WatchKit轻松入门
  16. Java中SJBArrayList自己简单实现ArrayList
  17. JavaScript 最终将在编程语言中占统治地位?
  18. Python设计模式 - UML - 定时图(Timing Diagram)
  19. Spring Cloud Ribbon入门
  20. win10自动锁屏问题

热门文章

  1. C# 默认参数/可选参数需要注意
  2. bootstraptable toolbar
  3. pythonl练习笔记——threading创建进程锁Lock()
  4. RAC安装重新运行root.sh
  5. 文件描述符file descriptor与inode的相关知识
  6. java与数据库交互常用到的一些方法
  7. MongoDB索引类型
  8. mysql开启skip-name-resolve 导致root@127.0.0.1(localhost)访问引发的ERROR 1045 (28000)错误解决方案
  9. MarkDown的vim插件安装
  10. 关于navigationBar的颜色计算与默认透明度