Ho fallela ho v5
Sheba le ho hlahloba liphetoho ho lifaele tsa mohloli oa Bootstrap, litokomane le likarolo tse tla u thusa ho tloha ho v4 ho ea ho v5.
Ho itšetleha
- jQuery e oele.
- E ntlafalitsoe ho tloha ho Popper v1.x ho ea ho Popper v2.x.
- E ile ea nkela Libsass sebaka ka Dart Sass joalo ka ha moqapi oa rona oa Sass o fuoe Libsass o ile oa tlosoa.
- E falletse ho tloha Jekyll ho ea Hugo bakeng sa ho haha litokomane tsa rona
Tšehetso ea sebatli
- E theohile Internet Explorer 10 le 11
- E theohile Microsoft Edge <16 (Legacy Edge)
- E theohile Firefox <60
- Safari e oeleng <12
- E theohile iOS Safari <12
- Chrome e theohile <60
Litokomane lia fetoha
- Leqephe la lehae le hlophisitsoeng bocha, sebopeho sa litokomane, le botlaaseng ba leqephe.
- Tataiso e ncha e kentsoeng ea Parcel .
- E kentse karolo e ncha ea Customize , e nkelang leqephe la Theming ea v4 , ka lintlha tse ncha ho Sass, likhetho tsa tlhophiso ea lefats'e, merero ea mebala, mefuta-futa ea CSS, le tse ling.
- E hlophisitse bocha litokomane tsohle tsa foromo ka karolo e ncha ea Liforomo , e arola litaba ka maqephe a tsepamisitsoeng haholo.
- Ka mokhoa o ts'oanang, e ntlafalitse karolo ea Layout , ho hlahisa litaba tsa grid ka mokhoa o hlakileng haholoanyane.
- E rehiloe bocha leqephe la karolo ea "Navs" ho "Navs & Tabs".
- E rehiloe lebitso la leqephe la "Checks" ho "Checks & radios".
- E ntlafalitse sebaka sa marang-rang 'me sa eketsa subnav e ncha ho etsa hore ho be bonolo ho potoloha libaka tsa rona le liphetolelo tsa litokomane.
- E kentse khaoletso e ncha ea keyboard bakeng sa sebaka sa ho batla: Ctrl + /.
Sass
-
Re lahlile likhokahano tsa 'mapa oa Sass ho etsa hore ho be bonolo ho tlosa boleng bo sa hlokahaleng. Hopola hore joale o tlameha ho hlalosa boleng bohle ho limmapa tsa Sass joalo ka
$theme-colors
. Sheba mokhoa oa ho sebetsana le limmapa tsa Sass . -
Ho qhetsolaMosebetsi o rehiloeng
color-yiq()
hape le mefuta e amanang le eonacolor-contrast()
kaha ha e sa amana le sebaka sa mebala sa YIQ. Sheba #30168.$yiq-contrasted-threshold
e rehelletsoe ka$min-contrast-ratio
.$yiq-text-dark
'me$yiq-text-light
ka ho latellana ba rehoa bocha ho$color-contrast-dark
le$color-contrast-light
.
-
Ho qhetsolaLitekanyetso tsa li-mixins tsa media query li fetohile bakeng sa mokhoa o utloahalang haholoanyane.
media-breakpoint-down()
e sebelisa sebaka sa phomolo ka bosona ho fapana le sebaka se latelang sa khefu (mohlala,media-breakpoint-down(lg)
ho fapana lemedia-breakpoint-down(md)
litebello tse nyane ho fetalg
).- Ka mokhoa o ts'oanang, paramethara ea bobeli ho
media-breakpoint-between()
eona e sebelisa sebaka sa phomolo ka boeona ho fapana le sebaka se latelang sa phomolo (mohlala,media-between(sm, lg)
sebakeng samedia-breakpoint-between(sm, md)
litebello tsa pono lipakeng tsasm
lelg
).
-
Ho qhetsolaHo tlositsoe mekhoa ea khatiso le
$enable-print-styles
mefuta e fapaneng. Litlelase tsa ponts'o ea khatiso li ntse li le teng. Sheba #28339 . -
Ho qhetsolaDrop
color()
,theme-color()
, legray()
mesebetsi e emelang mefuta-futa. Sheba #29083 . -
Ho qhetsolaTs'ebetso e rehelletsoeng
theme-color-level()
hocolor-level()
'me joale e amohela mebala efe kapa efe eo u e batlang ho fapana le$theme-color
mebala feela. Bona #29083 Hlokomela:color-level()
hamorao e ile ea theohav5.0.0-alpha3
. -
Ho qhetsolaE reheletsoe bocha
$enable-prefers-reduced-motion-media-query
le$enable-pointer-cursor-for-buttons
ho ea$enable-reduced-motion
le$enable-button-pointers
bakeng sa bokhutšoanyane. -
Ho qhetsolaE
bg-gradient-variant()
tlositse motsoako. Sebelisa.bg-gradient
sehlopha ho kenya li-gradient ho likarolo ho fapana le.bg-gradient-*
litlelase tse hlahisitsoeng. -
Ho qhetsola E tlositsoe metsoako e neng e lahliloe pele:
hover
,,, lehover-focus
_plain-hover-focus
hover-focus-active
float()
form-control-mixin()
nav-divider()
retina-img()
text-hide()
(e boetse e lahlile sehlopha sa lisebelisoa tse amanang,.text-hide
)visibility()
form-control-focus()
-
Ho qhetsola
scale-color()
Mosebetsi o rehelletsoengshift-color()
ho qoba ho thulana le tšebetso ea Sass ea ho lekanya mebala. -
box-shadow
li-mixins joale li lumellanull
boleng le ho theohanone
ho tsoa likhang tse ngata. Sheba #30394 . -
Hona
border-radius()
joale mixin e na le boleng ba kamehla.
Mokhoa oa mebala
-
Sistimi ea mebala e neng e sebetsa le
color-level()
e$theme-color-interval
tlositsoeng molemong oa sistimi e ncha ea mebala. Tsohlelighten()
ledarken()
mesebetsi ho codebase ea rona e nkeloa sebaka ketint-color()
leshade-color()
. Mesebetsi ena e tla kopanya 'mala le o mosoeu kapa o motšo ho e-na le ho fetola khanya ea oona ka tekanyo e tsitsitseng. Eshift-color()
tla etsa hore 'mala o be o khanyang kapa o tlose 'mala ho latela hore na boima ba eona bo nepahetse kapa bo fosahetse. Sheba #30622 bakeng sa lintlha tse ling. -
E kentse mebala le mebala e mecha bakeng sa 'mala o mong le o mong, e fana ka mebala e robong e arohaneng bakeng sa' mala o mong le o mong oa motheo, e le mefuta e mecha ea Sass.
-
Phapang ea mebala e ntlafalitsoeng. Karolelano ea mebala e fapaneng ho tloha ho 3:1 ho isa ho 4.5:1 le mebala e ntlafalitsoeng ea boputsoa, botala, cyan, le pinki ho netefatsa phapang ea WCAG 2.1 AA. E boetse e fetotse 'mala oa rona o fapaneng oa mebala ho tloha
$gray-900
ho$black
. -
Ho ts'ehetsa sistimi ea rona ea mebala, re kentse tloaelo
tint-color()
leshade-color()
mesebetsi e mecha ho kopanya mebala ea rona ka nepo.
Lintlafatso tsa grid
-
Qeto e ncha! E kentse sebaka sa phomolo se secha
xxl
bakeng sa1400px
le holimo. Ha ho liphetoho libakeng tse ling kaofela. -
Li-gutters tse ntlafalitsoeng. Li-Gutters li se li behiloe ka li-rems, 'me li tšesaane ho feta v4 (
1.5rem
, kapa hoo e ka bang24px
, ho tloha ho30px
). Sena se hokahanya likhoele tsa sistimi ea rona le lisebelisoa tsa rona tsa sebaka.- E kentse sehlopha se secha sa li-gutter (
.g-*
,.gx-*
, le.gy-*
) ho laola li-gutter tse tšekaletseng/tse emeng, li-gutter tse tšekaletseng, le li-gutter tse emeng. - Ho qhetsolaE rehelletsoe
.no-gutters
ho.g-0
tsamaisana le lisebelisoa tse ncha tsa gutter.
- E kentse sehlopha se secha sa li-gutter (
-
Likholomo ha li sa
position: relative
sebetsa, kahoo u ka tlameha ho kenya.position-relative
likarolo tse ling ho khutlisetsa boitšoaro boo. -
Ho qhetsolaE theohile litlelase tse 'maloa
.order-*
tseo hangata li neng li sa sebelisoe. Hona joale re fana feela ka.order-1
ntle.order-5
ho lebokose. -
Ho qhetsolaE lahlile
.media
karolo kaha e ka kopitsoa habonolo le lisebelisoa. Sheba #28265 le leqephe la lisebelisoa tsa flex mohlala . -
Ho qhetsola
bootstrap-grid.css
hona joale e sebetsa feelabox-sizing: border-box
ho kholomo ho e-na le ho tsosolosa boholo ba lebokose la lefats'e. Ka tsela ena, mekhoa ea rona ea grid e ka sebelisoa libakeng tse ngata ntle le tšitiso. -
$enable-grid-classes
ha e sa thibela tlhahiso ea lihlopha tsa lijana. Sheba #29146. -
E ntlafalitse
make-col
mixin hore e be ea kamehla ho likholomo tse lekanang ntle le boholo bo boletsoeng.
Content, Reboot, joalo-joalo
-
Hona joale RFS e sebelisoa ke kamehla. Lihlooho tse sebelisang
font-size()
mixin li tla ikamahanya le maemo a tsonafont-size
le sebaka sa pono. Karolo ena e kile ea khetha ho kena ka v4. -
Ho qhetsolaE ntlafalitse typography ea rona ho fetola
$display-*
mefuta ea rona le$display-font-sizes
'mapa oa Sass. E boetse e tlositse$display-*-weight
mefuta-futa ea motho ka mong bakeng sa s e le 'ngoe$display-font-weight
le e lokisitsoengfont-size
. -
.display-*
E ekelitse boholo ba lihlooho tse peli tse ncha ,.display-5
le.display-6
. -
Lihokelo li thathamisitsoe ka mokhoa oa kamehla (eseng feela ho hover), ntle le haeba e le karolo ea likarolo tse itseng.
-
Litafole tse entsoeng bocha ho nchafatsa litaele tsa tsona le ho li aha bocha ka mefuta ea CSS bakeng sa taolo e eketsehileng holim'a setaele.
-
Ho qhetsolaLitafole tse halikiloeng ha li sa rua mekhoa.
-
Ho qhetsola
.thead-light
'me.thead-dark
li lahliloe molemong oa.table-*
lihlopha tse fapaneng tse ka sebelisoang bakeng sa likarolo tsohle tsa tafole (thead
,tbody
,tfoot
,tr
,th
andtd
). -
Ho qhetsolaMotsoako
table-row-variant()
o rehiloe hapetable-variant()
mme o amohela li-parameter tse 2 feela:$color
(lebitso la mebala) le$value
(khoutu ea mebala). 'Mala oa moeli le mebala ea molumo e baloa ka bo eona ho latela mefuta-futa ea tafole. -
Arola mefuta e fapaneng ea padding ea lisele tsa tafole ka har'a
-y
le-x
. -
Ho qhetsolaSehlopha se theohileng
.pre-scrollable
. Sheba #29135 -
Ho qhetsola
.text-*
Lisebelisoa ha li sa eketsa hover le libaka tse tsepamisisang maikutlo ho lihokelo..link-*
litlelase tsa bathusi li ka sebelisoa ho e-na le hoo. Sheba #29267 -
Ho qhetsolaSehlopha se theohileng
.text-justify
. Sheba #29793 -
Ho qhetsola
<hr>
joale lisebelisoa li sebelisoaheight
ho e-na leborder
ho tšehetsasize
tšobotsi hamolemo. Sena se boetse se nolofalletsa ts'ebeliso ea lisebelisoa tsa marang-rang ho theha likarohano tse teteaneng (mohlala,<hr class="py-1">
). -
Seta botjha ho tsepameng
padding-left
le<ul>
dikarolo<ol>
ho tloha ho ya kamehla ho ya40px
ho2rem
. -
E ekelitsoe
$enable-smooth-scroll
, e sebetsangscroll-behavior: smooth
lefats'eng ka bophara-ntle le basebelisi ba kopang ho fokotsa motsamao kaprefers-reduced-motion
potso ea media. Sheba #31877
RTL
- Mefuta e fapaneng ea tataiso e otlolohileng, lisebelisoa, le li-mixins kaofela li rehiloe lebitso ho sebelisa thepa e utloahalang joalo ka e fumanoang ho flexbox meralo-mohlala,
start
leend
sebakeng saleft
leright
.
Mefuta
-
E kentse liforomo tse ncha tse phaphametseng! Re khothalelitse mohlala oa "Floating labels" ho likarolo tsa liforomo tse tšehetsoeng ka botlalo. Sheba leqephe le lecha la li-labels tsa Floating.
-
Ho qhetsola Likarolo tse kopantsoeng tsa tlhaho le tsa tloaelo. Mabokose a cheke, liea-le-moea, likhetho, le lintho tse ling tse kentsoeng tse neng li e-na le litlelase tsa khale le tsa tloaelo ho v4 li kopantsoe. Hona joale hoo e batlang e le likarolo tsohle tsa rona tsa foromo li tloaelehile ka ho feletseng, haholo ntle le tlhoko ea tloaelo ea HTML.
.custom-check
hona joale.form-check
..custom-check.custom-switch
hona joale.form-check.form-switch
..custom-select
hona joale.form-select
..custom-file
'me.form-file
li nkeloe sebaka ke mekhoa e tloaelehileng holim'a.form-control
..custom-range
hona joale.form-range
.- Letsoalloa
.form-control-file
le.form-control-range
.
-
Ho qhetsolaE theohile
.input-group-append
le.input-group-prepend
. Hona joale o ka eketsa likonopo le.input-group-text
joalo ka bana ba tobileng ba lihlopha tsa ho kenya. -
Sebaka sa nako e telele se sieo sa moeli oa sehlopha sa ho kenya se nang le phoso ea netefatso qetellong se tla lokisoa ka ho eketsa
.has-validation
sehlopha ho lihlopha tse kenyang ka netefatso. -
Ho qhetsola Ho theohile litlelase tsa sebopeho se ikhethileng bakeng sa sistimi ea rona ea grid. Sebelisa marang-rang le lisebelisoa tsa rona sebakeng sa
.form-group
,.form-row
, kapa.form-inline
. -
Ho qhetsolaLitlaleho tsa foromo joale li hloka
.form-label
. -
Ho qhetsola
.form-text
no longer setdisplay
, e o lumellang hore o thehe mongolo oa inline kapa o thibele thuso kamoo o lakatsang ka ho fetola karolo ea HTML. -
Matšoao a netefatso ha a sa sebelisoa ho
<select>
s lemultiple
. -
Mohloli o hlophisitsoeng bocha Lifaele tsa Sass tlas'a
scss/forms/
, ho kenyeletsoa le mekhoa ea lihlopha tsa ho kenya.
Likaroloana
- Maemo a kopaneng
padding
a litemoso, li-breadcrumbs, likarete, li-dropdown, lihlopha tsa lenane, li-modal, li-popovers, le malebela a lisebelisoa ho ipapisitse le$spacer
phapang ea rona. Sheba #30564 .
Accordion
Litlhokomeliso
-
Litlhokomeliso joale li na le mehlala e nang le litšoantšo .
-
E tlositse mekhoa e tloahelehileng bakeng sa
<hr>
s tlhokomelisong ka 'ngoe kaha ba se ba ntse ba e sebelisacurrentColor
.
Libeche
-
Ho qhetsolaE lahlile litlelase tsohle
.badge-*
tsa mebala bakeng sa lisebelisoa tsa morao-rao (mohlala, sebelisa.bg-primary
sebakeng sa.badge-primary
). -
Ho qhetsolaE theohile - sebelisa
.badge-pill
sesebelisoa ho.rounded-pill
e-na le hoo. -
Ho qhetsolaE tlositsoe hover le ho tsepamisa maikutlo bakeng sa
<a>
le<button>
likarolo. -
Keketseho ea li-padding ea kamehla bakeng sa libeche ho tloha ho
.25em
/.5em
ho ea.35em
/.65em
.
Li-breadcrumbs
-
E nolofalitse ponahalo ea kamehla ea breadcrumbs ka ho tlosa
padding
,background-color
, leborder-radius
. -
E kentse thepa e ncha ea CSS
--bs-breadcrumb-divider
bakeng sa ho e etsa habonolo ntle le ho hloka ho bokella CSS hape.
Likonopo
-
Ho qhetsola Likonopo tsa ho fetola , tse nang le li-checkbox kapa liea-le-moea, ha li sa hloka JavaScript 'me li na le letšoao le lecha. Ha re sa hloka ntho e phuthelang, eketsa
.btn-check
ho<input>
, 'me u e kopanye le lihlopha life kapa life.btn
tsa<label>
. Sheba #30650 . Litokomane tsa sena li tlohile leqepheng la rona la Likonopo ho ea karolong e ncha ea Liforomo. -
Ho qhetsola E theotsoe
.btn-block
bakeng sa lisebelisoa. Sebakeng sa ho sebelisa.btn-block
ho.btn
, thatela likonopo tsa hau ka.d-grid
sesebelisoa.gap-*
sa ho li beha ha ho hlokahala. Fetohela ho lihlopha tse arabelang ho fumana taolo e eketsehileng holim'a tsona. Bala litokomane bakeng sa mehlala e meng. -
E ntlafalitse rona
button-variant()
lebutton-outline-variant()
li-mixins ho ts'ehetsa liparamente tse ling. -
Likonopo tse nchafalitsoeng ho netefatsa phapang e ntseng e eketseha ho hover le libaka tse sebetsang.
-
Likonopo tse holofetseng li na le
pointer-events: none;
.
Karete
-
Ho qhetsolaE oele
.card-deck
molemong oa grid ea rona. Koaela likarete tsa hau ka litlelase tsa likholomo 'me u kenye.row-cols-*
setshelo sa motsoali ho etsa li-deck tsa likarete (empa ka taolo e eketsehileng mabapi le tatellano e arabelang). -
Ho qhetsolaE theohile
.card-columns
molemong oa Masonry. Sheba #28922 . -
Ho qhetsolaE kentse sebaka sa
.card
accordion e thehiloeng ka karolo e ncha ea Accordion .
Carousel
-
.carousel-dark
E kentse mofuta o mocha oa mongolo o lefifi, li-control le matšoao (e ntle bakeng sa nalane e bobebe). -
E nkeloe sebaka ke li-icon tsa chevron bakeng sa taolo ea carousel ka li-SVG tse ncha tse tsoang ho Litšoantšo tsa Bootstrap .
Konopo ea ho koala
-
Ho qhetsolaE reheletsoe
.close
ho.btn-close
bakeng sa lebitso le sa tloaelehang. -
Likonopo tse koalang joale li sebelisa
background-image
(SVG e kentsoeng)×
sebakeng sa HTML, e u lumellang hore u iketsetse habonolo ntle le tlhoko ea ho ama letšoao la hau. -
E kenyellelitse mofuta o mocha
.btn-close-white
o sebelisangfilter: invert(1)
ho lumella li-icon tsa phapang tse phahameng khahlano le maemo a lefifi.
Koaleha
- E tlositsoe moqolo oa anchoring bakeng sa li-accordions.
Litheohelang
-
E kentse mefuta e mecha
.dropdown-menu-dark
le e amanang le eona bakeng sa li-dropdown tse lefifi tse batloang. -
E kentse phapano e ncha bakeng sa
$dropdown-padding-x
. -
E fifalitse karohano ea litheolelo bakeng sa phapang e ntlafetseng.
-
Ho qhetsolaLiketsahalo tsohle tsa ho theoha li se li hlahisoa ho konopo ea toggle e theolelang ebe li phahamisoa ho karolo ea motsoali.
-
Manane a theoha hona joale a na le
data-bs-popper="static"
sebopeho se behiloeng ha sebaka sa ho theoha se tsitsitse ledata-bs-popper="none"
ha ho theoha ho le ho navbar. Sena se eketsoa ke JavaScript ea rona mme se re thusa ho sebelisa mekhoa ea maemo a tloaelehileng ntle le ho kena-kenana le boemo ba Popper. -
Ho qhetsolaKhetho
flip
e lahliloeng bakeng sa plugin e theoha molemong oa tlhophiso ea sebaka sa Popper. Hona joale o ka tima mokhoa oa ho phethola ka ho fetisa lethathamo le se nang letho bakeng safallbackPlacements
khetho ea flip modifier. -
Menu e theohang joale e ka tobeha ka
autoClose
khetho e ncha ea ho sebetsana le boits'oaro bo haufi-ufi . U ka sebelisa khetho ena ho amohela ho tobetsa ka hare kapa ka ntle ho menu e theoha ho etsa hore e sebelisane. -
Dropdowns joale tšehetso
.dropdown-item
e phuthetsoe ka<li>
s.
Jumbotron
- Ho qhetsolaE lahlile karolo ea jumbotron kaha e ka kopitsoa ka lisebelisoa. Sheba mohlala oa rona o mocha oa Jumbotron bakeng sa demo.
Sehlopha sa lenane
.list-group-numbered
E kentse phetoho e ncha ho lihlopha tsa lenane.
Navs le li-tab
null
E kentse mefuta e mecha bakeng safont-size
,font-weight
,color
, le:hover
color
phaposing.nav-link
.
Navbar
- Ho qhetsolaLi-Navbar joale li hloka setshelo ka hare ho (ho nolofatsa haholo litlhoko tsa sebaka le CSS e hlokahalang).
Offcanvas
- E kentse karolo e ncha ea offcanvas .
Pagination
-
Lihokelo tsa pagination joale li na le mokhoa oa ho ikhethela
margin-left
tse pota-potiloeng ka matla likhutlong tsohle ha li arotsoe ho tse ling. -
E kenyellelitsoe
transition
s ho lihokelo tsa pagination.
Bafutsana
-
Ho qhetsolaE reheletsoe
.arrow
ho.popover-arrow
template ea rona ea kamehla ea popover. -
whiteList
Khetho e reheletsoeng hoallowList
.
Li-spinners
-
Hona joale li-spinners li hlompha
prefers-reduced-motion: reduce
ka ho fokotsa lipopae. Sheba #31882 . -
Telamiso e otlolohileng ea spinner.
Li-toast
-
Hona joale li-toast li ka behoa ho a
.toast-container
ka thuso ea ho beha lisebelisoa . -
E fetotse nako ea toast ea kamehla ho metsotsoana e 5.
-
E tlositsoe
overflow: hidden
ho toasts mme e nkeloe sebaka keborder-radius
s e nepahetseng kacalc()
mesebetsi.
Lisebelisoa
-
Ho qhetsolaE reheletsoe bocha
.arrow
ho.tooltip-arrow
template ea rona ea kamehla. -
Ho qhetsolaBoleng ba kamehla ba tokollo bo
fallbackPlacements
fetotsoe['top', 'right', 'bottom', 'left']
bakeng sa ho beoa hantle ha likarolo tsa popper. -
Ho qhetsola
whiteList
Khetho e reheletsoeng hoallowList
.
Lisebelisoa
-
Ho qhetsolaE reha lits'ebeletso tse 'maloa ho sebelisa mabitso a thepa e utloahalang ho e-na le mabitso a tataiso ka kenyelletso ea tšehetso ea RTL:
- E reheletsoe bocha
.left-*
le.right-*
ho.start-*
le ho.end-*
. - E reheletsoe bocha
.float-left
le.float-right
ho.float-start
le ho.float-end
. - E reheletsoe bocha
.border-left
le.border-right
ho.border-start
le ho.border-end
. - E reheletsoe bocha
.rounded-left
le.rounded-right
ho.rounded-start
le ho.rounded-end
. - E reheletsoe bocha
.ml-*
le.mr-*
ho.ms-*
le ho.me-*
. - E reheletsoe bocha
.pl-*
le.pr-*
ho.ps-*
le ho.pe-*
. - E reheletsoe bocha
.text-left
le.text-right
ho.text-start
le ho.text-end
.
- E reheletsoe bocha
-
Ho qhetsolaLi-margins tse nyahamisang tse holofetseng ka ho sa feleng.
-
E kentse sehlopha se secha
.bg-body
bakeng sa ho beha semelo sa 'mele kapele ho<body>
likarolo tse ling. -
E kentse lisebelisoa tse ncha tsa boemo bakeng sa
top
,right
,bottom
, leleft
. Boleng bo kenyeletsa0
,50%
, le100%
bakeng sa thepa ka 'ngoe. -
E kentse lisebelisoa tse ncha
.translate-middle-x
le.translate-middle-y
lits'ebeletso ho lintho tse maemong a holimo kapa tse theohileng bohareng. -
border-width
E kentse lisebelisoa tse ncha . -
Ho qhetsolaE reheletsoe bocha
.text-monospace
ho.font-monospace
. -
Ho qhetsolaE tlositsoe
.text-hide
kaha ke mokhoa oa khale oa ho pata mongolo o sa lokelang ho sebelisoa. -
Lisebelisoa tse ekelitsoeng
.fs-*
bakeng safont-size
lits'ebeletso (ka RFS e lumelletsoe). Tsena li sebelisa sekala se lekanang le lihlooho tsa kamehla tsa HTML (1-6, tse kholo ho isa ho tse nyane), 'me li ka fetoloa ka 'mapa oa Sass. -
Ho qhetsolaLisebelisoa tse
.font-weight-*
rehelletsoeng.fw-*
ka bokhutšoane le ho tsitsa. -
Ho qhetsolaLisebelisoa tse
.font-style-*
rehelletsoeng.fst-*
ka bokhutšoane le ho tsitsa. -
E kentsoe
.d-grid
ho bonts'a lisebelisoa le lisebelisoa tse nchagap
(.gap
) bakeng sa Grid ea CSS le meralo ea flexbox. -
Ho qhetsolaE tlositsoe
.rounded-sm
lerounded-lg
, le ho hlahisa sekala se secha sa lihlopha,.rounded-0
ho.rounded-3
. Sheba #31687 . -
E kentse lisebelisoa tse ncha
line-height
:.lh-1
,.lh-sm
,.lh-base
le.lh-lg
. Bona mona . -
E tsamaisitse
.d-none
ts'ebeliso ho CSS ea rona ho e fa boima bo fetang lisebelisoa tse ling tsa ponts'o. -
Atolosa
.visually-hidden-focusable
mothusi hore le eena a sebetse ka lijaneng, a sebelisa:focus-within
.
Bathusi
-
Ho qhetsola Bathusi ba embed ba arabelang ba rehiloe lebitso la bathusi ba karo-karolelano ba nang le mabitso a macha a lihlopha le boitšoaro bo ntlafetseng, hammoho le phetoho e thusang ea CSS.
- Litlelase li rehelletsoe ka ho feto-fetoha
by
hox
karolo ea likarolo. Ka mohlala,.ratio-16by9
hona joale.ratio-16x9
. - Re tlohetse khetho ea
.embed-responsive-item
'me ea lihlopha bakeng sa khetho e bonolo.ratio > *
. Ha ho sa hlokahala sehlopha, 'me mothusi oa karo-karolelano hona joale o sebetsa le ntho efe kapa efe ea HTML. - '
$embed-responsive-aspect-ratios
Mapa oa Sass o rehelletsoe '$aspect-ratios
me boleng ba ona bo nolofalitsoe ho kenyelletsa lebitso la sehlopha le peresente joalo kakey: value
para. - Mefuta e fapaneng ea CSS e se e entsoe mme e kenyellelitsoe boleng bo bong le bo bong 'mapeng oa Sass. Fetola
--bs-aspect-ratio
feto-fetoha ho.ratio
ho theha karolo efe kapa efe e tloahelehileng .
- Litlelase li rehelletsoe ka ho feto-fetoha
-
Ho qhetsola Lihlopha tsa "Screen reader" joale li se li le litlelase tse "patiloeng ka pono" .
- Fetola faele ea Sass ho tloha
scss/helpers/_screenreaders.scss
hoscss/helpers/_visually-hidden.scss
- E reheletsoe bocha
.sr-only
le.sr-only-focusable
ho.visually-hidden
le.visually-hidden-focusable
- E reha bocha
sr-only()
lesr-only-focusable()
metsoako hovisually-hidden()
levisually-hidden-focusable()
.
- Fetola faele ea Sass ho tloha
-
bootstrap-utilities.css
jwale le bathusi ba rona. Bathusi ha ba sa tlameha ho romelloa ka har'a meaho e tloaelehileng.
JavaScript
-
E theohile ho itšetleha ka jQuery le ho ngola li-plugins bocha hore li be JavaScript e tloaelehileng.
-
Ho qhetsolaLitšobotsi tsa data bakeng sa li-plugins tsohle tsa JavaScript li se li ngotsoe ka mabitso ho thusa ho khetholla tšebetso ea Bootstrap ho batho ba boraro le khoutu ea hau. Ka mohlala, re sebelisa
data-bs-toggle
ho e-na ledata-toggle
. -
Li-plugins tsohle joale li ka amohela khetho ea CSS e le khang ea pele. U ka fetisa karolo ea DOM kapa khetho efe kapa efe e nepahetseng ea CSS ho theha mohlala o mocha oa plugin:
var modal = new bootstrap.Modal('#myModal') var dropdown = new bootstrap.Dropdown('[data-bs-toggle="dropdown"]')
-
popperConfig
e ka fetisoa e le ts'ebetso e amohelang tlhophiso ea kamehla ea Bootstrap ea Popper joalo ka khang, e le hore o ka kopanya tlhophiso ena ea kamehla tseleng ea hau. E sebetsa ho dropdowns, popover, le tooltips. -
Boleng ba kamehla ba tokollo bo
fallbackPlacements
fetotsoe['top', 'right', 'bottom', 'left']
bakeng sa ho beoa hantle ha likarolo tsa Popper. E sebetsa ho dropdowns, popover, le tooltips. -
E tlositsoe underscore ho tsoa mekhoeng e tsitsitseng ea sechaba joalo ka
_getInstance()
→getInstance()
.