in English

Breadcrumb

Qhia rau nplooj ntawv tam sim no qhov chaw nyob hauv ib qho kev taw qhia hierarchy uas cia li ntxiv cov cais ntawm CSS.

Piv txwv

<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item active" aria-current="page">Home</li>
  </ol>
</nav>

<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="#">Home</a></li>
    <li class="breadcrumb-item active" aria-current="page">Library</li>
  </ol>
</nav>

<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="#">Home</a></li>
    <li class="breadcrumb-item"><a href="#">Library</a></li>
    <li class="breadcrumb-item active" aria-current="page">Data</li>
  </ol>
</nav>

Hloov lub separator

Separators tau txais ntxiv hauv CSS los ntawm ::beforethiab content. Lawv tuaj yeem hloov tau los ntawm kev hloov pauv $breadcrumb-divider. Qhov kev tsocai muaj nuj nqi yog xav tau los tsim cov quotes nyob ib ncig ntawm ib txoj hlua, yog li yog tias koj xav tau >raws li cais, koj tuaj yeem siv qhov no:

$breadcrumb-divider: quote(">");

Nws tseem tuaj yeem siv lub hauv paus 64 embedded SVG icon :

$breadcrumb-divider: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4IiBoZWlnaHQ9IjgiPjxwYXRoIGQ9Ik0yLjUgMEwxIDEuNSAzLjUgNCAxIDYuNSAyLjUgOGw0LTQtNC00eiIgZmlsbD0iY3VycmVudENvbG9yIi8+PC9zdmc+);

Lub separator tuaj yeem raug tshem tawm los ntawm kev teeb tsa $breadcrumb-dividerrau none:

$breadcrumb-divider: none;

Kev siv tau

Txij li thaum breadcrumbs muab ib qho kev taw qhia, nws yog ib lub tswv yim zoo los ntxiv cov ntawv tseem ceeb xws li aria-label="breadcrumb"piav qhia txog hom kev taw qhia nyob rau hauv lub <nav>caij, nrog rau kev siv ib qho aria-current="page"rau cov khoom kawg ntawm cov teeb los qhia tias nws sawv cev rau nplooj ntawv tam sim no.

Yog xav paub ntxiv, saib ARIA Authoring Practices Guide breadcrumb pattern .