Alhamdulillah Tally Counter - 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>عداد الحمد لله</title> <style> body { font-family: 'Arial', sans-serif; background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%); color: white; text-align: center; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .counter-container { background: rgba(255, 255, 255, 0.2); border-radius: 15px; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); padding: 20px; width: 300px; text-align: center; animation: fadeIn 1s ease-in-out; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .count-display { font-size: 3em; margin: 20px 0; } .count-display span { font-weight: bold; color: #ff5722; text-shadow: 2px 2px 4px #000; } .counter-button { background-color: #ff5722; border: none; border-radius: 50px; padding: 15px 30px; font-size: 1.5em; color: #ff9800; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; } .counter-button:active { transform: scale(0.95); box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); } .counter-button:hover { box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); } .reset-button { background-color: #f44336; border: none; border-radius: 50px; padding: 10px 20px; font-size: 1em; color: white; cursor: pointer; margin-top: 20px; transition: background-color 0.2s; } .reset-button:hover { background-color: #d32f2f; } .title { font-size: 2em; margin-bottom: 10px; text-shadow: 2px 2px 4px #000; } .emoji { font-size: 1.5em; } </style> </head> <body> <div class="counter-container"> <div class="title">عداد الحمد لله</div> <div class="emoji">🌿✨</div> <div class="count-display"><span id="count">0</span> مرات</div> <button type="button" class="counter-button" onclick="incrementCounter()">الحمد لله!</button> <br> <button type="button" class="reset-button" onclick="resetCounter()">إعادة تعيين</button> </div> <script> let count = 0; const countDisplay = document.getElementById('count'); function incrementCounter() { count++; countDisplay.textContent = count; animateCountDisplay(); } function resetCounter() { count = 0; countDisplay.textContent = count; } function animateCountDisplay() { countDisplay.style.transform = 'scale(1.2)'; countDisplay.style.transition = 'transform 0.2s ease-in-out'; setTimeout(() => { countDisplay.style.transform = 'scale(1)'; }, 200); } </script> </body> </html>