Itulautusi
Faʻamaumauga ma faʻataʻitaʻiga mo le faʻaalia o le itulau e faʻaalia ai se faasologa o mea e fesoʻotai i ai o loʻo iai i luga o le tele o itulau.
Vaaiga lautele
Matou te fa'aogaina se poloka tele o so'otaga fa'afeso'ota'i mo la matou fa'asinomaga, e faigata ai ona misia so'otaga ma fa'afaigofie ona fa'asa'oina—i taimi uma e tu'uina atu ai vaega tetele e lavea. Ua fausia le fa'asinomaga i elemene HTML lisi ina ia mafai ai e le au faitau mata ona fa'ailoa le numera o feso'ota'iga avanoa. Fa'aaogā se <nav>
elemene afifi e fa'ailoa ai o se vaega fa'atautaiga e su'e ai le au faitau ma isi tekonolosi fesoasoani.
E le gata i lea, talu ai o itulau e foliga mai e sili atu ma le tasi ia vaega faʻatautaia, e fautuaina le tuʻuina atu o se faʻamatalaga aria-label
e <nav>
atagia ai lona faʻamoemoe. Mo se faʻataʻitaʻiga, afai e faʻaogaina le vaega o le pagination e faʻatautaia ai i le va o se seti o suʻesuʻega, o se igoa talafeagai e mafai ona aria-label="Search results pages"
.
<nav aria-label="Page navigation example">
<ul class="pagination">
<li class="page-item"><a class="page-link" href="#">Previous</a></li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">Next</a></li>
</ul>
</nav>
Galulue ma ata
Su'e e fa'aoga se atigipusa po'o se fa'ailoga e suitulaga i tusitusiga mo nisi o feso'ota'iga i le itulau? Ia mautinoa e tu'u sa'o le lagolago lau faitau mata ma aria
uiga.
<nav aria-label="Page navigation example">
<ul class="pagination">
<li class="page-item">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true">«</span>
</a>
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true">»</span>
</a>
</li>
</ul>
</nav>
Malo le atoatoa ma toaga
O so'otaga fa'aigoaina e mafai ona fa'avasegaina mo tulaga eseese. Fa'aoga .disabled
mo so'oga e foliga mai e le mafai ona kiliki ma fa'ailoa .active
le itulau o lo'o iai nei.
A'o .disabled
fa'aoga e le vasega pointer-events: none
e taumafai e fa'amalo le feso'ota'iga o <a>
le s, e le'i fa'ata'atia le mea totino a le CSS ma e le'o fa'atatauina le ta'avale keyboard. E pei o lea, e tatau ona e faʻaopoopo i taimi uma tabindex="-1"
i luga o fesoʻotaʻiga faʻaletonu ma faʻaaoga le JavaScript masani e faʻamalo atoatoa ai a latou galuega.
<nav aria-label="...">
<ul class="pagination">
<li class="page-item disabled">
<a class="page-link">Previous</a>
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item active" aria-current="page">
<a class="page-link" href="#">2</a>
</li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item">
<a class="page-link" href="#">Next</a>
</li>
</ul>
</nav>
E mafai ona e suitulaga ese taula malosi pe le atoatoa mo <span>
, pe aveese le taula i le tulaga o le muamua / aū e sosoo ai, e aveese ai le kilikiina o galuega ma puipuia le taulai atu o le piano a'o taofi sitaili fuafuaina.
<nav aria-label="...">
<ul class="pagination">
<li class="page-item disabled">
<span class="page-link">Previous</span>
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item active" aria-current="page">
<span class="page-link">2</span>
</li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item">
<a class="page-link" href="#">Next</a>
</li>
</ul>
</nav>
Tele
Mana'o e lapopo'a pe la'ititi itulau? Fa'aopoopo .pagination-lg
pe .pagination-sm
mo isi lapopo'a.
<nav aria-label="...">
<ul class="pagination pagination-lg">
<li class="page-item active" aria-current="page">
<span class="page-link">1</span>
</li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
</ul>
</nav>
<nav aria-label="...">
<ul class="pagination pagination-sm">
<li class="page-item active" aria-current="page">
<span class="page-link">1</span>
</li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
</ul>
</nav>
Fa'atonuga
Suia le fa'aogaina o vaega fa'akomepiuta fa'atasi ma le flexbox utilities .
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-center">
<li class="page-item disabled">
<a class="page-link">Previous</a>
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item">
<a class="page-link" href="#">Next</a>
</li>
</ul>
</nav>
<nav aria-label="Page navigation example">
<ul class="pagination justify-content-end">
<li class="page-item disabled">
<a class="page-link">Previous</a>
</li>
<li class="page-item"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item">
<a class="page-link" href="#">Next</a>
</li>
</ul>
</nav>