U guuraya v5
Raad-raac oo dib u eeg isbeddellada ku yimaadda Bootstrap-ga faylalka, dukumeentiyada, iyo qaybaha si ay kaaga caawiyaan inaad ka guurto v4 una guurto v5.
v5.2.0
Naqshad dib loo cusbooneysiiyay
Bootstrap v5.2.0 waxa ku jira casriyaynta naqshadaynta daahsoon ee qaybo badan oo ka mid ah qaybaha iyo guryaha mashruuca oo dhan, gaar ahaan iyada oo loo marayo border-radius
qiyam la safeeyey oo ku yaal badhamada iyo qaabka kontaroolada . Dukumeentiyadayada sidoo kale waxaa lagu cusboonaysiiyay bog cusub, qaabaynta dukumeenti fudud oo aan hadda dumin qaybaha dhinaca dhinaceeda, iyo tusaalooyin caan ah oo Bootstrap ah .
doorsoomayaal CSS badan
Waxaan cusboonaysiinay dhammaan qaybahayada si aan u isticmaalno doorsoomayaasha CSS. Iyadoo Sass uu wali wax walba hoosta ka xariiqayo, qayb kasta waa la cusboonaysiiyay si loogu daro doorsoomayaasha CSS ee fasalada aasaasiga ah (tusaale, .btn
), taasoo u oggolaanaysa in wax badan oo dhab ah lagu beddelo Bootstrap. Siideynta soo socota, waxaan sii wadi doonaa inaan ballaarino isticmaalkeena doorsoomayaasha CSS qaabeynta, foomamka, caawiyayaasha, iyo yutiilitiyada. Ka akhri wax badan oo ku saabsan doorsoomayaasha CSS ee qayb kasta boggooda dukumeentiyada.
Isticmaalka doorsoomayaasha CSS waxa uu ahaan doonaa mid aan dhamaystirnayn ilaa Bootstrap 6. In kasta oo aanu jeclaan lahayn in aanu si buuxda kuwan uga hirgelino guud ahaan guddiga, waxa ay halis ugu jiraan in ay keenaan isbedelo. Tusaale ahaan, dejinta $alert-border-width: var(--bs-border-width)
koodhka ishayadu waxay jebisaa suurtagalnimada Sass ee koodkaaga haddii aad u samaynaysay $alert-border-width * 2
sabab qaar ka mid ah.
Sidan oo kale, meel kasta oo suurtagal ah, waxaan sii wadi doonaa inaan u riixno doorsoomayaal CSS oo badan, laakiin fadlan ogow in hirgelinteena ay wax yar ku xaddidan tahay v5.
Cusub_maps.scss
Bootstrap v5.2.0 waxay soo bandhigtay fayl cusub oo Sass leh _maps.scss
. Waxay ka saartaa khariidado badan oo Sass ah _variables.scss
si ay u xalliso arrin meesha cusboonaysiinta khariidadda asalka ah aan lagu dabaqin khariidado sare oo fidiyay. Tusaale ahaan, cusboonaysiinta $theme-colors
laguma dabaqin maabyada mawduucyada kale ee ku tiirsan $theme-colors
, jebinta socodka shaqada ee habaynta muhiimka ah. Marka la soo koobo, Sass waxay leedahay xaddid halka mar haddii doorsoomiyaha caadiga ah ama khariidad la isticmaalo , aan la cusboonaysiin karin. Waxa jira nusqaan la mid ah doorsoomayaasha CSS marka loo isticmaalo in lagu sameeyo doorsoomayaasha CSS kale.
Tani waa sababta isbeddelada isbeddelka ah ee Bootstrap ay tahay inay yimaadaan ka dib @import "functions"
, laakiin ka hor @import "variables"
iyo inta kale ee kaydkayaga soo dejinta. Isla sidaas oo kale ayaa khuseysa khariidadaha Sass - waa inaad ka gudubtaa khaladaadka ka hor inta aan la isticmaalin. Khariidadaha soo socda ayaa loo raray kan cusub _maps.scss
:
$theme-colors-rgb
$utilities-colors
$utilities-text
$utilities-text-colors
$utilities-bg
$utilities-bg-colors
$negative-spacers
$gutters
CSS caadadii kuu dhisnayd waa inay u ekaataa wax sidan oo kale ah oo leh khariidado gooni ah oo la soo dejiyo.
// Functions come first
@import "functions";
// Optional variable overrides here
+ $custom-color: #df711b;
+ $custom-theme-colors: (
+ "custom": $custom-color
+ );
// Variables come next
@import "variables";
+ // Optional Sass map overrides here
+ $theme-colors: map-merge($theme-colors, $custom-theme-colors);
+
+ // Followed by our default maps
+ @import "maps";
+
// Rest of our imports
@import "mixins";
@import "utilities";
@import "root";
@import "reboot";
// etc
Adeegyada cusub
font-weight
Adeegyada la balaariyay si loogu daro.fw-semibold
xarfaha semiboldborder-radius
Adeegyada la balaariyay si loogu daro laba cabbir oo cusub,.rounded-4
iyo.rounded-5
, doorashooyin badan.
Isbeddelo dheeri ah
-
$enable-container-classes
Doorasho cusub oo lasoo bandhigay . - Hadda markaad dooranayso qaabka tijaabada ah ee CSS Grid,.container-*
xiisadaha wali waa la ururin doonaa, ilaa doorashadan loo dejiyayfalse
. Konteenarada sidoo kale hadda waxay ilaalinayaan qiyamka mareenka. -
Qaybta Offcanvas hadda waxay leedahay kala duwanaansho jawaab celin ah . Fasalka asalka
.offcanvas
ah wali waxba kama beddelin—waxa uu qariyaa dhammaan meelaha daawashada. Si aad uga dhigto mid jawaab celin leh, u beddel.offcanvas
fasalkaas fasal kasta.offcanvas-{sm|md|lg|xl|xxl}
. -
Qaybiyayaal miis oo dhumuc weyn ayaa hadda doortay. - Waxaan ka saarnay dhumuc weyn oo aad u adag in laga gudbo xadka u dhexeeya kooxaha miiska waxaana u rarnay fasal ikhtiyaari ah oo aad codsan karto,
.table-group-divider
. Tusaale ahaan warqadaha miiska u eeg. -
Scrollspy dib ayaa loo qoray si loo isticmaalo Isgooyska Observer API , taas oo macnaheedu yahay uma baahnid xidhidh waalid qaraabo ah, deprecates
offset
config, iyo in ka badan. U fiirso hirgelinta Scrollspy kaaga inay noqdaan kuwo sax ah oo joogto ah muujintooda nav. -
Popovers iyo aaladaha hadda isticmaala doorsoomayaasha CSS. Doorsoomayaasha CSS qaarkood ayaa laga cusboonaysiiyay dhiggooda Sass si loo dhimo tirada doorsoomayaasha. Natiijadu waxay tahay, saddex doorsoome ayaa meesha ka saaray sii deyntan:
$popover-arrow-color
,$popover-arrow-outer-color
, iyo$tooltip-arrow-color
. -
Lagu daray
.text-bg-{color}
caawiyeyaal cusub. Halkii aad dejin lahayd shakhsi ahaan.text-*
iyo.bg-*
adeegyada, waxaad hadda isticmaali kartaa.text-bg-*
caawiyayaasha si aad u dejisobackground-color
horudhac is barbar socdacolor
. -
Wax ka beddelka lagu daray
.form-check-reverse
si loo rogo nidaamka sumadaha iyo sanduuqyada hubinta/ raadiyeyaasha la xidhiidha. -
Tiirar xariif ah oo lagu daray waxay taageerayaan miisaska iyada oo loo marayo
.table-striped-columns
fasalka cusub.
Si aad u hesho liis dhamaystiran oo isbedel ah, eeg mashruuca v5.2.0 ee GitHub .
v5.1.0
-
Taageero tijaabo ah oo lagu daray qaabka CSS Grid . - Tani waa shaqo socota, oo aan weli diyaar u ahayn isticmaalka wax soo saarka, laakiin waxaad dooran kartaa habka cusub ee Sass. Si aad awood ugu yeelato, dami shabagga caadiga ah, adoo dejinaya
$enable-grid-classes: false
oo awood u siinaya CSS Grid adoo dejinaya$enable-cssgrid: true
. -
Navbars la cusboonaysiiyay si loo taageero offcanvas. - Ku dar khaanadaha offcanvas ee navbar kasta oo leh
.navbar-expand-*
fasalada jawaab celinta iyo qaar ka mid ah calaamadaynta offcanvas. -
Waxaa lagu daray meel cusub - Qaybtayada cusub, hab lagu bixiyo baloogyo ku meel gaar ah beddelka macluumaadka dhabta ah si loo muujiyo in shay weli ku soo shubanayo goobtaada ama abkaaga.
-
Burburinta plugin hadda waxay taageertaa burburka toosan . - Ku darso
.collapse-horizontal
inaad.collapse
burburtowidth
halkii aad ka ahaan lahaydheight
. Ka fogow dib u rinjiyeynta browserka adiga oo dejinayamin-height
amaheight
. -
Waxaa lagu daray gacan-yarayaal cusub oo xirmo iyo toosan. - Si dhakhso leh u codso hanti badan oo flexbox ah si aad si dhakhso leh u abuurto jaangooyooyin gaar ah oo leh xirmo . Ka dooro xirmooyinka
.hstack
toosan ( ) iyo toosan (.vstack
) Ku dar qaybo toosan oo la mid<hr>
ah canaasiirta caawiyayaasha cusub.vr
. -
Lagu daray doorsoomayaal caalami ah oo
:root
CSS ah. - Waxaa lagu daray dhowr doorsoomayaal CSS oo cusub:root
heerka lagu xakameynayo<body>
qaababka. Wax badan ayaa ku jira shaqada, oo ay ku jiraan dhammaan adeegyadayada iyo qaybahayada, laakiin hadda akhri doorsoomayaasha CSS ee qaybta Customize . -
Midabka dib loo habeeyay iyo utility-ga asalka si loo isticmaalo doorsoomayaasha CSS, oo lagu daray hufnaanta qoraalka cusub iyo yutiilitida muraayadda asalka ah . -
.text-*
iyo.bg-*
yutiilitooyinka hadda waxaa lagu dhisay doorsoomayaasha CSS iyorgba()
qiyamka midabka, taas oo kuu oggolaanaysa inaad si fudud ugu habayso utility kasta oo leh yutiilitooyin cusub -
Waxaa lagu daray tusaalooyin jajab cusub oo ku salaysan si loo muujiyo sida loo habeeyo qaybahayaga. - U soo jiid diyaar si aad u isticmaasho qaybaha la habeeyey iyo qaababka kale ee naqshadaynta ee tusaalayaashayada cusub ee Snippets . Waxaa ku jira cag- gooyeyaal , hoos u dhac , liiska kooxaha , iyo moodooyinka .
-
Hababka meelaynta aan la isticmaalin ee laga saaray popovers iyo qalabyada sida kuwan waxaa maamula oo keliya Popper.
$tooltip-margin
waa la dhimay oo la dejiyaynull
hawsha.
Macluumaad dheeri ah ma rabtaa? Akhri qoraalka v5.1.0.
Ku-tiirsanaanta
- tuuray jQuery
- Laga cusboonaysiiyay Popper v1.x ilaa Popper v2.x.
- Libsass lagu beddelay Dart Sass sidii isku-dubaridiyahayaga Sass ee la siiyay Libsas waa la joojiyay.
- Waxaan uga soo haajiray Jekyll una guuray Hugo si loo dhiso dukumentiyadayada
Taageerada browserka
- Internet Explorer 10 iyo 11 ayaa la tuuray
- La tuuray Microsoft Edge <16 (Legacy Edge)
- Firefox waa la tuuray <60
- Safari la tuuray <12
- IOS Safari oo la tuuray <12
- Chrome la tuuray <60
Dukumentiyada ayaa isbedela
- Dib loo habeeyay bogga hoyga, qaabaynta dokumentiyada, iyo cagaha.
- Lagu daray hagaha baakadka cusub
- Lagu daray qayb cusub oo habayn , oo lagu bedelayo v4's Theming page , oo leh faahfaahin cusub oo ku saabsan Sass, doorashooyinka qaabaynta caalamiga ah, nidaamyada midabka, doorsoomayaasha CSS, iyo in ka badan.
- Dib u habaynta dhammaan dukumeentiyada foomamka qayb cusub oo foomamka , iyada oo u kala saaraysa waxa ku jira bogag aad diirada u saaran.
- Sidoo kale, la cusboonaysiiyay qaybta Layout , si aad u caddayso waxa ku jira.
- Waxaa loo beddelay "Navs" bogga qaybta "Navs & Tabs".
- Bogga "Checks" waxaa loo beddelay "Checks & radios".
- Dib u habayn ku samaysay navbar-ka oo ku daray subnav cusub si ay u fududaato in aad agagaarto boggayaga iyo noocyada dokumentiyada.
- Waxaa lagu daray jid gaaban kiiboodhka goobta raadinta Ctrl + /:.
Sass
-
Waxaan ka saarnay khariidaddii Sass ee isku-darka ahayd si ay u sahlanaato in meesha laga saaro qiyamka dheeraadka ah. Maskaxda ku hay inaad hadda qeexdo dhammaan qiyamka ku jira khariidadaha Sass sida
$theme-colors
. Eeg sida loola macaamilo khariidadaha Sass . -
JebintaShaqada dib loo magacaabay
color-yiq()
iyo doorsoomayaasha la xidhiidhacolor-contrast()
maadaama aanay hadda xidhiidh la lahayn booska midabka YIQ. Fiiri #30168.$yiq-contrasted-threshold
waxaa loo bedelay$min-contrast-ratio
.$yiq-text-dark
waxaana$yiq-text-light
loo kala beddelay magacyo$color-contrast-dark
iyo$color-contrast-light
.
-
JebintaSu'aalaha warbaahinta isku-darka cabbirada waxay u beddeleen hab macquul ah.
media-breakpoint-down()
waxay isticmaashaa barta jabinta lafteeda halkii aad ka isticmaali lahayd barta jabinta soo socota (tusaale,media-breakpoint-down(lg)
halkiimedia-breakpoint-down(md)
bartilmaameedyada la beegsan lahaa ee ka yarlg
).- Sidoo kale, halbeegga labaad ee ku jira
media-breakpoint-between()
wuxuu kaloo isticmaalaa barta jabinta lafteeda halkii uu ka isticmaali lahaa barta soo socota (tusaale,media-between(sm, lg)
halkii lamedia-breakpoint-between(sm, md)
beegsan lahaa meelaha u dhexeeyasm
iyolg
).
-
JebintaHababka daabacaadda ee meesha laga saaray iyo
$enable-print-styles
doorsoomayaasha. Fasalada bandhigga daabacaadda ayaa wali ku dhow. Fiiri #28339 . -
JebintaLa tuuray
color()
,theme-color()
, oogray()
u shaqeeya doorsoomayaal. Fiiri #29083 . -
JebintaShaqada dib
theme-color-level()
loo magacaabaycolor-level()
oo hadda aqbashay midab kasta oo aad rabto halkii aad ka heli lahayd$theme-color
midabyo kaliya. Fiiri #29083 Ka fiirso:color-level()
ayaa markii dambe lagu tuurayv5.0.0-alpha3
. -
JebintaLa magacaabay
$enable-prefers-reduced-motion-media-query
oo$enable-pointer-cursor-for-buttons
loo bixiyay$enable-reduced-motion
iyo$enable-button-pointers
si kooban. -
JebintaMeesha laga saaray
bg-gradient-variant()
isku darka Isticmaal.bg-gradient
fasalka si aad ugu darto gradients walxaha halkii aad ka heli lahayd.bg-gradient-*
fasallada la soo saaray. -
Jebinta Waxa meesha laga saaray isku-dhafka hore ee laga saaray:
hover
, iyohover-focus
_plain-hover-focus
hover-focus-active
float()
form-control-mixin()
nav-divider()
retina-img()
text-hide()
(sidoo kale waa la tuuray fasalka utility ee la xidhiidha,.text-hide
)visibility()
form-control-focus()
-
JebintaShaqada dib loo magacaabay
scale-color()
sishift-color()
looga fogaado isku dhaca shaqada Sass ee midabaynta u gaarka ah. -
box-shadow
mixins hadda oggolaadaannull
qiyamka iyo hoosnone
ka doodo badan. Fiiri #30394 . -
Isku-
border-radius()
dhafka hadda wuxuu leeyahay qiime aan caadi ahayn.
Nidaamka midabka
-
Nidaamka midabka kaas oo la shaqeeyay
color-level()
lagana$theme-color-interval
saaray habka midabka cusub. Dhammaanlighten()
iyodarken()
hawlaha ku jira codebase-kayaga waxa lagu beddelaatint-color()
iyoshade-color()
. Hawlahani waxay isku dari doonaan midabka mid cad ama madow halkii ay ka beddeli lahaayeen iftiinkeeda qadar go'an. Midabkushift-color()
wuu madoobayn doonaa ama hadhayaa iyadoo ku xidhan haddii cabbirka miisaankiisu yahay mid togan ama mid taban. Faahfaahin dheeraad ah ka eeg #30622 . -
Midab kasta oo midab kasta lagu daray midabyo cusub, oo siinaya sagaal midab oo kala duwan midab kasta oo salka ah, sida doorsoomayaasha Sass cusub.
-
Kala duwanaanshaha midabka oo la hagaajiyay. Saamiga isbarbardhigga midabka jabay laga bilaabo 3:1 ilaa 4.5:1 iyo midab buluug, cagaar, cyan, iyo casaan la cusboonaysiiyay si loo hubiyo isbarbardhigga WCAG 2.1 AA. Sidoo kale midabkeena isbarbardhiga u
$gray-900
beddeley$black
. -
Si aan u taageerno nidaamka midabkeena, waxaan ku soo kordhinay caado
tint-color()
iyoshade-color()
hawlo cusub si aan midabkeena ugu qasno.
Cusboonaysiinta Grid
-
Barxad cusub! Waxaa lagu daray meel cusub oo kor
xxl
u1400px
kac ah. Wax is beddel ah ma jiraan dhammaan meelaha kale ee jabinta. -
Biyo-mareennada la hagaajiyay. Gutters hadda waxa lagu dejiyay rems, oo way ka cidhiidhsan yihiin v4 (
1.5rem
, ama ku saabsan24px
, hoos30px
). Tani waxay la jaanqaadaysaa majaraha hab-maamuuska ee nidaamkayaga iyo adeegyadayada kala dheeraynta.- Lagu darey dabaq cusub (
.g-*
,.gx-*
, iyo.gy-*
) si loo xakameeyo maroojisyada jiifka/tooska ah, maroojisyada toosan, iyo majaraha toosan. - JebintaWaxaa loo beddelay
.no-gutters
si.g-0
ay ugu habboonaato yutiilitida jeexjeexyada cusub.
- Lagu darey dabaq cusub (
-
Tiirarka hadda ma
position: relative
dalban, marka waxaa laga yaabaa inaad ku darto.position-relative
qaar ka mid ah walxaha si aad u soo celiso dhaqankaas. -
JebintaHoos u dhigay dhawr
.order-*
fasal oo inta badan aan la isticmaalin. Hadda waxaan bixinaa oo kaliya.order-1
meel.order-5
ka baxsan sanduuqa. -
JebintaLa tuuray
.media
qaybta maadaama si fudud loogu soo celin karo yutiilitida. Fiiri #28265 tusaale ahaan bogga adeegyada flex . -
Jebinta
bootstrap-grid.css
hadda kaliya waxay quseysaabox-sizing: border-box
tiirka halkii aad dib u dejin lahayd cabbirka sanduuqa caalamiga ah. Sidan, qaababka xajinta waxaa loo isticmaali karaa meelo badan iyada oo aan la faragelin. -
$enable-grid-classes
mar dambe ma curyaamiso jiilka fasalada weelka. Fiiri #29146. -
Waxaa loo cusboonaysiiyay
make-col
isku darka oo u dhigma tiirar siman oo aan lahayn cabbir cayiman.
Mawduuca, Dib-u-bilow, iwm
-
RFS hadda waa la furay. Ciwaanka isticmaalaya
font-size()
dhafka ayaa si toos ah ula qabsan doonafont-size
cabbirkooda iyadoo la eegayo muuqaalka. Sifadan waxa hore loogu gatay v4. -
JebintaWaxaan dib u habeyn ku sameynay qoraalkayaga soo bandhigida si aan ugu bedelno
$display-*
doorsoomayaashayada iyo$display-font-sizes
khariidadda Sass. Sidoo kale meesha laga saaray$display-*-weight
doorsoomayaasha gaarka ah ee hal$display-font-weight
iyo habaynfont-size
s. -
Waxaa lagu daray laba
.display-*
cabbir cinwaan oo cusub,.display-5
iyo.display-6
. -
Xiriirinta waxaa hoosta laga xarriiqay si toos ah (ma ahan oo keliya dul heehaab), ilaa ay ka mid yihiin qaybo gaar ah mooyaane.
-
Miisaska dib loo habeeyay si loo cusboonaysiiyo qaabkooda oo dib loogu dhiso doorsoomayaal CSS si loo xakameeyo habaynta.
-
JebintaMiisaska buulka leh ma dhaxli karaan qaabab dambe.
-
Jebinta
.thead-light
waxaana.thead-dark
lagu tuuray door ah.table-*
fasalada kala duwan ee loo isticmaali karo dhammaan walxaha miiska (thead
,tbody
,tfoot
,tr
iyoth
)td
. -
JebintaIsku-
table-row-variant()
darka waxa loo beddelaytable-variant()
oo aqbala 2 cabbir oo keliya:$color
(magaca midabka) iyo$value
(code code). Midabka xuduudka iyo midabada lahjadda si toos ah ayaa loo xisaabiyaa iyadoo lagu salaynayo doorsoomayaasha qodobka miiska. -
U kala qaybso doorsoomayaasha suufka unugga miiska
-y
iyo-x
. -
Jebinta
.pre-scrollable
Fasalka la tuuray . Fiiri #29135 -
Jebinta
.text-*
Utility-yada kuma darin dullimaad iyo gobollo diiradda saaraya xiriirinta mar dambe..link-*
Taa beddelkeeda fasallo caawiye ayaa la isticmaali karaa. Fiiri #29267 -
Jebinta
.text-justify
Fasalka la tuuray . Eeg #29793 -
Jebinta
<hr>
Cunsuriyada hadda waxay isticmaalaanheight
halkiiborder
ay si wanaagsan u taageeri lahaayeensize
sifada. Tani waxay sidoo kale awood u siineysaa isticmaalka qalabka suufka si ay u abuurto kala qaybiyayaal dhumuc weyn leh (tusaale,<hr class="py-1">
). -
Dib u habeyn toos ah
padding-left
iyo<ul>
curiyeyaasha<ol>
browser-ka default40px
una2rem
. -
Lagu daray
$enable-smooth-scroll
, kaas oo khuseeyascroll-behavior: smooth
caalami ahaan - marka laga reebo isticmaalayaasha waydiinaya dhaqdhaqaaqa la dhimay iyada oo loo marayoprefers-reduced-motion
weydiinta warbaahinta. Fiiri #31877
RTL
- Jihada toosan doorsoomayaal gaar ah, yutiilitida, iyo isku darka dhamaantood waa la bedelay si loo isticmaalo sifooyin macquul ah sida kuwa laga helay qaab-dhismeedka flexbox- tusaale,
start
iyoend
beddelkaleft
iyoright
.
Foomamka
-
Lagu daray foomam sabaynaya oo cusub! Waxaan u dallacnay tusaalaha summadaha Sabaynta si aan u helno qaybo qaabaysan oo si buuxda loo taageeray. Eeg bogga cusub ee sumadaha Sabaynta
-
Jebinta Qaabka qaabaysan ee wadaniga ah iyo kuwa gaarka ah. Sanduuqyada hubinta, raadiyaha, xulashada, iyo agabyada kale ee lahaa fasalada hooyo iyo kuwa caadiga ah ee v4 waa la xoojiyay. Hadda ku dhawaad dhammaan walxaha qaabkeenu waa kuwo caado u ah, intooda badan iyada oo aan loo baahnayn HTML caadada ah.
.custom-control.custom-checkbox
waa hadda.form-check
..custom-control.custom-custom-radio
waa hadda.form-check
..custom-control.custom-switch
waa hadda.form-check.form-switch
..custom-select
waa hadda.form-select
..custom-file
waxaana.form-file
lagu bedelay qaabab caadadii dusha sare.form-control
..custom-range
waa hadda.form-range
.- Dalkii la tuuray
.form-control-file
iyo.form-control-range
.
-
JebintaSoo dhacay
.input-group-append
iyo.input-group-prepend
. Waxaad hadda ku dari kartaa badhamada iyo.input-group-text
sida carruurta tooska ah ee kooxaha wax gelinta. -
Xaduuda soohdinta ee mudada dheer maqan ee kooxda galinta leh ee leh cillad jawaab celinta ansaxinta ayaa ugu dambeyntii la hagaajiyay iyadoo lagu darayo
.has-validation
fasal dheeri ah kooxaha wax gelinta leh ansaxinta. -
Jebinta Dhigay fasalo qaabayn gaar ah oo loogu talagalay nidaamkayaga qulqulka. Isticmaal shabaqyadayada iyo adeegyadayada halkii aad ka isticmaali lahayd
.form-group
,.form-row
, ama.form-inline
. -
JebintaCalaamadaha foomka hadda waxay u baahan yihiin
.form-label
. -
Jebinta
.form-text
no more setsdisplay
, taasoo kuu ogolaanaysa inaad abuurto inline ama xannibi qoraalka caawinta sida aad rabto oo kaliya adiga oo bedelaya curiyaha HTML. -
Koontaroolada foomka looma isticmaalo go'an
height
markii ay suurtagal tahay, taa beddelkeeda dib loo dhigo simin-height
loo horumariyo habaynta iyo la jaanqaadka qaybaha kale. -
Astaamaha xaqiijinta hadda laguma dabaqo
<select>
s lehmultiple
. -
Isha dib loo habeeyay ee faylasha Sass ee hoos yimaada
scss/forms/
, oo ay ku jiraan qaababka kooxda wax gelinta.
Qaybaha
- Qiimaha midaysan
padding
ee digniinaha, rootida, kaadhadhka, hoos u dhaca, kooxaha liiska, moodooyinka, popovers, iyo aaladaha lagu saleeyo$spacer
doorsoomayaashayada. Fiiri #30564 .
Accordion
- Waxaa lagu daray qayb cusub oo accordion ah .
Digniin
-
Ogeysiisyadu hadda waxay leeyihiin tusaalayaal leh astaamo .
-
Hababka gaarka ah ee
<hr>
s ee laga saaray digniin kasta tan iyo markii ay hore u isticmaaleencurrentColor
.
Calaamadaha
-
JebintaLa tuuray dhammaan
.badge-*
fasallada midabka ee agabka asalka ah (tusaale, isticmaal.bg-primary
halkii laga isticmaali lahaa.badge-primary
). -
JebintaLa tuuray
.badge-pill
- beddelka.rounded-pill
utility isticmaal. -
JebintaHababka foojignaanta ee laga saaray
<a>
iyo<button>
walxaha -
Kordhinta suufka caadiga ah ee calaamadaha laga bilaabo
.25em
/.5em
ilaa.35em
/.65em
.
Burburka rootiga
-
La fududeeyay muuqaalka caadiga ah ee rootiga isagoo meesha ka saaray
padding
,background-color
, iyoborder-radius
. -
Waxaa lagu soo daray hanti cusub oo CSS gaar ah
--bs-breadcrumb-divider
si fudud loogu habeyn karo iyada oo aan loo baahnayn in dib loo soo uruuriyo CSS.
Badhamada
-
Jebinta Beddel badhamada , sanduuqyada hubinta ama raadiyaha, uma baahna JavaScript oo waxay leeyihiin calaamado cusub. Uma baahnno curiye duuban,
.btn-check
ku<input>
, oo ku lamaan.btn
fasal kasta oo ku yaal<label>
. Fiiri #30650 . Dukumiintiyada tan waxay ka guureen boggayaga Buttons waxayna u guureen qaybta foomamka cusub. -
Jebinta Looga soo degay
.btn-block
adeegyada Halkii aad ka isticmaali.btn-block
lahayd.btn
, ku duub badhamadaada.d-grid
iyo.gap-*
utility si aad u banayso marka loo baahdo. U beddelo fasallada jawaab-celinta si aad xitaa u maamusho iyaga. U akhri dukumeentiyada tusaale ahaan. -
La cusboonaysiiyay annaga
button-variant()
iyobutton-outline-variant()
isku darka si ay u taageeraan cabbirro dheeraad ah. -
Badhamada la cusboonaysiiyay si loo hubiyo kala duwanaanshiyaha korodhay ee duleelka iyo gobolada firfircoon.
-
Badhamada naafada hadda waxay leeyihiin
pointer-events: none;
.
Kaadhka
-
JebintaHoos
.card-deck
u dhac ku yimid shabkadayada. Ku duub kaararkaaga fasallada tiirarka oo ku dar.row-cols-*
weel waalid si aad u abuurto sagxadaha kaadhka (laakin iyada oo la xakameynayo toosinta jawaabta). -
JebintaHoos
.card-columns
u dhac ku yimid dhanka Masonry. Fiiri #28922 . -
JebintaWaxay ku bedeshay
.card
accordion ku salaysan qayb cusub oo Accordion ah .
Carousel
-
.carousel-dark
Kala duwanaansho cusub oo lagu daray qoraalka mugdiga ah, kontaroolada, iyo tilmaamayaasha (ku fiican asalka fudud). -
Astaamaha chevron ee lagu beddelay kontaroolada carousel oo leh SVG-yo cusub oo ka yimid Astaamaha Bootstrap .
Xir badhanka
-
JebintaWaxaa
.close
loogu.btn-close
magac daray magac yar. -
Xiritaanka badhamada hadda waxay isticmaalaan
background-image
(SVG-ku-xidhan) halkii ay ka ahaan×
lahaayeen HTML-ka, taasoo u oggolaanaysa in si fudud loo habeeyo iyada oo aan loo baahnayn in la taabto calaamadayntaada. -
Lagu daray
.btn-close-white
kala duwanaansho cusub oo adeegsatafilter: invert(1)
si ay u suurtageliso isbarbardhigga sare ee ka saarista calaamadaha ka soo horjeeda asalka madow.
Burbur
- Duub-duubka oo la saaray oo loogu talagalay accordions.
Hoos u dhac
-
Waxaa lagu daray doorsoomayaal cusub
.dropdown-menu-dark
iyo doorsoomayaal laxidhiidha hoos udhaca mugdiga ah ee la rabo. -
Doorsoome cusub oo lagu daray
$dropdown-padding-x
. -
Madoobeeyay qaybiyaha hoos u dhaca si uu isbarbardhiga u fiicnaado.
-
JebintaDhammaan dhacdooyinka hoos-u-dhigga hadda waxay ku kiciyaan badhanka hoos u-dejinta ka dibna la xumbo ilaa qaybta waalidka.
-
Liiska hoos-u-dhaca hadda waxay leeyihiin
data-bs-popper="static"
sifo go'an marka meelaynta hoos u dhigistu ay tahay mid taagan, ama hoos u dhigiddu ay ku taal navbar. Tan waxaa ku daray JavaScript-kayaga oo waxay naga caawisaa adeegsiga qaababka booska caadiga ah annaga oo aan faragelin ku samaynayn meelaynta Popper. -
JebintaXulashada la tuuray
flip
ee plugin hoos u dhigista iyada oo door bideysa qaabeynta Popper-ka. Hadda waxaad joojin kartaa hab-dhaqanka rogrogmada adiga oo ka gudbaya array madhan oo ahfallbackPlacements
ikhtiyaarka beddelka beddelka. -
Menus-hoosaadka hadda waa la gujin karaa iyada oo leh
autoClose
ikhtiyaar cusub si loo maareeyo dabeecadda isu -dhowrka . Waxaad isticmaali kartaa ikhtiyaarkan si aad u aqbasho gujinta gudaha ama dibadda liiska hoos u dhaca si aad uga dhigto mid is dhexgal ah. -
Hoos-u-dhacyada hadda waxay taageeraan
.dropdown-item
s ku duudduubay<li>
s.
Jumbotron
- JebintaHoos u dhigay qaybta jumbotron maadaama lagu koobi karo adeegyada. Fiiri tusaalaheena cusub ee Jumbotron ee muujinta.
Liiska kooxda
.list-group-numbered
Lagu daray wax ka beddelka cusub liiska kooxaha
Navs iyo tabs
- Lagu daray
null
doorsoomayaal cusubfont-size
,font-weight
,color
, iyo:hover
color
fasalka.nav-link
.
Navbars
- JebintaNavbars hadda waxay u baahan yihiin weel gudaha ah (si aad loo fududeeyo shuruudaha kala dheereynta iyo CSS loo baahan yahay).
- JebintaFasalka
.active
mar dambe laguma dabaqi karo.nav-item
s, waa in si toos ah loogu dabaqaa.nav-link
s.
Offcanvas
- Lagu daray qaybta cusub ee canvas offcanvas .
Pagination
-
Xidhiidhiyayaasha pagination hadda waxay leeyihiin wax la beddeli karo
margin-left
kuwaas oo si firfircoon ugu wareegsan dhammaan geesaha marka midba midka kale ka sooco. -
Lagu daray
transition
s xiriirinta boggaga
Popovers
-
JebintaDib
.arrow
loogu magacaabay.popover-arrow
qaab-dhismeedkayaga popover ee caadiga ah. -
Ikhtiyaarka
whiteList
looallowList
magacaabay
Spinners
-
Spinners hadda waxay sharfaan
prefers-reduced-motion: reduce
iyagoo hoos u dhigaya animations. Fiiri #31882 . -
Laysinka toosan ee lafdhabarta oo la hagaajiyay.
Roodhiyo
-
Toasts hadda waxa la meel dhigi karaa a
.toast-container
iyada oo la kaashanayo meelaynta yutiilitida . -
Waxa loo beddelay 5 ilbidhiqsi.
-
Laga
overflow: hidden
soo saaray rootiga rootiga oo lagu beddelayborder-radius
s habboon oo lehcalc()
hawlo.
Tilmaamaha Qalabka
-
JebintaWaxaa
.arrow
loogu magac daray.tooltip-arrow
qaabka caadiga ah ee qalabkayaga. -
JebintaQiimaha caadiga ah ee loogu talagalay
fallbackPlacements
waxaa loo beddelaa['top', 'right', 'bottom', 'left']
meeleyn ka sii wanaagsan ee walxaha popper. -
JebintaIkhtiyaarka
whiteList
looallowList
magacaabay
Utility
-
JebintaWaxaa loo magacaabay adeegyo dhowr ah si ay u isticmaalaan magacyada hantida macquulka ah halkii ay ka isticmaali lahaayeen magacyada jihaynta iyadoo lagu daray taageerada RTL:
- La magacaabay
.left-*
iyo.right-*
ku.start-*
iyo iyo.end-*
. - La magacaabay
.float-left
iyo.float-right
ku.float-start
iyo iyo.float-end
. - La magacaabay
.border-left
iyo.border-right
ku.border-start
iyo iyo.border-end
. - La magacaabay
.rounded-left
iyo.rounded-right
ku.rounded-start
iyo iyo.rounded-end
. - La magacaabay
.ml-*
iyo.mr-*
ku.ms-*
iyo iyo.me-*
. - La magacaabay
.pl-*
iyo.pr-*
ku.ps-*
iyo iyo.pe-*
. - La magacaabay
.text-left
iyo.text-right
ku.text-start
iyo iyo.text-end
.
- La magacaabay
-
JebintaNaafada xad-dhaafka ah sida caadiga ah.
-
Lagu soo daray
.bg-body
fasal cusub si dhakhso ah loogu dejiyo<body>
asalka walxaha dheeraadka ah. -
Waxaa lagu daray boos cusub oo loogu talagalay
top
,right
,bottom
, iyoleft
. Qiimaha waxaa ku jira0
,50%
, iyo100%
hanti kasta. -
Lagu daray cusub
.translate-middle-x
&.translate-middle-y
yutiilitooyin si toosan ama toosan udub dhexaadka u ah curiyayaasha meelaysan -
Lagu daray
border-width
yutiilitida cusub -
JebintaLoo
.text-monospace
magacaabay.font-monospace
. -
JebintaWaxaa meesha laga saaray
.text-hide
maadaama ay tahay hab qadiimi ah oo lagu qariyo qoraalka oo ay tahay inaan mar dambe la isticmaalin. -
.fs-*
Utility- yada lagu darayfont-size
(oo leh RFS) Kuwani waxay isticmaalaan miisaan la mid ah sida cinwaannada caadiga ah ee HTML (1-6, weyn ilaa yar), waxaana lagu beddeli karaa khariidadda Sass. -
JebintaUtilities dib loo magacaabay
.font-weight-*
sida.fw-*
soo koobida iyo joogteynta -
JebintaUtilities dib loo magacaabay
.font-style-*
sida.fst-*
soo koobida iyo joogteynta -
Lagu darey
.d-grid
si ay u soo bandhigaan utility iyogap
yutiilitooyinka cusub (.gap
) ee CSS Grid iyo qaabeynta sanduuqyada flexbox. -
JebintaLaga saaray
.rounded-sm
iyorounded-lg
, oo soo bandhigay miisaan cusub oo fasallo ah,.rounded-0
si.rounded-3
. Fiiri #31687 . -
Lagu daray
line-height
yutiilitida cusub:.lh-1
,.lh-sm
,.lh-base
iyo.lh-lg
. Halkan ka daawo . -
U dhaqaajiyay
.d-none
utility-ga CSS-kayaga si aanu uga siino miisaan ka badan agabka kale ee bandhigga. -
Kordhinta
.visually-hidden-focusable
caawiyaha si uu sidoo kale uga shaqeeyo weelasha, isagoo isticmaalaya:focus-within
.
Caawiyeyaal
-
Jebinta Caawiyeyaasha isku duuban ee wax ka qabata ayaa lagu bedelay magaca caawiyayaasha saamiga ee leh magacyo cusub iyo dabeecado horumarsan, iyo sidoo kale doorsoome CSS ah oo waxtar leh.
- Fasallada waxaa loo beddelay si loogu beddelo
by
saamigax
dhinaca. Tusaale ahaan,.ratio-16by9
hadda waa.ratio-16x9
. - Waxaan hoos u dhignay xuliyihii kooxda
.embed-responsive-item
iyo curiye si aan u door bidno mid fudud oo.ratio > *
doorta. Fasal dheeraad ah looma baahna, caawiyaha saamiga hadda wuxuu la shaqeeyaa shay kasta oo HTML ah. - Khariidadda
$embed-responsive-aspect-ratios
Sass waa loo beddelay$aspect-ratios
oo qiyamkeeda waa la fududeeyay si loogu daro magaca fasalka iyo boqolkiiba sidakey: value
lammaanaha. - Doorsoomayaasha CSS hadda waa la soo saaray oo lagu daray qiime kasta oo ku jira khariidadda Sass. Wax ka
--bs-aspect-ratio
beddel doorsoomaha dusha.ratio
si aad u abuurto saami kasta oo caado ah .
- Fasallada waxaa loo beddelay si loogu beddelo
-
Jebinta Fasalada "Reader Screen" hadda waa fasalo "muuqaal qarsoon" .
scss/helpers/_screenreaders.scss
Waxa uu ka beddelay faylka Sassscss/helpers/_visually-hidden.scss
- La magacaabay
.sr-only
iyo.sr-only-focusable
in loo.visually-hidden
magacaabay.visually-hidden-focusable
- La magacaabay
sr-only()
oosr-only-focusable()
isku darayavisually-hidden()
iyovisually-hidden-focusable()
.
-
bootstrap-utilities.css
Hadda waxa kale oo ku jira caawiyayaashayada. Caawiyeyaashu uma baahna in lagu soo dejiyo dhismayaal khaas ah.
JavaScript
-
Ku-tiirsanaanta jQuery waa la tuuray oo dib-u-qoray plugins si ay ugu jiraan JavaScript-ka caadiga ah.
-
JebintaSifooyinka xogta ee dhammaan plugins-yada JavaScript hadda waa la magacaabay si ay u caawiyaan kala soocidda shaqeynta Bootstrap ee dhinacyada saddexaad iyo koodkaaga. Tusaale ahaan, waxaan isticmaalnaa
data-bs-toggle
halkiidata-toggle
. -
Dhammaan plugins hadda waxay aqbali karaan xulashada CSS inay tahay doodda koowaad. Waxaad ka gudbi kartaa walxaha DOM ama doore kasta oo CSS ah oo sax ah si aad u abuurto tusaale cusub oo plugin ah:
const modal = new bootstrap.Modal('#myModal') const dropdown = new bootstrap.Dropdown('[data-bs-toggle="dropdown"]')
-
popperConfig
waxaa loo gudbin karaa shaqo ahaan aqbala Bootstrap's default Popper config ahaan dood ahaan, si aad ugu milmaan habkan caadiga ah ee habkaaga. Waxay qusaysaa hoos-u-dhacyada, popovers, iyo qalabyada. -
Qiimaha caadiga ah ee loogu talagalay
fallbackPlacements
waxaa loo beddelaa['top', 'right', 'bottom', 'left']
meeleyn ka fiican ee walxaha Popper. Waxay qusaysaa hoos-u-dhacyada, popovers, iyo qalabyada. -
Hoosta laga saaray hababka mad-madowga leh sida
_getInstance()
→getInstance()
.