pre实现等离子彩色噪点动画效果代码
代码语言:html
所属分类:动画
代码描述:pre实现等离子彩色噪点动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <meta name="color-scheme" content="light dark"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body { height: 100vh; margin: 0; background: #000; color: #f07; overflow: hidden; } pre { padding: 0; margin: 0; display: block; font-size: 20px; letter-spacing: 0px; line-height: 1; font-family: monospace; } </style> </head> <body translate="no"> <script> const pre = document.createElement("pre"); document.body.appendChild(pre); pre.setAttribute("role", "img"); pre.setAttribute( "aria-label", "animated noise; an ascii art with block chars displaying an animated mix of sines and cosines, using block chars"); const colors = ["#000", "#007", "#00f", "#07f", "#0ff", "#fff"]; const minusColors = ["#000", "#700", "#f00", "#f07", "#f0f", "#fff"]; const values = " ▝▞▟▟█"; // const values = " ░▒▓██" // const values = ' .:.........完整代码请登录后点击上方下载按钮下载查看
网友评论0