Ripple Effect 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>Ripple Effect Span</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #3498db; margin: 0; font-family: Arial, sans-serif; } .ripple-span { display: inline-block; padding: 10px 20px; font-size: 1.5rem; color: #fff; background: #e74c3c; border-radius: 50px; position: relative; overflow: hidden; cursor: pointer; transition: all 0.3s ease; } .ripple-span::after { content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; background: rgba(255, 255, 255, 0.5); border-radius: 50%; transform: translate(-50%, -50%); transition: all 0.5s ease; } .ripple-span:hover::after { width: 200%; height: 200%; } </style> </head> <body> <span class="ripple-span">Ripple Effect</span> <script> document.querySelector('.ripple-span').addEventListener('click', function() { alert('Ripple Effect Span clicked!'); }); </script> </body> </html>