Transition Effect on Hover

Move the mouse over the numbers.

Exported from Notepad++
<!DOCTYPE html> <html> <head> <style> .pagination { display: inline-block; background-color:pink; } .pagination a { color: black; float: left; padding: 6px 18px; text-decoration: none; transition: background-color .3s; border: 1px solid #ddd; margin: 0 4px; } .pagination a.active { background-color: #4CAF50; color: white; border-radius: 6px; } .pagination a:hover:not(.active) {background-color: blue;border-radius: 6px;} .pagination a:first-child { border-top-left-radius: 5px; border-bottom-left-radius: 5px; } .pagination a:last-child { border-top-right-radius: 5px; border-bottom-right-radius: 5px; } </style> </head> <body> <h2>Transition Effect on Hover</h2> <p>Move the mouse over the numbers.</p> <div class="pagination"> <a href="#">&laquo;</a> <a href="#">1</a> <a href="#" class="active">2</a> <a href="#">3</a> <a href="#">4</a> <a href="#">5</a> <a href="#">6</a> <a href="#">&raquo;</a> </div> </body> </html>