.pagination-outer{ text-align: center; } .pagination{ font-family: 'Poppins', sans-serif; display: inline-flex; position: relative; } .pagination li a.page-link{ color: #222; background: #ddd; font-size: 22px; font-weight: 500; line-height: 38px; height: 38px; width: 38px; padding: 0; margin: 0 5px; border: none; border-radius: 0; border: none; position: relative; z-index: 1; transition: all 0.3s ease 0s; } .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: #4751ad; background: #fff; border: none; } .pagination li a.page-link:before, .pagination li a.page-link:after{ content: ''; height: 6px; width: 100%; border: 2px solid #4751ad; transform: scaleX(0); position: absolute; left: 0; top: -6px; z-index: -1; transition: all 0.3s ease 0s; clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%); } .pagination li a.page-link:after{ transform: rotateX(180deg) scaleX(0); top: auto; bottom: -6px; } .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{ transform: scaleX(1); } .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: rotateX(180deg) scaleX(1); } @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; } }