Bouncing Span - 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>Bouncing Span</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #1abc9c; margin: 0; font-family: Arial, sans-serif; } .bouncing-span { display: inline-block; padding: 10px 20px; font-size: 1.5rem; color: #fff; background: #34495e; border-radius: 50px; cursor: pointer; transition: all 0.3s ease; animation: bounce 2s infinite; } @keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-30px); } 60% { transform: translateY(-15px); } } </style> </head> <body> <span class="bouncing-span">Bouncing Text</span> <script> document.querySelector('.bouncing-span').addEventListener('click', function() { alert('Bouncing Span clicked!'); }); </script> </body> </html>