js实现canvas彩色圆点旋转动画效果代码
代码语言:html
所属分类:粒子
代码描述:js实现canvas彩色圆点旋转动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<html lang="en"> <head> <meta charset="UTF-8"> <style> body { margin: 0; overflow: hidden; min-height: 100vh; font-family: Helvetica, Arial, Sans-serif; font-size: 12px; display: flex; align-items: center; justify-content: center; } .content { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; font-size: 50px; } .icon { height: 40px; line-height: 0.3; overflow: hidden; transform: translate(5px, 18px); } form { position: absolute; background-color: rgba(200,200,200,.2); padding: 20px; margin: 8px; display: flex; flex-direction: column; font-size: 90%; top: 0; left: 0; } label { display: flex; flex-direction: column; } label.inline { flex-direction: row; align-items: center; } input { margin-bottom: 8px; } .mobile-message { display: none; } @media only screen and (max-width: 400px) { form > * { display: none; } form > .mobile-message { display: block; } } </style> </head> <body> <form id="settings_form"> <div class="mobile-message"> Make wider for animation options. </div> <label> Dots <input type="number" name="dots"> </label> <label> Dot Size <input type="number" name="dotSize"> </label> <label> Dot Interval <input type="number" name="dotInterval" step=".1"> </label> <label> Spread <input type="number" name="spread" step=".1"> </label> <label> Speed <input type="number" name="speed" step=".00001"> </label> <button type="submit" name="set">Go!</button> </form> <script> // Get options form for the settings. let form = document.getElementsByTagName('form')[0]; // Initialize options. let .........完整代码请登录后点击上方下载按钮下载查看
网友评论0