ار وان اس کدر
H
HTML
شروع ویرایش
C
CSS
/* Neon Button */ body { display: grid; place-items: center; min-height: 100vh; background: #0b0f19; font-family: 'Vazirmatn', sans-serif; } .neon-button { position: relative; display: inline-block; padding: 15px 30px; color: #34d399; text-transform: uppercase; letter-spacing: 4px; text-decoration: none; font-size: 24px; overflow: hidden; transition: 0.2s; } .neon-button:hover { color: #111827; background: #34d399; box-shadow: 0 0 10px #34d399, 0 0 40px #34d399, 0 0 80px #34d399; transition-delay: 1s; } .neon-button span { position: absolute; display: block; } @keyframes animate1 { 0% { right: -100%; } 100% { right: 100%; } } .neon-button span:nth-child(1) { top: 0; right: -100%; width: 100%; height: 2px; background: linear-gradient(90deg, transparent, #34d399); animation: animate1 1s linear infinite; } @keyframes animate2 { 0% { top: -100%; } 100% { top: 100%; } } .neon-button span:nth-child(2) { top: -100%; left: 0; width: 2px; height: 100%; background: linear-gradient(180deg, transparent, #34d399); animation: animate2 1s linear infinite; animation-delay: 0.25s; } @keyframes animate3 { 0% { right: 100%; } 100% { right: -100%; } } .neon-button span:nth-child(3) { bottom: 0; right: 100%; width: 100%; height: 2px; background: linear-gradient(270deg, transparent, #34d399); animation: animate3 1s linear infinite; animation-delay: 0.5s; } @keyframes animate4 { 0% { top: 100%; } 100% { top: -100%; } } .neon-button span:nth-child(4) { top: 100%; right: 0; width: 2px; height: 100%; background: linear-gradient(360deg, transparent, #34d399); animation: animate4 1s linear infinite; animation-delay: 0.75s; }
J
JavaScript
// Animation is pure CSS. // No JavaScript required! console.log("Minimalist Editor: Optimized for performance.");