How to create responsive pagination with hover effects?
Here i have explained how to create a pagination with CSS.
Step1: copy the following HTML Markup and paste it inside body tag.
HTML Markup
<div class="pagination">
<a href="#">«</a>
<a href="#">1</a>
<a class="active" href="#">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<a href="#">6</a>
<a href="#">»</a>
</div>
Step2: copy the following CSS and paste it inside head tag.
CSS
.pagination a {
color: black;
float: left;
padding: 8px 16px;
text-decoration: none;
transition: background-color .3s;
}
.pagination a.active {
background-color: orange;
color: white;
}
.pagination a:hover:not(.active) {background-color: orange; color: white;}
Screenshot