.pagination-outer{ text-align: center; } .pagination{ font-family: 'Poppins', sans-serif; display: inline-flex; position: relative; } .pagination li a.page-link{ color: #444; background: #f1f1f1; font-size: 22px; font-weight: 500; line-height: 40px; height: 40px; width: 40px; padding: 0; margin: 0 5px; border: none; border-radius: 50%; overflow: hidden; position: relative; z-index: 1; transition: all 0.3s ease 0.15s; } .pagination li a.page-link:hover, .pagination li a.page-link:focus, .pagination li.active a.page-link:hover, .pagination li.active a.page-link{ color: #fff; background: transparent; } .pagination li a.page-link:before, .pagination li a.page-link:after{ content: ''; background-color: #ef405d; height: 100%; width: 100%; border-radius: inherit; position: absolute; left: 0; top: 100%; z-index: -1; transition: all 0.3s ease 0s; } .pagination li a.page-link:after{ background-color: #f1f1f1; border-radius: 0; top: 0; clip-path: polygon(0 0, 50% 100%, 100% 0); transition: all 0.3s ease 0.15s; } .pagination li a.page-link:hover:before, .pagination li a.page-link:focus:before, .pagination li.active a.page-link:hover:before, .pagination li.active a.page-link:before{ top: 0; } .pagination li a.page-link:hover:after, .pagination li a.page-link:focus:after, .pagination li.active a.page-link:hover:after, .pagination li.active a.page-link:after{ transform: scaleX(0); } @media only screen and (max-width: 480px){ .pagination{ font-size: 0; display: inline-block; } .pagination li{ display: inline-block; vertical-align: top; margin: 10px 0; } }