SourcePagination
Inyandiko n'ingero zo kwerekana pagination kwerekana urukurikirane rw'ibirimo bifitanye isano bibaho kurupapuro rwinshi.
Incamake
Dukoresha umurongo munini uhuza imiyoboro yacu, dukora amahuza bigoye kubura kandi byoroshye - byose mugihe dutanga ahantu hanini cyane. Pagination yubatswe nurutonde rwa HTML kugirango abasomyi ba ecran bashobore gutangaza umubare wibihuza bihari. Koresha ikintu cyo gupfunyika <nav>
kugirango umenye nkigice cyo kugendamo kugirango usome abasomyi nubundi buryo bwikoranabuhanga bufasha.
Mubyongeyeho, nkurupapuro rushobora kuba rufite igice kirenze kimwe cyo kugendagenda, nibyiza gutanga ibisobanuro aria-label
kugirango <nav>
Uwiteka agaragaze intego yacyo. Kurugero, niba ibice bya pagination bikoreshwa mukugenda hagati yishakisha ryibisubizo, ikirango gikwiye gishobora aria-label="Search results pages"
.
Gukorana n'amashusho
Urashaka gukoresha igishushanyo cyangwa ikimenyetso mu mwanya winyandiko kuri pagination zimwe? Wemeze gutanga ibisobanuro bikwiye byabasomyi hamwe aria
nibiranga.
Abamugaye kandi bakora
Guhuza paji birashobora guhindurwa mubihe bitandukanye. Koresha .disabled
amahuza agaragara adashobora gukanda no .active
kwerekana page iriho.
Mugihe .disabled
icyiciro gikoresha pointer-events: none
kugirango ugerageze guhagarika imikorere yimikorere ya <a>
s, uwo mutungo wa CSS nturashyirwaho kandi ntubara inzira ya clavier. Nkibyo, ugomba guhora wongeyeho tabindex="-1"
kumurongo wamugaye kandi ugakoresha JavaScript yihariye kugirango uhagarike imikorere yabo.
Urashobora guhitamo guhinduranya ibikorwa cyangwa byahagaritswe inanga ya <span>
, cyangwa gusiba inanga mugihe cyambere / ubutaha imyambi, kugirango ukureho imikorere yo gukanda no gukumira icyerekezo cya clavier mugihe ugumana uburyo bugenewe.
Ingano
Ibyiza binini cyangwa bito? Ongeraho .pagination-lg
cyangwa .pagination-sm
kubunini bwinyongera.
Guhuza
Hindura guhuza ibice bya pagination hamwe nibikoresho bya flexbox .