SourcePagination
Zolemba ndi zitsanzo zowonetsera zolemba zosonyeza mndandanda wazinthu zokhudzana nazo zilipo pamasamba angapo.
Timagwiritsa ntchito maulalo ambiri olumikizidwa kumitundu yathu, zomwe zimapangitsa kuti maulalo akhale ovuta kuphonya komanso osavuta kuwonjeza-nthawi zonse ndikupereka madera akuluakulu. Pagination imapangidwa ndi mndandanda wazinthu za HTML kuti owerenga zenera athe kulengeza kuchuluka kwa maulalo omwe alipo. Gwiritsani ntchito <nav>
chinthu chomangirira kuti muzindikire ngati gawo loyang'ana powonera owerenga ndi matekinoloje ena othandizira.
Kuphatikiza apo, popeza masamba ali ndi magawo opitilira amodzi otere, ndibwino kuti mupereke zofotokozera aria-label
kuti <nav>
ziwonetse cholinga chake. Mwachitsanzo, ngati chigawo cha pagination chikugwiritsidwa ntchito poyang'ana pakati pa zotsatira zakusaka, chizindikiro choyenera chikhoza kukhala aria-label="Search results pages"
.
Kugwira ntchito ndi zithunzi
Mukuyang'ana kugwiritsa ntchito chithunzi kapena chizindikiro m'malo mwazolemba pamalumikizidwe amitundu? Onetsetsani kuti mukupereka chithandizo choyenera chowerengera chophimba ndi mawonekedwe aria
ndi .sr-only
zofunikira.
Mayiko olumala komanso ogwira ntchito
Maulalo a pagination amatha kusintha pamikhalidwe yosiyanasiyana. Gwiritsani .disabled
ntchito maulalo omwe akuwoneka ngati osadina .active
ndikuwonetsa tsamba lomwe lilipo.
Ngakhale .disabled
kalasiyo imagwiritsa ntchito pointer-events: none
kuyesa kuletsa ulalo wa <a>
s, katundu wa CSS sunakhazikitsidwebe ndipo samawerengera ma kiyibodi. Chifukwa chake, nthawi zonse muyenera kuwonjezera tabindex="-1"
pa maulalo olemala ndikugwiritsa ntchito JavaScript kuti mulepheretse magwiridwe ake.
Mutha kusinthanso anangula omwe akugwira ntchito kapena olephereka a <span>
, kapena kusiya nangula ngati mivi yapitayi / yotsatira, kuti muchotse magwiridwe antchito ndikuletsa kuyang'ana kwa kiyibodi ndikusunga masitayelo omwe mukufuna.
Mukufuna zokhala zazikulu kapena zazing'ono? Onjezani .pagination-lg
kapena .pagination-sm
ma size owonjezera.
Sinthani masanjidwe a zigawo zapagination ndi zida za flexbox .