为您的文字添加数字故障效果。
<h1 class="glitch" data-text="CYBERPUNK">CYBERPUNK</h1> /* Place this in your CSS */ .glitch { position: relative; font-size: 80px; font-weight: bold; color: #fff; letter-spacing: 0.1em; } .glitch::before, .glitch::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; /* Matches background color to hide main text behind slices */ } .glitch::before { left: 5px; text-shadow: -2.5px 0 #ff003c; animation: glitch-anim-1 2s infinite linear alternate-reverse; } .glitch::after { left: -5px; text-shadow: -2.5px 0 #00eaff; animation: glitch-anim-2 1.5s infinite linear alternate-reverse; } @keyframes glitch-anim-1 { 0% { clip-path: inset(20% 0 80% 0); } 20% { clip-path: inset(60% 0 10% 0); } 40% { clip-path: inset(40% 0 50% 0); } 60% { clip-path: inset(80% 0 5% 0); } 80% { clip-path: inset(10% 0 70% 0); } 100% { clip-path: inset(30% 0 20% 0); } } @keyframes glitch-anim-2 { 0% { clip-path: inset(10% 0 60% 0); } 20% { clip-path: inset(30% 0 20% 0); } 40% { clip-path: inset(70% 0 10% 0); } 60% { clip-path: inset(20% 0 50% 0); } 80% { clip-path: inset(60% 0 20% 0); } 100% { clip-path: inset(5% 0 80% 0); } }
精心挑选的实用工具
创建美丽的调色板并复制CSS代码。
从图像中提取颜色并生成设计调色板。
可视化创建CSS关键帧动画。
创建CSS线性和径向渐变。
为设计生成美观的有机SVG形状。
可视化工具,用于创建和复制CSS box-shadow代码。
使用实时预览创建磨砂玻璃CSS效果。
可视化设计复杂的CSS clip-path。