in English

whakawhārangi

Ko nga tuhinga me nga tauira mo te whakaatu whakaingoatanga hei tohu i te raupapa o nga ihirangi e pa ana ki nga wharangi maha.

Tirohanga

Ka whakamahia e matou he poraka nui o nga hononga hono mo to maatau whakaingoatanga, he mea uaua ki te ngaro nga hononga me te ngawari ki te tauine—i te wa e whakarato ana i nga waahi nui. Ka hangaia te whakaingoatanga me nga huānga HTML rarangi kia taea ai e nga kaipanui mata te panui te maha o nga hononga e waatea ana. Whakamahia he <nav>huānga takai hei tohu hei waahanga whakatere hei tirotiro i nga kaipānui me etahi atu hangarau awhina.

I tua atu, i te mea he nui ake i te kotahi te waahanga whakaterenga o nga wharangi, he mea tika kia homai he whakamaarama aria-labelhei <nav>whakaatu i tana kaupapa. Hei tauira, ki te whakamahia te wahanga whakaingoatanga ki te whakatere i waenga i te huinga o nga hua rapu, he tapanga tika pea ko 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>

Te mahi me nga tohu

Kei te titiro ki te whakamahi i tetahi ata, tohu ranei hei whakakapi i te tuhinga mo etahi hononga whakarangirangi? Kia kaha ki te whakarato i te tautoko kaipānui mata tika me nga ariahuanga.

<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">&laquo;</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">&raquo;</span>
      </a>
    </li>
  </ul>
</nav>

Ko nga ahuatanga haua me te hohe

Ko nga hononga whakaingoatanga he mea whakarite mo nga ahuatanga rereke. Whakamahia .disabledmo nga hononga kaore e taea te panui me .activete tohu i te wharangi o naianei.

Ahakoa e whakamahi ana te karaehe ki .disabledte whakakore i te taumahinga hono a s, ko taua taonga CSS kaore ano kia whakatauritehia, kaore hoki e whai whakaaro mo te whakatere papapātuhi. Na, me taapiri tonu koe ki nga hononga haua me te whakamahi i te JavaScript ritenga hei whakakore i a raatau mahi.pointer-events: none<a>tabindex="-1"

<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>

Ka taea e koe te huri i nga punga hohe, haua ranei mo te <span>, waiho ranei te punga i roto i te keehi o nga pere o mua/muri, hei tango i te mahi paato me te aukati i te arotahi papapātuhi i te wa e pupuri ana i nga momo kua whakaritea.

<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>

Te rahinga

Kei te pirangi koe ki te wharangi nui, iti ake ranei? Tāpirihia mo etahi atu rahinga .pagination-lgranei ..pagination-sm

<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>

Tirohanga

Hurihia te tirohanga o nga wahanga whakaingoatanga me nga taputapu flexbox .

<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>