為您的文字新增數字故障效果。
<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程式碼。
將文字轉換為多種字型的ASCII藝術。
視覺化設計複雜的CSS clip-path。
視覺化工具,用於建立和複製CSS box-shadow程式碼。
使用即時預覽建立磨砂玻璃CSS效果。
在數字畫布上繪製、草圖和頭腦風暴。
計算螢幕和圖片的比例尺寸。