div+css实现六边形波纹动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现六边形波纹动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> :root { --border-size: 1.5%; --duration: 7s; --open-from: .5; } html, body { height: 100%; margin: 0; } body { background: #fafafa; color: #232323; place-content: center; justify-items: center; } .container { display: grid; overflow: hidden; } @property --progress { syntax: '<number>'; initial-value: 0; inherits: false; } @keyframes progress { to { --progress: 1; } } .hexagon { grid-area: 1 / 1; width: clamp(100px, 90vmin, 300px); aspect-ratio: 1; background: currentColor; --o: (var(--progress) * 50%); --i: max(0%, var(--o) - var(--border-size)); .........完整代码请登录后点击上方下载按钮下载查看
网友评论0