fire

js实现烟花效果

匿名 (未验证) 提交于 2019-12-02 23:59:01
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> #container{ width: 80%; height: 600px; border: 2px solid red; background: #000; margin:20px auto; cursor: pointer; position: relative; left: 0; top: 0; overflow: hidden; } .fire{ width: 10px; height:10px; position: absolute; bottom: 0; } .small-fire{ width: 10px; height:10px; position: absolute; border-radius: 50%; } </style> </head> <body> <div id="container"></div> </body> <script src="../move.js"></script> <script> function Fire(options){ this.x = options.x; this.y = options.y; this.cont = options