Hloov mus rau v5
Taug qab thiab tshuaj xyuas cov kev hloov pauv rau Bootstrap cov ntaub ntawv, cov ntaub ntawv, thiab cov khoom siv los pab koj tsiv teb tsaws ntawm v4 rau v5.
Kev vam meej
- poob jQuery.
- Hloov kho los ntawm Popper v1.x rau Popper v2.x.
- Hloov Libsass nrog Dart Sass raws li peb Sass compiler muab Libsass raug tso tseg.
- Taug kev los ntawm Jekyll mus rau Hugo los tsim peb cov ntaub ntawv
Kev them nyiaj yug browser
- Tso Internet Explorer 10 thiab 11
- Tshem tawm Microsoft Edge <16 (Legacy Edge)
- Tshem tawm Firefox <60
- Tso Safari <12
- Tso iOS Safari <12
- Poob Chrome <60
Cov ntaub ntawv hloov pauv
- Rov tsim kho homepage, docs layout, thiab footer.
- Ntxiv tshiab Parcel phau ntawv qhia .
- Ntxiv Customize seem tshiab , hloov v4's Theming nplooj ntawv , nrog cov ntsiab lus tshiab ntawm Sass, kev xaiv thoob ntiaj teb kev teeb tsa, cov qauv xim, CSS hloov pauv, thiab ntau dua.
- Reorganized tag nrho cov ntaub ntawv nyob rau hauv cov ntaub ntawv tshiab seem , sib cais cov ntsiab lus mus rau hauv ntau tsom cov nplooj ntawv.
- Ib yam li ntawd, hloov kho qhov Layout seem , kom pom cov ntsiab lus ntawm daim phiaj kom meej meej.
- Renamed "Navs" nplooj ntawv txuas mus rau "Navs & Tabs".
- Renamed "Khoom" nplooj ntawv mus rau "Checks & xov tooj cua".
- Redesigned lub navbar thiab ntxiv subnav tshiab kom nws yooj yim dua mus nyob ib ncig ntawm peb cov chaw thiab docs versions.
- Ntxiv cov keyboard shortcut tshiab rau kev tshawb nrhiav teb: Ctrl + /.
Sass
-
Peb tau ditched lub neej ntawd Sass daim ntawv qhia kev sib koom ua ke kom nws yooj yim dua los tshem tawm qhov tsis txaus ntseeg. Nco ntsoov koj tam sim no yuav tsum tau txhais tag nrho cov txiaj ntsig hauv Sass maps zoo li
$theme-colors
. Saib seb yuav ua li cas nrog Sass maps . -
tawgRenamed
color-yiq()
muaj nuj nqi thiab lwm yam hloov mus raucolor-contrast()
raws li nws tsis muaj feem xyuam rau YIQ colorspace. Saib #30168.$yiq-contrasted-threshold
yog renamed$min-contrast-ratio
.$yiq-text-dark
thiab$yiq-text-light
raug hloov npe mus rau$color-contrast-dark
thiab$color-contrast-light
.
-
tawgMedia query mixins parameters tau hloov pauv rau txoj hauv kev zoo dua.
media-breakpoint-down()
siv lub breakpoint nws tus kheej es tsis txhob ntawm lub breakpoint tom ntej (xws li,media-breakpoint-down(lg)
es tsis txhob ntawmmedia-breakpoint-down(md)
lub hom phiaj viewports me dualg
).- Ib yam li ntawd, qhov thib ob parameter nyob rau hauv
media-breakpoint-between()
kuj siv lub breakpoint nws tus kheej es tsis txhob ntawm lub tom ntej no breakpoint (xws li,media-between(sm, lg)
es tsis txhob ntawmmedia-breakpoint-between(sm, md)
lub hom phiaj viewports ntawmsm
thiablg
).
-
tawgTshem tawm cov qauv luam tawm thiab
$enable-print-styles
sib txawv. Cov chav kawm luam tawm tseem nyob ib puag ncig. Saib #28339 . -
tawgPoob
color()
,theme-color()
, thiabgray()
ua haujlwm hauv kev pom zoo ntawm cov hloov pauv. Saib #29083 . -
tawgRenamed
theme-color-level()
muaj nuj nqi raucolor-level()
thiab tam sim no lees txais cov xim uas koj xav tau tsis yog$theme-color
xim xwb. Saib #29083 Saib:color-level()
tom qab ntawd poob rau hauvv5.0.0-alpha3
. -
tawgRenamed
$enable-prefers-reduced-motion-media-query
thiab$enable-pointer-cursor-for-buttons
rau$enable-reduced-motion
thiab$enable-button-pointers
rau brevity. -
tawgTshem tawm cov
bg-gradient-variant()
mixin. Siv cov.bg-gradient
chav kawm ntxiv gradients rau cov ntsiab lus tsis yog cov.bg-gradient-*
chav kawm tsim. -
tawg Tshem tawm cov mixins yav dhau los deprecated:
hover
,hover-focus
,plain-hover-focus
, thiabhover-focus-active
float()
form-control-mixin()
nav-divider()
retina-img()
text-hide()
(tseem tso tseg cov chav kawm siv hluav taws xob cuam tshuam,.text-hide
)visibility()
form-control-focus()
-
tawgRenamed
scale-color()
muaj nuj nqi komshift-color()
tsis txhob muaj kev sib tsoo nrog Sass tus kheej xim scaling muaj nuj nqi. -
box-shadow
mixins tam sim no tso cai raunull
qhov tseem ceeb thiab poobnone
los ntawm ntau qhov kev sib cav. Seej #30394 . -
Cov
border-radius()
mixin tam sim no muaj tus nqi qub.
Xim system
-
Cov xim system uas ua haujlwm nrog
color-level()
thiab$theme-color-interval
raug tshem tawm hauv kev pom zoo ntawm cov xim tshiab. Tag nrholighten()
thiabdarken()
ua haujlwm hauv peb cov codebase yog hloov los ntawmtint-color()
thiabshade-color()
. Cov haujlwm no yuav muab cov xim sib xyaw nrog cov xim dawb lossis xim dub es tsis txhob hloov nws lub teeb los ntawm tus nqi ruaj khov. Qhovshift-color()
yuav tint los yog ntxoov ntxoo xim nyob ntawm seb nws qhov hnyav parameter yog qhov zoo lossis tsis zoo. Saib #30622 kom paub meej ntxiv. -
Ntxiv cov tints tshiab thiab ntxoov ntxoo rau txhua xim, muab cuaj cais xim rau txhua lub hauv paus xim, raws li Sass hloov tshiab.
-
Txhim kho xim zoo sib xws. Bumped xim sib piv ntawm 3: 1 txog 4.5: 1 thiab hloov kho xiav, ntsuab, cyan, thiab liab xim kom ntseeg tau WCAG 2.1 AA qhov sib piv. Kuj hloov peb cov xim sib txawv xim los ntawm
$gray-900
mus rau$black
. -
Txhawm rau txhawb peb cov xim, peb tau ntxiv cov kev cai tshiab
tint-color()
thiabshade-color()
kev ua haujlwm kom sib xyaw peb cov xim kom tsim nyog.
Daim phiaj tshiab
-
Tshiab breakpoint! Ntxiv tshiab
xxl
breakpoint rau1400px
thiab nce. Tsis muaj kev hloov pauv rau tag nrho lwm cov ntsiab lus. -
Txhim kho gutters. Gutters tam sim no nyob rau hauv rems, thiab yog nqaim tshaj v4 (
1.5rem
, los yog hais txog24px
, nqis los ntawm30px
). Qhov no ua rau peb cov kab sib chaws gutters nrog peb cov khoom siv sib txawv.- Ntxiv cov gutter tshiab (
.g-*
,.gx-*
, thiab.gy-*
) tswj kab rov tav / ntsug gutters, kab rov tav gutters, thiab ntsug gutters. - tawgRenamed
.no-gutters
kom.g-0
phim cov khoom siv hluav taws xob tshiab.
- Ntxiv cov gutter tshiab (
-
Cov kab ntawv tsis tau
position: relative
siv lawm, yog li koj yuav tau ntxiv.position-relative
rau qee lub ntsiab lus los kho tus cwj pwm ntawd. -
tawgTso ob peb
.order-*
chav kawm uas feem ntau mus tsis siv. Peb tam sim no tsuas yog muab.order-1
rau.order-5
tawm ntawm lub thawv. -
tawgTso tseg cov
.media
khoom tivthaiv raws li nws tuaj yeem yooj yim replicated nrog cov khoom siv. Saib #28265 thiab nplooj ntawv flex Utilities piv txwv . -
tawg
bootstrap-grid.css
tam sim no tsuas yog sivbox-sizing: border-box
rau kem es tsis txhob rov pib dua lub thawv thoob ntiaj teb-qhov loj me. Li no, peb cov kab sib chaws tuaj yeem siv rau ntau qhov chaw yam tsis muaj kev cuam tshuam. -
$enable-grid-classes
tsis txhob cuam tshuam cov tiam ntawm cov chav kawm ntim ntxiv lawm. Saib #29146. -
Hloov kho cov
make-col
mixin rau lub neej ntawd kom sib npaug kab tsis muaj qhov loj me.
Cov ntsiab lus, Reboot, thiab lwm yam
-
RFS tam sim no tau qhib los ntawm lub neej ntawd. Headings siv cov
font-size()
mixin yuav cia li hloov lawvfont-size
mus rau scale nrog lub viewport. Cov yeeb yam no yav dhau los xaiv-hauv nrog v4. -
tawgOverhauled peb cov duab typography los hloov peb cov kev
$display-*
hloov pauv thiab nrog$display-font-sizes
Sass daim ntawv qhia. Kuj tshem tawm cov kev$display-*-weight
hloov pauv ib leeg rau ib leeg$display-font-weight
thiab khofont-size
s. -
Ntxiv ob lub
.display-*
ntsiab lus tshiab,.display-5
thiab.display-6
. -
Cov kev sib txuas yog underlined los ntawm lub neej ntawd (tsis yog ntawm hover), tshwj tsis yog lawv yog ib feem ntawm cov khoom tshwj xeeb.
-
Rov tsim cov ntxhuav los hloov kho lawv cov qauv thiab rov tsim kho lawv nrog CSS hloov pauv kom tswj tau ntau dua styling.
-
tawgNested tables tsis tau txais cov qauv ntxiv lawm.
-
tawg
.thead-light
thiab.thead-dark
poob rau hauv kev pom zoo ntawm cov.table-*
chav kawm sib txawv uas tuaj yeem siv rau txhua lub ntsiab lus (thead
,tbody
,tfoot
,tr
,th
thiabtd
). -
tawgCov
table-row-variant()
mixin yog renamed rautable-variant()
thiab lees txais tsuas yog 2 tsis:$color
(xim lub npe) thiab$value
(xim code). Cov xim ciam teb thiab cov xim accent tau txiav txim siab raws li qhov sib txawv ntawm lub rooj. -
Split table cell padding variables rau hauv
-y
thiab-x
. -
tawgpoob
.pre-scrollable
hoob kawm. Saib #29135 -
tawg
.text-*
kev siv hluav taws xob tsis ntxiv hover thiab tsom cov xeev rau kev txuas ntxiv lawm..link-*
Cov chav kawm pab siv tau. Saib #29267 -
tawgpoob
.text-justify
hoob kawm. Saib #29793 -
Rov pib lub neej ntawd kab rov tav
padding-left
ntawm<ul>
thiab<ol>
cov ntsiab lus los ntawm browser default40px
rau2rem
. -
Ntxiv
$enable-smooth-scroll
, uas sivscroll-behavior: smooth
thoob ntiaj teb-tsuas yog cov neeg siv thov kom txo cov lus tsa suab los ntawmprefers-reduced-motion
kev nug xov xwm. Saib #31877
RTL
- Kab rov tav kev taw qhia tshwj xeeb sib txawv, cov khoom siv hluav taws xob, thiab cov mixins tau hloov npe los siv cov khoom muaj txiaj ntsig zoo li cov uas pom hauv flexbox layouts-piv txwv li,
start
thiabend
nyob rau hauv lieu ntawmleft
thiabright
.
Cov ntawv
-
Ntxiv cov ntaub ntawv ntab tshiab! Peb tau txhawb nqa Floating labels piv txwv rau kev txhawb nqa daim ntawv. Saib nplooj ntawv Floating tshiab.
-
tawg Consolidated haiv neeg thiab kev cai daim ntawv cov ntsiab lus. Checkboxes, xov tooj cua, xaiv, thiab lwm yam inputs uas muaj haiv neeg thiab kev cai cov chav kawm nyob rau hauv v4 tau muab sau ua ke. Tam sim no ze li ntawm tag nrho peb cov ntsiab lus yog kev cai nkaus xwb, feem ntau tsis tas yuav muaj kev cai HTML.
.custom-check
yog tam sim no.form-check
..custom-check.custom-switch
yog tam sim no.form-check.form-switch
..custom-select
yog tam sim no.form-select
..custom-file
thiab.form-file
tau raug hloov los ntawm kev cai style nyob rau sab saum toj ntawm.form-control
..custom-range
yog tam sim no.form-range
.- Poob haiv neeg
.form-control-file
thiab.form-control-range
.
-
tawgUa tsaug
.input-group-append
thiab.input-group-prepend
. Tam sim no koj tuaj yeem cia li ntxiv cov nyees khawm thiab.input-group-text
raws li cov menyuam yaus ncaj qha ntawm pawg tswv yim. -
Lub vojvoog uas ploj lawm ntev ntawm ciam teb ntawm cov tswv yim pab pawg nrog cov lus qhia txog kev siv tau cov kab mob thaum kawg kho los ntawm kev ntxiv cov
.has-validation
chav kawm ntxiv rau cov pab pawg nrog kev siv tau. -
tawg Tshem tawm cov chav kawm tshwj xeeb layout rau peb cov kab sib chaws. Siv peb daim phiaj thiab cov khoom siv hluav taws xob hloov
.form-group
,.form-row
, lossis.form-inline
. -
tawgDaim ntawv lo tam sim no xav tau
.form-label
. -
tawg
.form-text
tsis tau teeb tsa lawmdisplay
, tso cai rau koj los tsim inline lossis thaiv cov ntawv pab raws li koj xav tau los ntawm kev hloov cov ntsiab lus HTML. -
Validation icons tsis siv rau
<select>
s nrogmultiple
. -
Rearranged qhov chaw Sass cov ntaub ntawv hauv qab
scss/forms/
, suav nrog cov tswv yim pab pawg.
Cheebtsam
- Cov txiaj ntsig sib koom
padding
ua ke rau kev ceeb toom, breadcrumbs, phaib, dropdowns, npe pawg, modals, popovers, thiab cov lus qhia kom ua raws li peb$spacer
qhov sib txawv. Se #30564 .
Accordion
- Ntxiv tshiab accordion tivthaiv .
ceeb toom
-
Cov ntawv ceeb toom tam sim no muaj cov piv txwv nrog cov cim .
-
Tshem tawm cov qauv kev cai rau
<hr>
s hauv txhua qhov kev ceeb toom txij li lawv twb sivcurrentColor
lawm.
Daim paib
-
tawgTso tseg tag nrho
.badge-*
cov chav kawm xim rau cov khoom siv tom qab (piv txwv li, siv.bg-primary
tsis yog.badge-primary
). -
tawgPoob - siv
.badge-pill
lub.rounded-pill
tshuab hluav taws xob hloov pauv. -
tawgTshem tawm hover thiab tsom cov qauv rau
<a>
thiab<button>
cov ntsiab lus. -
Nce default padding rau cov paib ntawm
.25em
/.5em
rau.35em
/.65em
.
Breadcrumbs
-
Simplified lub neej ntawd tsos ntawm breadcrumbs los ntawm kev tshem tawm
padding
,background-color
, thiabborder-radius
. -
Ntxiv CSS cov cuab yeej kev cai tshiab
--bs-breadcrumb-divider
rau kev kho kom yooj yim yam tsis tas yuav rov ua dua CSS.
Khawm
-
tawg Toggle nyees khawm , nrog lub checkboxes lossis xov tooj cua, tsis tas yuav tsum muaj JavaScript thiab muaj cov cim tshiab. Peb tsis tas yuav muaj cov khoom qhwv, ntxiv
.btn-check
rau qhov<input>
, thiab ua ke nrog cov.btn
chav kawm ntawm<label>
. Saib #30650 . Cov ntaub ntawv rau qhov no tau txav los ntawm peb nplooj nyees khawm mus rau ntu Cov Ntawv tshiab. -
tawg Poob
.btn-block
rau kev siv hluav taws xob. Es tsis txhob siv.btn-block
ntawm lub.btn
, qhwv koj cov nyees khawm nrog.d-grid
thiab cov.gap-*
khoom siv rau qhov chaw lawv raws li xav tau. Hloov mus rau cov chav kawm teb kom tswj tau lawv ntau dua. Nyeem cov ntaub ntawv rau qee qhov piv txwv. -
Hloov kho peb
button-variant()
thiabbutton-outline-variant()
mixins los txhawb cov kev txwv ntxiv. -
Hloov kho cov nyees khawm kom ntseeg tau tias muaj qhov sib txawv ntxiv ntawm hover thiab lub xeev nquag.
-
Cov khawm xiam oob qhab tam sim no muaj
pointer-events: none;
.
Daim npav
-
tawgPoob
.card-deck
rau hauv kev txaus siab ntawm peb daim phiaj. Qhwv koj daim npav rau hauv cov chav kawm kab thiab ntxiv ib lub.row-cols-*
thawv rau niam txiv los tsim daim npav daim npav (tab sis muaj kev tswj xyuas ntau dua los ntawm kev sib dhos). -
tawgTso
.card-columns
rau hauv kev pom zoo ntawm Masonry. Saib #28922 . -
tawgHloov lub
.card
accordion raws li ib tug tshiab Accordion tivthaiv .
Carousel
-
Ntxiv cov kev
.carousel-dark
hloov tshiab rau cov ntawv tsaus, tswj, thiab ntsuas (zoo rau cov keeb kwm sib dua). -
Hloov chevron icons rau carousel tswj nrog SVGs tshiab los ntawm Bootstrap Icons .
Kaw khawm
-
tawgRenamed
.close
mus.btn-close
rau ib tug tsawg generic lub npe. -
Kaw cov nyees khawm tam sim no siv ib qho
background-image
(embedded SVG) es tsis yog ib qho×
hauv HTML, tso cai rau kev kho kom yooj yim dua yam tsis tas yuav kov koj cov cim. -
Ntxiv cov kev
.btn-close-white
hloov tshiab uas sivfilter: invert(1)
los ua kom muaj qhov sib txawv siab dua tso tawm cov cim tawm tsam keeb kwm yav dhau los.
Kaw
- Tshem tawm scroll anchoring rau accordions.
Dropdowns
-
Ntxiv cov
.dropdown-menu-dark
hloov tshiab tshiab thiab cov hloov pauv uas cuam tshuam rau ntawm qhov xav tau tsaus nti dropdowns. -
Ntxiv tshiab variable rau
$dropdown-padding-x
. -
Darkened lub dropdown divider rau kev zoo sib xws.
-
tawgTag nrho cov txheej xwm rau lub dropdown yog tam sim no tshwm sim ntawm lub dropdown toggle khawm thiab ces bubbled mus rau lub niam txiv lub caij.
-
Dropdown menus tam sim no muaj tus
data-bs-popper="static"
cwj pwm teeb tsa thaum qhov chaw ntawm lub dropdown zoo li qub thiabdata-bs-popper="none"
thaum dropdown nyob hauv navbar. Qhov no tau ntxiv los ntawm peb cov JavaScript thiab pab peb siv txoj haujlwm kev cai yam tsis muaj kev cuam tshuam nrog Popper qhov chaw. -
tawgPoob
flip
kev xaiv rau dropdown plugin nyob rau hauv txaus siab ntawm haiv neeg Popper configuration. Tam sim no koj tuaj yeem lov tes taw tus cwj pwm flipping los ntawm kev dhau qhov khoob khoob raufallbackPlacements
kev xaiv hauv flip modifier. -
Dropdown menus tam sim no tuaj yeem nyem tau nrog qhov kev
autoClose
xaiv tshiab los tswj tus cwj pwm kaw nws pib . Koj tuaj yeem siv qhov kev xaiv no los lees txais qhov nyem sab hauv lossis sab nraud cov ntawv qhia zaub mov kom nws sib tham sib. -
Dropdowns tam sim no txhawb
.dropdown-item
s qhwv hauv<li>
s.
Jumbotron
- tawgTso tseg cov tshuaj tiv thaiv jumbotron raws li nws tuaj yeem rov ua dua nrog cov khoom siv hluav taws xob. Saib peb tus piv txwv Jumbotron tshiab rau qhov demo.
Sau npe pawg
- Ntxiv tus
.list-group-numbered
hloov kho tshiab rau npe pawg.
Navs and tabs
- Ntxiv cov
null
hloov pauv tshiab raufont-size
,font-weight
,color
, thiab:hover
color
rau.nav-link
chav kawm.
Navbars
- tawgNavbars tam sim no xav tau lub thawv nyob rau hauv (kom yooj yim kom yooj yim sib nrug thiab CSS xav tau).
Offcanvas
- Ntxiv qhov tshiab offcanvas tivthaiv .
Pagination
-
Pagination txuas tam sim no muaj customizable
margin-left
uas yog dynamically sib npaug ntawm txhua lub ces kaum thaum sib cais los ntawm ib leeg. -
Ntxiv
transition
s rau pagination txuas.
Popovers
-
tawgRenamed
.arrow
rau.popover-arrow
hauv peb lub default popover template. -
Renamed
whiteList
kev xaiv rauallowList
.
Spinners
-
Spinners tam sim no hwm
prefers-reduced-motion: reduce
los ntawm qeeb cov animations. Saib #31882 . -
Txhim kho spinner ntsug alignment.
Toasts
-
Cov toasts tam sim no tuaj yeem muab tso rau hauv ib qho
.toast-container
nrog kev pab los ntawm qhov chaw siv hluav taws xob . -
Hloov lub sijhawm toast rau 5 vib nas this.
-
Tshem tawm
overflow: hidden
ntawm toasts thiab hloov nrogborder-radius
s kom zoo nrogcalc()
kev ua haujlwm.
Cov lus qhia
-
tawgRenamed
.arrow
mus rau.tooltip-arrow
hauv peb lub neej ntawd tooltip template. -
tawgLub neej ntawd tus nqi rau qhov
fallbackPlacements
yog hloov mus['top', 'right', 'bottom', 'left']
rau qhov kev tso kawm zoo dua ntawm cov ntsiab lus popper. -
tawgRenamed
whiteList
kev xaiv rauallowList
.
Cov khoom siv
-
tawgHloov npe ntau yam khoom siv los siv cov cuab yeej cuab tam lub npe es tsis txhob siv cov npe qhia nrog ntxiv ntawm RTL kev txhawb nqa:
- Renamed
.left-*
thiab.right-*
mus.start-*
thiab.end-*
. - Renamed
.float-left
thiab.float-right
mus.float-start
thiab.float-end
. - Renamed
.border-left
thiab.border-right
mus.border-start
thiab.border-end
. - Renamed
.rounded-left
thiab.rounded-right
mus.rounded-start
thiab.rounded-end
. - Renamed
.ml-*
thiab.mr-*
mus.ms-*
thiab.me-*
. - Renamed
.pl-*
thiab.pr-*
mus.ps-*
thiab.pe-*
. - Renamed
.text-left
thiab.text-right
mus.text-start
thiab.text-end
.
- Renamed
-
tawgDisabled negative margins los ntawm lub neej ntawd.
-
Ntxiv
.bg-body
chav kawm tshiab kom sai teeb lub<body>
keeb kwm yav dhau rau cov ntsiab lus ntxiv. -
Ntxiv cov khoom siv hluav taws xob tshiab rau
top
,right
,bottom
, thiableft
. Cov nqi suav nrog0
,50%
, thiab100%
rau txhua yam khoom. -
Ntxiv tshiab
.translate-middle-x
&.translate-middle-y
kev siv hluav taws xob rau kab rov tav lossis vertically centre absolute / fixed positioned ntsiab. -
Ntxiv cov
border-width
khoom siv tshiab . -
tawgRenamed
.text-monospace
rau.font-monospace
. -
tawgTshem tawm
.text-hide
vim nws yog ib txoj hauv kev qub rau kev zais cov ntawv uas yuav tsum tsis txhob siv ntxiv lawm. -
Ntxiv
.fs-*
cov nqi hluav taws xob rau kevfont-size
siv hluav taws xob (nrog RFS enabled). Cov no siv tib qhov teev raws li HTML lub ntsiab lus tseem ceeb (1-6, loj rau me), thiab tuaj yeem hloov kho ntawm Sass daim ntawv qhia. -
tawgRenamed
.font-weight-*
utilities raws li.fw-*
brevity thiab sib xws. -
tawgRenamed
.font-style-*
utilities raws li.fst-*
brevity thiab sib xws. -
Ntxiv
.d-grid
rau tso saib cov khoom siv hluav taws xob thiab covgap
khoom siv tshiab (.gap
) rau CSS Grid thiab flexbox layouts. -
tawgTshem tawm
.rounded-sm
thiabrounded-lg
, thiab qhia txog qhov ntsuas tshiab ntawm cov chav kawm,.rounded-0
rau.rounded-3
. Saib #31687 . -
Ntxiv cov
line-height
khoom siv tshiab:.lh-1
,.lh-sm
,.lh-base
thiab.lh-lg
. Saib ntawm no . -
Tsiv cov
.d-none
nqi hluav taws xob hauv peb CSS kom muab nws hnyav dua lwm cov khoom siv hluav taws xob. -
Extended tus
.visually-hidden-focusable
pab los kuj ua hauj lwm ntawm ntim, siv:focus-within
.
Cov pab
-
tawg Cov neeg pab cuam teb tau raug hloov npe rau cov neeg pab cuam nrog cov npe tshiab hauv chav kawm thiab txhim kho tus cwj pwm, nrog rau qhov sib txawv ntawm CSS muaj txiaj ntsig.
- Cov chav kawm tau raug hloov npe hloov
by
mus raux
hauv qhov piv txwv. Piv txwv li,.ratio-16by9
yog tam sim no.ratio-16x9
. - Peb tau tso tseg
.embed-responsive-item
thiab lub ntsiab pawg selector hauv kev pom zoo ntawm tus.ratio > *
xaiv yooj yim dua. Tsis xav tau chav kawm ntxiv, thiab tus pab cuam piv tam sim no ua haujlwm nrog txhua yam HTML. - Daim
$embed-responsive-aspect-ratios
ntawv qhia Sass tau raug hloov npe rau$aspect-ratios
thiab nws cov txiaj ntsig tau yooj yim kom suav nrog cov npe hauv chav kawm thiab feem pua ntawm covkey: value
khub. - CSS variables yog tam sim no tsim thiab suav nrog rau txhua tus nqi hauv Sass daim ntawv qhia. Hloov kho qhov
--bs-aspect-ratio
sib txawv ntawm qhov.ratio
los tsim ib qho kev cai nam piv .
- Cov chav kawm tau raug hloov npe hloov
-
tawg Cov chav kawm "Screen reader" yog tam sim no "visually zais" chav kawm .
- Hloov cov ntaub ntawv Sass los ntawm
scss/helpers/_screenreaders.scss
rauscss/helpers/_visually-hidden.scss
- Renamed
.sr-only
thiab.sr-only-focusable
mus.visually-hidden
thiab.visually-hidden-focusable
- Renamed
sr-only()
thiabsr-only-focusable()
mixins rauvisually-hidden()
thiabvisually-hidden-focusable()
.
- Hloov cov ntaub ntawv Sass los ntawm
-
bootstrap-utilities.css
tam sim no kuj suav nrog peb cov neeg pab. Cov neeg pab tsis tas yuav tsum tau muab tso rau hauv kev cai tsim ntxiv lawm.
JavaScript
-
Tso tseg jQuery kev vam khom thiab rov sau cov plugins kom nyob hauv JavaScript tsis tu ncua.
-
tawgCov ntaub ntawv tus cwj pwm rau tag nrho JavaScript plugins tam sim no muaj npe los pab kom paub qhov txawv ntawm Bootstrap kev ua haujlwm los ntawm peb tog thiab koj tus kheej cov cai. Piv txwv li, peb siv
data-bs-toggle
es tsis txhobdata-toggle
. -
Tag nrho cov plugins tam sim no tuaj yeem lees txais CSS selector ua thawj qhov kev sib cav. Koj tuaj yeem dhau lub ntsiab lus DOM lossis ib qho CSS selector siv tau los tsim ib qho piv txwv tshiab ntawm lub plugin:
var modal = new bootstrap.Modal('#myModal') var dropdown = new bootstrap.Dropdown('[data-bs-toggle="dropdown"]')
-
popperConfig
tuaj yeem dhau los ua txoj haujlwm uas lees txais Bootstrap lub neej ntawd Popper config raws li kev sib cav, yog li koj tuaj yeem sib koom ua ke qhov kev teeb tsa no hauv koj txoj kev. Siv rau dropdowns, popovers, thiab tooltips. -
Tus nqi pib rau qhov
fallbackPlacements
hloov pauv mus['top', 'right', 'bottom', 'left']
rau qhov kev tso kawm zoo dua ntawm Popper ntsiab. Siv rau dropdowns, popovers, thiab tooltips. -
Tshem tawm underscore los ntawm pej xeem zoo li qub txoj kev zoo li
_getInstance()
→getInstance()
.