js实现网页动态多彩渐变背景动画效果代码
代码语言:html
所属分类:背景
代码描述:js实现网页动态多彩渐变背景动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> :root { height: 100vh; } </style> </head> <body> <script> let settings; const newSettings = () => { settings = new Array(4).fill().map(_ => new Array(3).fill().map(_ => Math.random())); }; newSettings(); // actual function const pal = ( t = 0, a = [0.5, 0.5, 0.5], b = [0.5, 0.5, 0.5], c = [1.0, 1.0, 1.0], d = [0.00, 0.10, 0.20]) => c.map( (cc, i) => Math.cos( cc * t + d[i] * 6.28318) * .........完整代码请登录后点击上方下载按钮下载查看
网友评论0