Muuji hantida
Si degdeg ah oo ka jawaab celin leh u beddel qiimaha bandhiga qaybaha iyo in ka badan oo leh agabka bandhiga. Waxaa ku jira taageerada qaar ka mid ah qiyamka caadiga ah, iyo sidoo kale xoogaa dheeraad ah oo lagu xakameynayo bandhigga marka la daabacayo.
Sida ay u shaqeyso
Ku beddel qiimaha display
guriga fasalladayada utility soo bandhigay ee ka jawaabaya. Waxaan si ula kac ah u taageernaa qayb hoosaadka dhammaan qiimayaasha suurtagalka ah ee display
. Fasallada waxaa lagu dari karaa saameyno kala duwan sida aad u baahan tahay.
Ogaysiis
Soo bandhig fasallada utility ee khuseeya dhammaan meelaha nasashada , laga bilaabo xs
ilaa xxl
, ma laha wax soo gaabin ah oo ku jira. Tani waa sababta oo ah fasalladaas waxaa laga dalbadaa min-width: 0;
kor iyo kor, sidaas darteed kuma xirna su'aal warbaahineed. Dhibcaha soo haray, si kastaba ha ahaatee, waxaa ku jira soo gaabinta barta jabinta.
Sidan oo kale, fasallada waxaa lagu magacaabay qaab:
.d-{value}
waayoxs
.d-{breakpoint}-{value}
waayosm
,md
,lg
,xl
iyoxxl
.
Halka qiimuhu ka mid yahay:
none
inline
inline-block
block
grid
table
table-cell
table-row
flex
inline-flex
Qiimayaasha bandhiga waxa lagu beddeli karaa iyadoo la beddelo display
qiyamka lagu qeexay $utilities
oo dib loo ururiyo SCSS.
Weydiimaha warbaahintu waxay saameeyaan ballaadhka shaashadda oo leh barta goynta ama ka weyn . Tusaale ahaan, .d-lg-none
daaran display: none;
, lg
, xl
iyo xxl
shaashadaha.
Tusaalooyinka
<div class="d-inline p-2 text-bg-primary">d-inline</div>
<div class="d-inline p-2 text-bg-dark">d-inline</div>
<span class="d-block p-2 text-bg-primary">d-block</span>
<span class="d-block p-2 text-bg-dark">d-block</span>
Waxyaabaha qarinaya
Horumarka saaxiibtinimo ee moobilka dhaqsaha badan, isticmaal xiisado bandhig oo ka jawaabaya muujinta iyo qarinta walxaha aaladda. Ka fogow abuurista gebi ahaanba noocyo kala duwan oo isla goobta ah, taa beddelkeed u qari walxaha si taxadar leh cabbir kasta oo shaashad ah.
Si aad u qariso walxaha si fudud u isticmaal .d-none
fasalka ama mid ka mid ah .d-{sm,md,lg,xl,xxl}-none
fasallada wax kasta oo kala duwanaansho shaashad ah oo ka jawaabaya.
Si aad u muujiso curiyaha kaliya ee dhexda ah ee cabbirada shaashadda waxaad ku dari kartaa hal .d-*-none
fasal iyo .d-*-*
fasal, tusaale ahaan .d-none .d-md-block .d-xl-none .d-xxl-none
waxay qarin doontaa walxaha dhammaan cabbirrada shaashadda marka laga reebo aaladaha dhexe iyo kuwa waaweyn.
Cabbirka shaashadda | Fasalka |
---|---|
Qarsoon dhammaan | .d-none |
Qarsoon kaliya xs | .d-none .d-sm-block |
Qarsoon kaliya sm | .d-sm-none .d-md-block |
Qarsoon oo keliya md | .d-md-none .d-lg-block |
Qarsoon kaliya lg | .d-lg-none .d-xl-block |
Qarsoon kaliya xl | .d-xl-none |
Ku qarsoon xxl kaliya | .d-xxl-none .d-xxl-block |
Ka muuqda dhammaan | .d-block |
Ka muuqda xs kaliya | .d-block .d-sm-none |
Ka muuqda kaliya sm | .d-none .d-sm-block .d-md-none |
Ka muuqda oo keliya md | .d-none .d-md-block .d-lg-none |
Ka muuqda kaliya lg | .d-none .d-lg-block .d-xl-none |
Ka muuqda kaliya xl | .d-none .d-xl-block .d-xxl-none |
Ka muuqda kaliya xxl | .d-none .d-xxl-block |
<div class="d-lg-none">hide on lg and wider screens</div>
<div class="d-none d-lg-block">hide on screens smaller than lg</div>
Bandhig daabacan
Beddel display
qiimaha walxaha marka aad ku daabacayso fasallada utility bandhiga daabacaadda. Waxaa ka mid ah taageerada display
qiyamka la midka ah ee tas- .d-*
hiilaadkayaga ka jawaabaya.
.d-print-none
.d-print-inline
.d-print-inline-block
.d-print-block
.d-print-grid
.d-print-table
.d-print-table-row
.d-print-table-cell
.d-print-flex
.d-print-inline-flex
Fasallada daabacaadda iyo bandhigga waa la isku dari karaa.
<div class="d-print-none">Screen Only (Hide on print only)</div>
<div class="d-none d-print-block">Print Only (Hide on screen only)</div>
<div class="d-none d-lg-block d-print-block">Hide up to large on screen, but always show on print</div>
Sass
Utilities API
Soo bandhigida yutiilitida waxa lagu caddeeyey utilities API gudaha scss/_utilities.scss
. Baro sida loo isticmaalo API utilities.
"display": (
responsive: true,
print: true,
property: display,
class: d,
values: inline inline-block block grid table table-row table-cell flex inline-flex none
),