Source:
https://html.ildar-meyker.ru/html-kgeu/components.html?tab=tab-navs
Демо:
Плагины:
Подключение:
//
Разметка:
//
<nav class="nav-pages">
<a href="#" class="nav-pages__prev">
<svg class="icon flip-x">
<use
xlink:href="img/icons/general/sprite.svg#arrow-right"
></use>
</svg>
</a>
<div class="nav-pages__nums">
<a href="#" class="active">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<span>...</span>
<a href="#">13</a>
</div>
<a href="#" class="nav-pages__next">
<svg class="icon">
<use
xlink:href="img/icons/general/sprite.svg#arrow-right"
></use>
</svg>
</a>
</nav>
Стили:
//
.nav-pages {
margin: 5rem 0 6.2rem 0;
display: flex;
justify-content: center;
align-items: center;
&__prev,
&__next {
display: flex;
justify-content: center;
align-items: center;
flex: 0 0 auto;
width: 6.4rem;
height: 3.2rem;
background: #fff;
border-radius: 3.2rem;
font-size: 1.1rem;
&:hover {
background: #0047ba;
color: #fff;
}
}
&__nums {
margin: 0 8.2rem;
display: flex;
flex-wrap: wrap;
a,
span {
padding: 0 0.75rem;
font-size: 2.2rem;
opacity: 0.5;
}
a {
&.active,
&:hover {
color: #0047ba;
opacity: 1;
}
}
}
}
@media (max-width: 999.98px) {
.nav-pages {
margin: 2rem 0 2.8rem 0;
justify-content: space-between;
&__prev,
&__next {
&:hover {
.icon {
}
}
}
&__nums {
margin: 0 2rem;
a,
span {
font-size: 1.4rem;
}
a {
&.active,
&:hover {
}
}
}
&__icon {
}
}
}
Инициализация:
//
0 комментариев