Neon Glow Timer - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Neon Glow Timer</title> <style> body { font-family: 'Courier New', Courier, monospace; background: #000; color: #fff; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .timer-container { background: #111; border-radius: 15px; box-shadow: 0 0 15px #0f0, 0 0 30px #0f0, 0 0 45px #0f0; padding: 30px; text-align: center; max-width: 400px; width: 100%; } .timer { font-size: 3em; margin: 20px 0; text-shadow: 0 0 5px #0f0, 0 0 10px #0f0, 0 0 20px #0f0; } .controls { display: flex; justify-content: space-around; } button { background: #222; border: 2px solid #0f0; border-radius: 10px; color: #0f0; padding: 10px 20px; font-size: 1em; cursor: pointer; transition: background 0.3s, box-shadow 0.3s; } button:hover { background: #0f0; color: #000; box-shadow: 0 0 10px #0f0, 0 0 20px #0f0; } button:disabled { background: #444; cursor: not-allowed; } </style> </head> <body> <div class="timer-container"> <h1>Neon Glow Timer</h1> <div class="timer" id="timer">00:00:00</div> <div class="controls"> <button id="start">Start</button> <button id="stop" disabled>Stop</button> <button id="reset" disabled>Reset</button> </div> </div> <script> let timerInterval; let elapsedTime = 0; const timerElement = document.getElementById('timer'); const startButton = document.getElementById('start'); const stopButton = document.getElementById('stop'); const resetButton = document.getElementById('reset'); function updateTimer() { const hours = String(Math.floor(elapsedTime / 3600)).padStart(2, '0'); const minutes = String(Math.floor((elapsedTime % 3600) / 60)).padStart(2, '0'); const seconds = String(elapsedTime % 60).padStart(2, '0'); timerElement.textContent = `${hours}:${minutes}:${seconds}`; } function startTimer() { startButton.disabled = true; stopButton.disabled = false; resetButton.disabled = true; timerInterval = setInterval(() => { elapsedTime++; updateTimer(); }, 1000); } function stopTimer() { clearInterval(timerInterval); startButton.disabled = false; stopButton.disabled = true; resetButton.disabled = false; } function resetTimer() { elapsedTime = 0; updateTimer(); resetButton.disabled = true; } startButton.addEventListener('click', startTimer); stopButton.addEventListener('click', stopTimer); resetButton.addEventListener('click', resetTimer); </script> </body> </html>