WEBLEB
होम
संपादक
लॉग इन करें
Pro
हिंदी
English
Français
Español
Português
Deutsch
Italiano
हिंदी
पेड्रो_बुगिका द्वारा एक कोड
589
Pedro_bugica
संपादक में खोलें
अपना कोड प्रकाशित करें
अनुशंसित
16 December 2024
स्मार्टफंक्शन263 द्वारा एक कोड
5 December 2024
लॉजिकलकोड2 द्वारा एक कोड
28 May 2025
मेटेहन द्वारा एक कोड
HTML
Copy
Click the Circle Game
Score:
0
CSS
Copy
body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .game-container { text-align: center; } .circle { width: 100px; height: 100px; background-color: red; border-radius: 50%; position: relative; cursor: pointer; animation: moveCircle 2s infinite; } @keyframes moveCircle { 0% { left: 0; } 50% { left: calc(100% - 100px); } 100% { left: 0; } }
JS
Copy
let score = 0; document.getElementById('circle').addEventListener('click', () => { score++; document.getElementById('score').innerText = score; });