js实现粒子星空穿梭动画效果代码
代码语言:html
所属分类:粒子
代码描述:js实现粒子星空穿梭动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { background: #ffa17f; background: -webkit-linear-gradient(to right, #00223e, #ffa17f); background: linear-gradient(to right, #00223e, #ffa17f); overflow: hidden; } .star0 { height: 1px; width: 1px; opacity: 1; position: absolute; } .star1 { height: 2px; width: 2px; border-radius: 50%; opacity: 1; position: absolute; } .star2 { height: 3px; width: 3px; border-radius: 50%; opacity: 1; position: absolute; } .star3 { height: 4px; width: 4px; border-radius: 50%; opacity: 1; position: absolute; } </style> </head> <body > <div id="universe"></div> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/web-animations.min.js"></script> <script > var layerCount = 5; var starCount = 400; var maxTime = 31; var universe = document.getElementById("universe"); var w = window; var d = document; var e = d.documentElement; var g = d.getElementsByTagName("body")[0]; var widt.........完整代码请登录后点击上方下载按钮下载查看
网友评论0