Rekọja si akoonu akọkọ Rekọja si lilọ kiri awọn docs
Check
in English

Akara akara

Tọkasi ipo oju-iwe lọwọlọwọ laarin awọn ilana lilọ kiri ti o ṣafikun awọn oluyapa laifọwọyi nipasẹ CSS.

Apeere

Lo atokọ ti a paṣẹ tabi ti a ko paṣẹ pẹlu awọn ohun atokọ ti o sopọ mọ lati ṣẹda jijẹ ounjẹ ti o kere ju. Lo awọn ohun elo wa lati ṣafikun awọn aza ni afikun bi o ṣe fẹ.

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

Awọn onipinpin

Awọn ipin ti wa ni afikun laifọwọyi ni CSS nipasẹ ::beforeati content. Wọn le yipada nipasẹ iyipada ohun-ini aṣa CSS ti agbegbe --bs-breadcrumb-divider, tabi nipasẹ $breadcrumb-divideroniyipada Sass - ati $breadcrumb-divider-flippedfun ẹlẹgbẹ RTL rẹ, ti o ba nilo. A ṣe aiyipada si oniyipada Sass wa, eyiti o ṣeto bi ipadasẹhin si ohun-ini aṣa. Ni ọna yii, o gba olupin agbaye ti o le fagile laisi atunko CSS nigbakugba.

html
<nav style="--bs-breadcrumb-divider: '>';" 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>

Nigbati iyipada nipasẹ Sass, iṣẹ agbasọ naa nilo lati ṣe agbekalẹ awọn agbasọ ọrọ ni ayika okun kan. Fun apẹẹrẹ, ni lilo >bi olupin, o le lo eyi:

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

O tun ṣee ṣe lati lo aami SVG ti a fi sinu . Waye nipasẹ ohun-ini aṣa CSS wa, tabi lo oniyipada Sass.

Lilo SVG ifibọ

Inlining SVG bi data URI nbeere lati URL sa fun awọn kikọ diẹ, paapaa julọ <, >ati #. Ti o ni idi ti $breadcrumb-divideroniyipada ti kọja nipasẹ escape-svg()iṣẹ Sass wa . Nigbati o ba nlo ohun-ini aṣa CSS, o nilo lati URL sa fun SVG rẹ funrararẹ. Ka awọn alaye Kevin Weber lori CodePen fun alaye alaye lori kini lati sa fun.

html
<nav style="--bs-breadcrumb-divider: url(&#34;data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='%236c757d'/%3E%3C/svg%3E&#34;);" 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>
$breadcrumb-divider: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8'><path d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='#{$breadcrumb-divider-color}'/></svg>");

O tun le yọ eto olupin kuro --bs-breadcrumb-divider: '';(awọn gbolohun ọrọ ti o ṣofo ni awọn ohun-ini aṣa CSS jẹ iye kan), tabi ṣeto oniyipada Sass si $breadcrumb-divider: none;.

html
<nav style="--bs-breadcrumb-divider: '';" 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>
$breadcrumb-divider: none;

Wiwọle

Níwọ̀n bí búrẹ́dì ń pèsè ìṣíkiri kan, ó jẹ́ ìmọ̀ràn tí ó dára láti ṣàfikún aami kan tí ó nítumọ̀ gẹ́gẹ́ bí aria-label="breadcrumb"láti ṣàpéjúwe irú ìṣàwárí tí a pèsè nínú <nav>èròjà náà, àti fífi ohun kan aria-current="page"sí ohun kan tí ó gbẹ̀yìn ti àgbékalẹ̀ láti fi hàn pé ó dúró fún ojú-ewé tí ń lọ lọ́wọ́.

Fun alaye diẹ sii, wo ARIA Awọn adaṣe Iṣeduro Itọnisọna Ilana breadcrumb .

CSS

Awọn oniyipada

Fi kun v5.2.0

Gẹ́gẹ́ bí ara Bootstrap’s títúnṣe àwọn oníyípadà CSS, búrẹ́dì ń lo àwọn oniyipada CSS ti agbegbe .breadcrumbfun imudara isọdi-akoko gidi. Awọn iye fun awọn oniyipada CSS ti ṣeto nipasẹ Sass, nitorinaa isọdi Sass tun ni atilẹyin, paapaa.

  --#{$prefix}breadcrumb-padding-x: #{$breadcrumb-padding-x};
  --#{$prefix}breadcrumb-padding-y: #{$breadcrumb-padding-y};
  --#{$prefix}breadcrumb-margin-bottom: #{$breadcrumb-margin-bottom};
  @include rfs($breadcrumb-font-size, --#{$prefix}breadcrumb-font-size);
  --#{$prefix}breadcrumb-bg: #{$breadcrumb-bg};
  --#{$prefix}breadcrumb-border-radius: #{$breadcrumb-border-radius};
  --#{$prefix}breadcrumb-divider-color: #{$breadcrumb-divider-color};
  --#{$prefix}breadcrumb-item-padding-x: #{$breadcrumb-item-padding-x};
  --#{$prefix}breadcrumb-item-active-color: #{$breadcrumb-active-color};
  

Sass oniyipada

$breadcrumb-font-size:              null;
$breadcrumb-padding-y:              0;
$breadcrumb-padding-x:              0;
$breadcrumb-item-padding-x:         .5rem;
$breadcrumb-margin-bottom:          1rem;
$breadcrumb-bg:                     null;
$breadcrumb-divider-color:          $gray-600;
$breadcrumb-active-color:           $gray-600;
$breadcrumb-divider:                quote("/");
$breadcrumb-divider-flipped:        $breadcrumb-divider;
$breadcrumb-border-radius:          null;