svg+gsap实现斑马管文字倒计时动画效果代码
代码语言:html
所属分类:动画
代码描述:svg+gsap实现斑马管文字倒计时动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { height: 100vh; display: flex; align-items: center; justify-content: center; background: #000000; } .svg { width: 400px; } @media (max-height: 400px) { .svg { width: 250px; } } .svg .paths { display: none; } .svg .circle { fill: #ffffff; } .svg.gooey .circles { filter: url("#filter"); } .controller { position: fixed; top: 20px; right: 20px; color: #000; font-family: sans-serif; font-size: 10px; text-transform: uppercase; padding: 15px 20px 12px 15px; background: #fff; border-radius: 20px; } @media (max-height: 400px) { .controller { top: 10px; right: 10px; } } .controller span { display: inline-block; position: relative; z-index: 1; } .controller span:before { content: ""; position: absolute; top: -3px; left: -22px; width: 16px; height: 16px; background: red; border-radius: 3px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer; } .controller span:after { content: ""; background: #fff; position: absolute; z-index: 1; top: 1px; left: -18px; width: 8px; height: 8px; border-radius: 2px; opacity: 0; transition: opacity 0.2s ease-out; } .controller input { opacity: 0.01; height: 0; } .controller input:checked + span:after { opacity: 1; } </style> </head> <body> <svg viewBox="0 0 256 256" class="svg gooey"> <defs> .........完整代码请登录后点击上方下载按钮下载查看
网友评论0