Neon Glow Button
Preview
Edit
Download
Run
Download Options
HTML File
Download as .html file
CSS File
Download as .css file
JavaScript File
Download as .js file
Combined HTML
All code in one HTML file
Project ZIP
All files in a ZIP archive
Cancel
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> Buttons </title> </head> <body> <div class="container"> <div class="buttons-grid"> <div class="button-card"> <div class="button-title">Neon Glow</div> <button class="btn-neon">Neon Effect</button> </div> </div> </div> </body> </html>
CSS
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; } .button-title { color: white; font-size: 1.1rem; margin-bottom: 1rem; font-weight: 600; } /* Button 2: Neon Glow */ .btn-neon { background: transparent; color: #00ff88; border: 2px solid #00ff88; padding: 15px 30px; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; position: relative; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 1px; } .btn-neon:hover { background: #00ff88; color: #000; box-shadow: 0 0 20px #00ff88, 0 0 40px #00ff88, 0 0 60px #00ff88; text-shadow: none; } @media (max-width: 768px) { .buttons-grid { grid-template-columns: 1fr; } h1 { font-size: 2rem; } }
JavaScript
// Add click feedback for all buttons document.querySelectorAll('button').forEach(button => { button.addEventListener('click', function() { // Create a temporary scale effect on click this.style.transform = 'scale(0.95)'; setTimeout(() => { this.style.transform = ''; }, 150); }); }); // Add extra interactivity to the magnetic button const magneticBtn = document.querySelector('.btn-magnetic'); magneticBtn.addEventListener('mousemove', function(e) { const rect = this.getBoundingClientRect(); const x = e.clientX - rect.left - rect.width / 2; const y = e.clientY - rect.top - rect.height / 2; this.style.transform = `translate(${x * 0.1}px, ${y * 0.1}px) scale(1.1)`; }); magneticBtn.addEventListener('mouseleave', function() { this.style.transform = ''; });
Output Preview
Desktop
Mobile
Fullscreen