Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> html { font-family: "Arial", sans-serif; font-size: 12px; } body { display: flex; align-items: center; } .pager__item { display: inline-block; vertical-align: top; font-size: 15px; font-weight: bold; margin: 0 2px; } .pager__item.active .pager__link { background-color: #7a0052; color: #fff; text-decoration: none; } .pager__link { position: relative; border-radius: 5px; display: block; text-align: center; width: 30px; height: 30px; line-height: 30px; color: #2f3640; text-decoration: none; transition: 0.2s; } .pager__link:hover, .pager__link:focus, .pager__link:active { background-color: #efdcf7; color: #fff; text-decoration: none; } @media screen and (max-width: 576px) { .pager__item { position: absolute; top: -9999px; left: -9999px; } } </style> </head> <body> <div class="wrapper"> <nav> <ul class="pager"> <li class="pager__item"><a class="pager__link" href="#">«</a></li> <li class="pager__item"><a class="pager__link" href="#">...</a></li> <li class="pager__item"><a class="pager__link" href="#">1</a></li> <li class="pager__item active"><a class="pager__link" href="#">2</a></li> <li class="pager__item"><a class="pager__link" href="#">3</a></li> <li class="pager__item"><a class="pager__link" href="#">4</a></li> <li class="pager__item"><a class="pager__link" href="#">5</a></li> <li class="pager__item"><a class="pager__link" href="#">6</a></li> <li class="pager__item"><a class="pager__link" href="#">...</a></li> <li class="pager__item"><a class="pager__link" href="#">»</a></li> </ul> </nav> </div> </body> </html>