Bubble Pop Pagination - 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>Bubble Pop Pagination</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> <style> body { font-family: 'Comic Sans MS', cursive, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; background: #f0f0f0; margin: 0; } .pagination { display: flex; list-style: none; padding: 0; } .pagination li { margin: 0 5px; } .pagination a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #ff6f61; color: #fff; text-decoration: none; font-size: 1.2em; transition: all 0.3s; position: relative; } .pagination a:hover { background: #ff8a65; animation: pop 0.5s; } @keyframes pop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } } .pagination a.active { background: #4caf50; } .pagination a i { font-size: 1em; } </style> </head> <body> <ul class="pagination"> <li><a href="#" class="prev"><i class="fas fa-chevron-left"></i></a></li> <li><a href="#">1</a></li> <li><a href="#">2</a></li> <li><a href="#">3</a></li> <li><a href="#">4</a></li> <li><a href="#">5</a></li> <li><a href="#" class="next"><i class="fas fa-chevron-right"></i></a></li> </ul> <script> document.querySelectorAll('.pagination a').forEach(link => { link.addEventListener('click', function(event) { event.preventDefault(); document.querySelectorAll('.pagination a').forEach(link => link.classList.remove('active')); this.classList.add('active'); }); }); </script> </body> </html>