jquery实现粒子聚散导航动画效果代码
代码语言:html
所属分类:菜单导航
代码描述:jquery实现粒子聚散导航动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script> <style> * { padding: 0; margin: 0 } body { background-color: #f0f0f0 } .nav { width: 100%; height: 60px; overflow: hidden; position: relative; background-color: #1c1c1c } .nav_li ul { width: 800px; list-style: none; margin: 0 auto; position: relative; height: 25px; margin-top: 25px; z-index: 3 } .nav_li ul li { width: 25%; height: 100%; float: left; position: relative; overflow: hidden } .nav_li ul li a { text-decoration: none; text-align: center; display: block; height: 100%; color: #f2716a; font-family: 妤蜂綋 } .a { width: 5px; height: 5px; position: absolute; color: #e4b795 } </style> <script type="text/javascript" charset="utf-8"> var width = $(window).width(); jQuery(document).ready(function($) { var num = $(".nav_li ul li").length; for (var i = 0; i <= 200; i++) { $(".nav_li ul").after('<div class="a" id="a'+i+'"></div>'); } change(); function change() { for (var i = 0; i <= 200; i++) { var top = parseInt(100*Math.random()); var left = parseInt(width*Math.random()); var right = parseInt(300*Math.random()); var bottom = parseInt(300*Math.random()); var transform = parseIn.........完整代码请登录后点击上方下载按钮下载查看
网友评论0