svg+css实现动态模糊背景动画效果代码
代码语言:html
所属分类:背景
代码描述:svg+css实现动态模糊背景动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> *, *::before, *::after { box-sizing: border-box; } body { margin: 0; background: Black; } .shape { margin: 0 auto; aspect-ratio: 1; position: relative; --width: 100%; --scale: 1; --opacity: 0.66; --top: 0; --left:0; --path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); --background: linear-gradient( hotpink, red, orange, yellow, hotpink); --offset: 0deg; --speed: 8000ms; clip-path: var(--path); background: var(--background); scale: var(--scale); opacity: var(--opacity); width: var(--width); top: var(--top); left: var(--left); rotate: var(--offset); mix-blend-mode: difference; animation: turn var(--speed) linear forwards infinite; } @keyframes turn { to { rotate: calc( var(--offset) + 1turn); } } .blur-container { --blur: 40px; filter: blur(var(--blur)); height: 100vh; width: 100%; display: grid; overflow: hidden; } .blur-container > * { grid-column: 1/-1; grid-row: 1/-1; } </style> <script> window.console = window.console || function(t) {}; </script> </head> <.........完整代码请登录后点击上方下载按钮下载查看
网友评论0