Çörek
CSS arkaly aýyryjylary awtomatiki goşýan nawigasiýa iýerarhiýasynyň içinde häzirki sahypanyň ýerleşişini görkeziň.
Mysal
Iň az görnüşli çörek bişirmek üçin birleşdirilen sanaw elementleri bilen sargyt edilen ýa-da tertipsiz sanawy ulanyň. Islegiňize görä goşmaça stil goşmak üçin kömekçi hyzmatlarymyzy ulanyň.
<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>
Bölünýänler
Bölünýänler awtomatiki usulda CSS- ::before
de we content
. CSerli CSS gümrük emlägini üýtgetmek --bs-breadcrumb-divider
arkaly ýa-da zerur bolsa $breadcrumb-divider
Sass üýtgeýjisiniň üsti bilen we $breadcrumb-divider-flipped
RTL kärdeşi üçin üýtgedilip bilner. Hususy emlägiň yza gaýdyp gelmegi hökmünde kesgitlenen Sass üýtgeýjimize gaýtaryp berýäris. Şeýlelik bilen, islendik wagt CSS-ni täzeden ýazman, ýok edip boljak global bölüji alarsyňyz.
<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>
Sass arkaly üýtgedilende , setiriň töwereginde sitata döretmek üçin sitata funksiýasy talap edilýär. Mysal üçin, >
bölüji hökmünde ulanyp, muny ulanyp bilersiňiz:
$breadcrumb-divider: quote(">");
Içine goýlan SVG nyşanyny hem ulanmak mümkin . CSS adaty emlägimiziň üsti bilen ulanyň ýa-da Sass üýtgeýjisini ulanyň.
<nav style="--bs-breadcrumb-divider: url("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='currentColor'/%3E%3C/svg%3E");" 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,%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='currentColor'/%3E%3C/svg%3E");
Şeýle hem bölüji sazlamany --bs-breadcrumb-divider: '';
(CSS aýratyn häsiýetlerindäki boş setirler baha hasaplanýar) ýa-da Sass üýtgeýjisini sazlap bilersiňiz $breadcrumb-divider: none;
.
<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;
Elýeterlilik
Çörek bölekleri nawigasiýa üpjün edýändigi sebäpli, elementde aria-label="breadcrumb"
berlen nawigasiýanyň görnüşini suratlandyrmak , şeýle hem häzirki sahypany görkezýändigini görkezmek üçin toplumyň soňky elementine goşmak ýaly manyly bellik goşmak gowy zat.<nav>
aria-current="page"
Has giňişleýin maglumat üçin, çörek döwmek üçin WAI-ARIA awtorlaşdyryş amallaryna serediň .
Sass
Üýtgeýjiler
$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;