评论资讯 [ 总 265 则 ]
·悄然 - 2024-10-4 20:40
·小希 - 2024-10-3 09:54
·飞飞 - 2024-10-3 09:09
·小白 - 2024-10-3 09:00
·悄然 - 2024-10-3 08:45
·飞飞 - 2024-10-3 08:43
·小白 - 2024-10-2 15:16
·悄然 - 2024-10-2 15:12
·飞飞 - 2024-10-2 14:57
·小希 - 2024-10-1 15:36
·小希 - 2024-10-3 09:54
·飞飞 - 2024-10-3 09:09
·小白 - 2024-10-3 09:00
·悄然 - 2024-10-3 08:45
·飞飞 - 2024-10-3 08:43
·小白 - 2024-10-2 15:16
·悄然 - 2024-10-2 15:12
·飞飞 - 2024-10-2 14:57
·小希 - 2024-10-1 15:36
友情链接
网站统计
svg文本描边动画彩色版
代码:
<style> .svg { border: 1px solid gray; background: linear-gradient(45deg, tan, transparent, teal); } .text { font: bold 160px monospace; fill: none; stroke-width: 6; stroke-dasharray: 0 300; stroke-dashoffset: 0; filter: drop-shadow(0 0 6px #333); } .text:nth-child(3n + 1) { stroke: red; animation: stroke1 10s infinite alternate; } .text:nth-child(3n + 2) { stroke: green; animation: stroke2 10s infinite alternate; } .text:nth-child(3n + 3) { stroke: blue; animation: stroke3 10s infinite alternate; } @keyframes stroke1 { to { stroke-dasharray: 80 160; stroke-dashoffset: 1000; } } @keyframes stroke2 { to { stroke-dasharray: 80 160; stroke-dashoffset: 1080; } } @keyframes stroke3 { to { stroke-dasharray: 80 160; stroke-dashoffset: 1160; } } </style> <svg width="800" height="300" viewBox="0 0 800 300" class="svg"> <symbol id="hc"> <text text-anchor="middle" x="50%" y="50%" dy="60px">花潮论坛</text> </symbol> <use href="#hc" class="text"></use> <use href="#hc" class="text"></use> <use href="#hc" class="text"></use> </svg>
效果:
前一篇: js+svg绘制多重动画六边形
下一篇: svg文本左右移动
发表评论:
评论列表 [1条]
#1 | 飞飞 于 2024-9-26 11:18 发布: 这个更好看,看效果是红绿蓝为一组,由无到有,由点成线,碎点点自己组合起来的~这个动画才是真正的酷帅~还会反向运动,直至消失~循环往复,无穷无尽~