Kwimukira kuri v4
Bootstrap 4 niyandikwa rikuru ryumushinga wose. Impinduka zigaragara cyane zavunaguye hepfo, hakurikiraho impinduka zihariye kubice bijyanye.
Impinduka zihamye
Kwimuka uva muri Beta 3 ukajya kurekura v4.x ihamye, ntamahinduka ahinduka, ariko hariho impinduka zigaragara.
Gucapa
-
Ibikoresho byavunitse byavunitse. Mbere, gukoresha
.d-print-*
ishuri byateganijwe gutungurana ikindi.d-*
cyiciro. Noneho, bahuza nibindi bikoresho byerekana kandi bagakoresha gusa ibyo bitangazamakuru (@media print
). -
Kwaguka kuboneka byanditse byerekana ibikoresho kugirango bihuze nibindi bikorwa. Beta 3 n'abayirengeje gusa bafite
block
,,,inline-block
nainline
.none
V4 ihamye yongeyehoflex
,,,inline-flex
natable
.table-row
table-cell
-
Icapiro ryibanze ryerekana neza kuri mushakisha hamwe nuburyo bushya bwo gucapa bugaragaza
@page
size
.
Impinduka ya Beta 3
Mugihe Beta 2 yabonye igice kinini cyimpinduka zacu mugihe cya beta, ariko turacyafite bike bikenewe gukemurwa mubisohoka Beta 3. Izi mpinduka zikurikizwa niba urimo kuvugurura Beta 3 kuva Beta 2 cyangwa verisiyo ishaje ya Bootstrap.
Dutandukanye
- Yakuyeho
$thumbnail-transition
impinduka idakoreshwa. Ntacyo twahinduye, kubwibyo byari code yinyongera. - Porogaramu ya npm ntikirimo dosiye iyindi itari isoko yacu na dosiye ya kure; niba wabishingikirije kandi ukoresha inyandiko zacu ukoresheje
node_modules
ububiko, ugomba guhuza ibikorwa byawe.
Ifishi
-
Ongera wandike agasanduku gasanzwe kandi gasanzwe gasanduku na radio. Noneho, byombi bifite imiterere ya HTML (hanze
<div>
hamwe na barumuna<input>
na<label>
) hamwe nuburyo bumwe bwo gutondekanya (gutondekanya bisanzwe, kumurongo hamwe nicyiciro cyo guhindura). Ibi biradufasha gutunganya ikirango gishingiye kumiterere yinjiza, koroshya inkungadisabled
kubiranga (mbere bisaba icyiciro cyababyeyi) no gushyigikira neza ifishi yacu yo kwemeza.Nkigice cyibi, twahinduye CSS yo gucunga
background-image
s nyinshi kumpapuro zabigenewe kugenzura no kumaradiyo. Mbere, ibice byavanyweho noneho.custom-control-indicator
byari bifite ibara ryibara ryibanze, icyiciro, na SVG. Guhindura icyiciro cya gradient bivuze gusimbuza ibyo byose igihe cyose ukeneye guhindura imwe gusa. Noneho, dufite.custom-control-label::before
ibyuzuye na gradient kandi dukora.custom-control-label::after
igishushanyo.Kugirango ukore igenzura ryihariye, ongeraho
.custom-control-inline
. -
Ivugurura ryatoranijwe ryinjiza-rishingiye kuri buto yitsinda. Aho
[data-toggle="buttons"] { }
kugirango imiterere nimyitwarire, dukoreshadata
ikiranga kumyitwarire ya JS gusa kandi twishingikiriza kumurongo mushya.btn-group-toggle
wo kwishushanya. -
Yakuweho
.col-form-legend
kugirango ashyigikire gato.col-form-label
. Ubu buryo.col-form-label-sm
kandi.col-form-label-lg
burashobora gukoreshwa kubintu<legend>
byoroshye. -
Customer dosiye yinjiza yakiriye impinduka kuri
$custom-file-text
Sass variable. Ntabwo ikiri ikarita ya Sass yubatswe kandi ubu iha imbaraga umugozi umwe-Browse
buto nkuko aribwo noneho pseudo-element yonyine ikomoka kuri Sass yacu. InyandikoChoose file
ubu iva kuri.custom-file-label
.
Amatsinda yinjiza
-
Iyinjiza ryitsinda ryinyongera ubu ryihariye kubyo bashyize ugereranije ninjiza. Twataye
.input-group-addon
kandi kumasomo.input-group-btn
abiri mashya,.input-group-prepend
kandi.input-group-append
. Ugomba gukoresha neza umugereka cyangwa prepend ubungubu, koroshya byinshi CSS yacu. Mugereka cyangwa kwitegura, shyira buto yawe nkuko zaba ziri ahandi, ariko uzingire inyandiko.input-group-text
. -
Imiterere yo kwemeza ubu irashyigikiwe, kimwe ninyongeramusaruro nyinshi (nubwo ushobora kwemeza gusa icyinjijwe kuri buri tsinda).
-
Kuringaniza ibyiciro bigomba kuba kubabyeyi
.input-group
ntabwo ari ibintu bigize imiterere.
Beta 2 ihinduka
Mugihe muri beta, tugamije kutagira impinduka zica. Ariko, ibintu ntabwo buri gihe bigenda nkuko byateganijwe. Hano haribintu byahindutse kugirango uzirikane mugihe wimutse uva Beta 1 ujya Beta 2.
Kumena
- Yakuweho
$badge-color
impinduka nikoreshwa ryayo kuri.badge
. Dukoresha ibara ritandukanya imikorere kugirango duhitemocolor
dushingiye kuribackground-color
, bityo impinduka ntabwo ari ngombwa. grayscale()
Imikorere yahinduwegray()
kugirango wirinde guca amakimbirane na CSS kavukiregrayscale
.- Yahinduwe
.table-inverse
,.thead-inverse
na, na.thead-default
,, guhuza ibara ryamabara yakoreshejwe ahandi..*-dark
.*-light
- Imbonerahamwe isubiza noneho ibyara amasomo kuri buri grid break point. Ibi biva kuri Beta 1 muburyo
.table-responsive
wakoresheje ni byinshi.table-responsive-md
. Urashobora noneho gukoresha.table-responsive
cyangwa.table-responsive-{sm,md,lg,xl}
nkuko bikenewe. - Inkunga ya Bower inkunga nkumuyobozi wa pake yataye agaciro kubindi bisobanuro (urugero, Yarn cyangwa npm). Reba bower / bower # 2298 kugirango ubone ibisobanuro.
- Bootstrap iracyasaba jQuery 1.9.1 cyangwa irenga, ariko urasabwa gukoresha verisiyo 3.x kuva mushakisha zishyigikiwe na v3.x nizo Bootstrap ishyigikira wongeyeho v3.x ifite umutekano muke.
- Yakuyeho icyiciro kidakoreshwa
.form-control-label
. Niba warakoresheje iri somo, ryari ryigana.col-form-label
ryishuri ryerekejeje a<label>
hamwe ninjiza ijyanye nuburyo butambitse. - Yahinduye
color-yiq
kuva muri mixin yarimocolor
umutungo kumurimo usubiza agaciro, ukwemerera kuyikoresha kumitungo iyo ari yo yose ya CSS. Kurugero, ahocolor-yiq(#000)
, wandikacolor: color-yiq(#000);
.
Ingingo z'ingenzi
pointer-events
Yerekanye imikoreshereze mishya kuri modal. Inyuma.modal-dialog
inyura mubyabaye hamwepointer-events: none
no gukanda kugikora (bituma bishoboka gutega amatwi gusa kuri.modal-backdrop
kanda iyo ari yo yose), hanyuma ukayirwanya kubyukuri.modal-content
hamwe napointer-events: auto
.
Incamake
Dore ibintu binini byamatike uzashaka kumenya mugihe wimutse uva kuri v3 ujya kuri v4.
Inkunga ya mushakisha
- Yahagaritse inkunga ya IE8, IE9, na iOS 6. v4 ubu ni IE10 + na iOS 7+ gusa. Ku mbuga zikeneye kimwe muri ibyo, koresha v3.
- Wongeyeho inkunga yemewe ya Android v5.0 Browser ya Lollipop na WebView. Ubusanzwe verisiyo ya Android Browser na WebView ikomeza gushyigikirwa gusa.
Impinduka ku isi
- Flexbox ishoboye kubisanzwe. Muri rusange ibi bivuze kwimuka kureremba nibindi byinshi mubice byacu.
- Yahinduwe kuva Hasi Kuri Sass kumasoko ya dosiye ya CSS.
- Yahinduwe kuva
px
nkibicerem
byibanze bya CSS, nubwo pigiseli iracyakoreshwa kubibazo byitangazamakuru hamwe nimyitwarire ya gride nkibikoresho byabigenewe ntabwo bigira ingaruka kubunini bwubwoko. - Imyandikire yisi yose yiyongereye kuva
14px
kuri16px
. - Kuvugurura urwego rwa gride kugirango wongere amahitamo ya gatanu (ubariza ibikoresho bito kuri
576px
no hepfo) hanyuma ukuraho-xs
infix muri ayo masomo. Urugero :.col-6.col-sm-4.col-md-3
. - Gusimbuza insanganyamatsiko itandukanye hamwe nuburyo bugaragara ukoresheje SCSS ihinduka (urugero,
$enable-gradients: true
). - Kubaka sisitemu ivuguruye kugirango ukoreshe urukurikirane rwimyandikire ya npm aho kuba Grunt. Reba
package.json
ibyanditswe byose, cyangwa umushinga wo gusoma kubikorwa bikenewe byiterambere. - Kudakoresha imikoreshereze ya Bootstrap ntigikoreshwa.
- Yahagaritse Customerizer kumurongo kugirango ashyigikire ibyangombwa byinshi byashizweho kandi byubatswe.
- Wongeyeho ibyiciro byinshi byingirakamaro kumasomo rusange ya CSS umutungo-agaciro kamwe hamwe na margin / padding intera ihinnye.
Sisitemu ya sisitemu
- Yimuriwe kuri flexbox.
- Wongeyeho inkunga ya flexbox muri grid ivanga hamwe nibyiciro byateganijwe mbere.
- Nkigice cya flexbox, harimo inkunga ya vertical na horizontal guhuza amasomo.
- Ivugurura rya grid urwego rwamazina na gride nshya.
- Wongeyeho urwego rushya rwa
sm
gride hepfo768px
kugirango ugenzure byinshi. Ubu dufitexs
,,, na .sm
_ Ibi bivuze kandi ko buri cyiciro cyatewe hejuru kurwego rumwe ( muri v3 ubu iri muri v4).md
lg
xl
.col-md-6
.col-lg-6
xs
grid ibyiciro byahinduwe kugirango bidasaba infix kugirango irusheho kwerekana neza ko batangiye gukoresha stil kurimin-width: 0
kandi ntabwo yashizweho pigiseli yagaciro. Aho kugirango.col-xs-6
, ubu.col-6
. Ibindi bikoresho byose bya gride bisaba infix (urugero,sm
).
- Wongeyeho urwego rushya rwa
- Ivugurura rya gride ingano, ivanga, nibihinduka.
- Imiyoboro ya gride ubu ifite ikarita ya Sass kuburyo ushobora kwerekana ubugari bwihariye bwimyanda kuri buri gice.
- Ivugurura rya gride ivanze kugirango ukoreshe
make-col-ready
ibivangwa mbere na amake-col
kugirango ushirehoflex
hamwe nomax-width
kugereranya inkingi. - Sisitemu yahinduwe ya sisitemu itangazamakuru ryibibazo hamwe nubugari bwa kontineri kugirango ubare urwego rushya rwa gride kandi urebe ko inkingi zigabanywa kuburyo
12
bugari. - Imiyoboro ya gride hamwe nubugari bwa kontineri ubu bikoreshwa hifashishijwe ikarita ya Sass (
$grid-breakpoints
na$container-max-widths
) aho kuba intoki zimpinduka zitandukanye. Ibi bisimbuza@screen-*
impinduka zose kandi bikwemerera guhitamo neza urwego rwa gride. - Ibibazo by'itangazamakuru nabyo byarahindutse. Aho gusubiramo itangazamakuru ryibibazo byabajijwe bifite agaciro kamwe buri gihe, ubu dufite
@include media-breakpoint-up/down/only
. Noneho, aho kwandika@media (min-width: @screen-sm-min) { ... }
, urashobora kwandika@include media-breakpoint-up(sm) { ... }
.
Ibigize
- Ikibaho cyamanutse, igikumwe, hamwe niriba kubintu bishya byose bikubiyemo, amakarita .
- Kureka imyandikire ya Glyphicons. Niba ukeneye amashusho, amahitamo amwe ni:
- verisiyo yo hejuru ya Glyphicons
- Octicons
- Imyandikire Itangaje
- Reba Kwagura urupapuro kugirango ubone urutonde rwibindi. Ufite ibindi byifuzo? Nyamuneka fungura ikibazo cyangwa PR.
- Yahagaritse plugin ya Affix jQuery.
- Turasaba gukoresha
position: sticky
aho. Reba HTML5 Nyamuneka andika ibisobanuro birambuye hamwe nibyifuzo bya polyfill. Icyifuzo kimwe ni ugukoresha@supports
itegeko ryo kubishyira mubikorwa (eg,@supports (position: sticky) { ... }
) - Niba wakoresheje Affix kugirango ushyireho inyongera, zidasanzwe
position
, polyfill ntishobora gushyigikira ikibazo cyawe. Uburyo bumwe bwo gukoresha ni isomero rya gatatu ScrollPos-Styler isomero.
- Turasaba gukoresha
- Yataye ibice bya pager nkuko byari bisanzwe byoroheje buto.
- Yasubiwemo hafi ibice byose kugirango akoreshe byinshi bitatoranijwe byabatoranijwe aho guhitamo abana batoranijwe.
Kubigize
Uru rutonde rugaragaza impinduka zingenzi mubice hagati ya v3.xx na v4.0.0.
Ongera usubiremo
Agashya kuri Bootstrap 4 ni Reboot , urupapuro rushya rwubaka kuri Normalize hamwe nuburyo bumwe bwo gutekereza gusubiramo uburyo. Abahitamo kugaragara muri iyi dosiye bakoresha gusa ibintu-hano nta masomo hano. Ibi bitandukanya ibyasubiwemo muburyo bwimiterere yuburyo bugaragara. Bimwe mubyingenzi byingenzi gusubiramo ibi birimo impinduka, kwimuka box-sizing: border-box
uva mubice byinshi, guhuza imiterere, hamwe nibintu byinshi bigarura.em
rem
Imyandikire
- Yimuye
.text-
ibikorwa byose kuri_utilities.scss
dosiye. - Yataye
.page-header
nkuburyo bwayo irashobora gukoreshwa hakoreshejwe ibikorwa. .dl-horizontal
Yashizwe. Ahubwo, koresha kandi.row
ukoreshe<dl>
gride inkingi (cyangwa ivanga) kuri<dt>
hamwe<dd>
nabana.- Kuvugurura ibibujijwe, kwimura uburyo bwabo kuva
<blockquote>
mubintu kugera kumurongo umwe ,.blockquote
. Yahinduye.blockquote-reverse
modifier kubikorwa byingirakamaro. .list-inline
ubu birasaba ko abana bayo batondekanya ibintu bafite.list-inline-item
icyiciro gishya babakoresheje.
Amashusho
- Yahinduwe
.img-responsive
kuri.img-fluid
. - Yahinduwe
.img-rounded
kuri.rounded
- Yahinduwe
.img-circle
kuri.rounded-circle
Imbonerahamwe
- Hafi yingero zose
>
zabatoranije zavanyweho, bivuze ko ameza yatondekanye azahita azungura imiterere kubabyeyi babo. Ibi byoroshya cyane abaduhitamo hamwe nibishobora guhinduka. - Yahinduwe
.table-condensed
kugirango ahamye.table-sm
. - Wongeyeho uburyo bushya
.table-inverse
. - Wongeyeho imbonerahamwe yumutwe uhindura:
.thead-default
na.thead-inverse
. - Yahinduwe ibyiciro byamasomo kugirango agire
.table-
-ibisobanuro. Kubwibyo.active
,,, na Kuri ,,, na ..success
_.warning
_ _ _.danger
.info
.table-active
.table-success
.table-warning
.table-danger
.table-info
Ifishi
- Ikintu cyimuwe gisubira muri
_reboot.scss
dosiye. - Yahinduwe
.control-label
kuri.col-form-label
. - Yahinduwe
.input-lg
kandi.input-sm
kuri.form-control-lg
na.form-control-sm
. - Kureka
.form-group-*
amasomo kubworoshye. Koresha.form-control-*
amasomo aho nonaha. - Yataye
.help-block
kandi ayisimbuza na.form-text
block-urwego rwo gufasha inyandiko. Kuri inline ifasha inyandiko nubundi buryo bworoshye, koresha amasomo yingirakamaro nka.text-muted
. - Yataye
.radio-inline
kandi.checkbox-inline
. - Guhuriza
.checkbox
hamwe no.radio
mubyiciro.form-check
bitandukanye.form-check-*
. - Ifishi ya horizontal yaravuguruwe:
- Yahagaritse
.form-horizontal
icyiciro gisabwa. .form-group
ntagikoreshwa muburyo buvuye.row
kuri mixin,.row
ubu rero birasabwa kuri horizontal grid imiterere (urugero,<div class="form-group row">
).- Wongeyeho ibyiciro bishya
.col-form-label
kumurongo uhagaze hamwe na.form-control
s. - Wongeyeho shyashya
.form-row
kumpapuro zifatika hamwe na gride ya gride (swap yawe.row
kuri a.form-row
hanyuma ugende).
- Yahagaritse
- Wongeyeho ifishi yihariye ifasha (kubisanduku, amaradiyo, guhitamo, hamwe ninjiza ya dosiye).
- Byasimbuwe
.has-error
,.has-warning
hamwe.has-success
namasomo hamwe na HTML5 ifishi yemewe binyuze muri CSS:invalid
na:valid
pseudo-masomo. - Yahinduwe
.form-control-static
kuri.form-control-plaintext
.
Utubuto
- Yahinduwe
.btn-default
kuri.btn-secondary
. - Kureka
.btn-xs
icyiciro rwose nkuko.btn-sm
bigereranijwe ni bito cyane kuruta v3. - Akabuto ka leta karanga
button.js
plugin ya jQuery yamanuwe. Ibi birimo$().button(string)
uburyo$().button('reset')
. Turagira inama yo gukoresha akantu gato ka JavaScript yihariye aho, izaba ifite inyungu zo kwitwara neza nkuko ubishaka.- Menya ko ibindi biranga plugin (buto yo kugenzura agasanduku, amaradiyo ya buto, buto imwe yo guhinduranya) yagumishijwe muri v4.
- Hindura buto '
[disabled]
kuri:disabled
nkuko IE9 + ishyigikira:disabled
. Icyakorafieldset[disabled]
biracyakenewe kuberako imirima yabamugaye iracyari buggy muri IE11 .
Itsinda rya buto
- Ongera wandike ibice hamwe na flexbox.
- Yakuweho
.btn-group-justified
. Nkumusimbura urashobora gukoresha<div class="btn-group d-flex" role="group"></div>
nkigipfunyika hafi yibintu hamwe.w-100
. - Kureka
.btn-group-xs
icyiciro rwose cyatanzwe cyo gukuraho.btn-xs
. - Yakuweho umwanya utomoye hagati yitsinda rya buto muri buto yububiko; koresha margin utanga ubu.
- Kunoza inyandiko zo gukoresha hamwe nibindi bice.
Ibitonyanga
- Yahinduwe mubabyeyi batoranya mubyiciro byihariye kubice byose, abahindura, nibindi.
- Uburyo bworoshye bwo kumanura uburyo bwo kutongera kohereza hamwe hejuru cyangwa hepfo harebwa imyambi ifatanye na menu yamanutse.
- Ibitonyanga birashobora kubakwa hamwe na
<div>
s cyangwa<ul>
s ubungubu. - Kongera kubaka uburyo bwo kumanura no gushiraho kugirango utange byoroshye, byubatswe mubufasha kubintu
<a>
bishingiye<button>
kumanuka. - Yahinduwe
.divider
kuri.dropdown-divider
. - Ibintu bitonyanga ubu birasaba
.dropdown-item
. - Kumanura ibitonyanga ntibigisaba neza
<span class="caret"></span>
; ubu itangwa mu buryo bwikora binyuze kuri CSS::after
kuri.dropdown-toggle
.
Sisitemu ya sisitemu
576px
Wongeyeho urusobekerane rushya nkasm
, bivuze ko ubu hari ibice bitanu byose (xs
,,, nasm
, ) .md
lg
xl
- Hindura izina rya gride ihindura ibyiciro kuva
.col-{breakpoint}-{modifier}-{size}
kumurongo.{modifier}-{breakpoint}-{size}
woroshye wa gride. - Kureka gusunika no gukurura ibyiciro byahinduye amasomo mashya ya flexbox
order
. Kurugero, aho kugirango.col-8.push-4
na.col-4.pull-8
, wakoresha.col-8.order-2
na.col-4.order-1
. - Wongeyeho flexbox yingirakamaro ibyiciro bya gride sisitemu nibigize.
Andika amatsinda
- Ongera wandike ibice hamwe na flexbox.
- Byasimbuwe
a.list-group-item
nicyiciro gisobanutse.list-group-item-action
,, kuri styling ihuza na buto verisiyo yurutonde rwibintu. - Wongeyeho
.list-group-flush
icyiciro cyo gukoresha hamwe namakarita.
Modal
- Ongera wandike ibice hamwe na flexbox.
- Urebye kwimuka kuri flexbox, guhuza ibishushanyo byo kwirukana mumutwe birashoboka ko byacitse kuko tutagikoresha kureremba. Ibirimo bireremba biza mbere, ariko hamwe na flexbox itakibaho. Kuvugurura amashusho yawe yo kwirukana kugirango aze nyuma yimitwe yuburyo bwo gukosora.
- Ihitamo
remote
(rishobora gukoreshwa mu guhita ryikorera no gutera inshinge zo hanze muburyo) hanyumaloaded.bs.modal
ibyabaye bikurwaho. Turasaba ahubwo gukoresha abakiriya kuruhande rwicyitegererezo cyangwa guhuza amakuru, cyangwa guhamagara jQuery.wikore wenyine.
Navs
- Ongera wandike ibice hamwe na flexbox.
- Yahagaritse hafi yabatoranije bose
>
kugirango borohereze imyandikire binyuze mumashuri adashizwe. - Aho kugirango HTML yihariye itoranya nka
.nav > li > a
, dukoresha ibyiciro bitandukanye kuri.nav
s,.nav-item
s, na.nav-link
s. Ibi bituma HTML yawe ihinduka mugihe uzana kwaguka kwagutse.
Navbar
Navbar yongeye kwandikwa rwose muri flexbox hamwe niterambere ryiza ryo guhuza, kwitabira, no kwihindura.
- Imyitwarire ya navbar isubiza noneho ikoreshwa
.navbar
mubyiciro ukoresheje ibisabwa.navbar-expand-{breakpoint}
aho uhisemo aho gusenyera navbar. Mbere ibi byari bike byahinduwe kandi bisabwa gusubiramo. .navbar-default
ni ubu.navbar-light
, nubwo.navbar-dark
bikomeza kuba bimwe. Kimwe muri ibyo kirakenewe kuri buri navbar. Ariko, aya masomo ntagishyirahobackground-color
s; ahubwo bigira ingaruka gusacolor
.- Navbars ubu isaba imenyekanisha ryibanze ryubwoko runaka. Hitamo kuva mubikorwa byacu byingenzi (
.bg-*
) cyangwa ushireho ibyawe hamwe nurumuri / inverse ibyiciro hejuru kugirango ube umusazi . - Uhaye imiterere ya flexbox, navbars irashobora gukoresha flexbox yingirakamaro kuburyo bworoshye bwo guhuza.
.navbar-toggle
ni ubu.navbar-toggler
kandi ifite uburyo butandukanye nibimenyetso byimbere (ntakindi bitatu<span>
s).- Yahagaritse
.navbar-form
ishuri rwose. Ntibikiri ngombwa; Ahubwo, koresha gusa.form-inline
kandi ushyire mubikorwa ibikorwa bikenewe. - Navbars ntikirimo
margin-bottom
cyangwaborder-radius
kubisanzwe. Koresha ibikorwa nkibikenewe. - Ingero zose zirimo navbars zaravuguruwe kugirango zishyiremo ibimenyetso bishya.
Pagination
- Ongera wandike ibice hamwe na flexbox.
- Ibyiciro bisobanutse (
.page-item
,.page-link
) ubu birasabwa kubakomoka kuri.pagination
s - Kureka
.pager
ibice byose kuko byari bike kurenza urutonde rwabigenewe.
Imitsima
- Icyiciro gisobanutse ,,
.breadcrumb-item
ubu kirasabwa kubakomoka kuri.breadcrumb
s
Ibirango na badge
- Guhuriza
.label
hamwe.badge
no gutandukanya ibintu<label>
no koroshya ibice bifitanye isano. - Wongeyeho
.badge-pill
nka modifier kugirango uzenguruke "ibinini" reba. - Ibirango ntibikiri kureremba byikora mumatsinda yurutonde nibindi bice. Ibyiciro byingirakamaro birasabwa kubwibyo.
.badge-default
yajugunywe kandi.badge-secondary
yongeweho guhuza ibice bihindura ibyiciro byakoreshejwe ahandi.
Ikibaho, igikumwe, n'amariba
Yataye rwose kubintu bishya bigize ikarita.
Ikibaho
.panel
Kuri.card
, ubu yubatswe na flexbox..panel-default
yakuweho kandi nta wasimbuye..panel-group
yakuweho kandi nta wasimbuye..card-group
ntabwo ari umusimbura, biratandukanye..panel-heading
Kuri.card-header
.panel-title
Kuri.card-title
. Ukurikije isura yifuzwa, urashobora kandi gushaka gukoresha imitwe cyangwa amasomo (urugero<h3>
,.h3
) cyangwa ibintu bitangaje cyangwa amasomo (urugero<strong>
, )<b>
..font-weight-bold
Menya ko.card-title
, nubwo bisa nkaho, bitanga isura itandukanye na.panel-title
..panel-body
Kuri.card-body
.panel-footer
Kuri.card-footer
.panel-primary
,,, kandi.panel-success
, byajugunywe kuri , hamwe nibikorwa byaturutse ku ikarita yacu ya Sass..panel-info
.panel-warning
.panel-danger
.bg-
.text-
.border
$theme-colors
Iterambere
- Gusimbuza
.progress-bar-*
ibyiciro byibanze hamwe.bg-*
nibikorwa byingirakamaro. Kurugero,class="progress-bar progress-bar-danger"
bihindukaclass="progress-bar bg-danger"
. - Byasimbuwe
.active
kuri animasiyo yiterambere.progress-bar-animated
.
Carousel
- Kuvugurura ibice byose kugirango byoroshe gushushanya no gutunganya. Dufite uburyo buke kuri wewe kugirango urengere, ibipimo bishya, nibishusho bishya.
- CSS yose yarashizwemo kandi ihindurwamo izina, yemeza ko buri cyiciro cyashyizwe hamwe
.carousel-
.- Kubintu bya karuseli ,,, na
.next
, ubu ,,, na ..prev
.left
.right
.carousel-item-next
.carousel-item-prev
.carousel-item-left
.carousel-item-right
.item
ni na none.carousel-item
.- Kuri prev / ubutaha igenzura,
.carousel-control.right
kandi.carousel-control.left
nubu.carousel-control-next
kandi.carousel-control-prev
, bivuze ko batagikeneye urwego rwibanze.
- Kubintu bya karuseli ,,, na
- Yakuyeho imyandikire yose yitabiriwe, yerekeza kubikorwa byingirakamaro (urugero, kwerekana ibisobanuro kuri bimwe mubireba) hamwe nuburyo bwihariye nkuko bikenewe.
- Ishusho yakuweho irengereye amashusho mubintu bya karuseli, byerekeza kubikorwa byingirakamaro.
- Tweaked urugero rwa Carousel kugirango ushiremo ibimenyetso bishya nuburyo.
Imbonerahamwe
- Inkunga yakuweho kumeza yubatswe. Imiterere yimbonerahamwe yose yarazwe muri v4 kubahitamo byoroshye.
- Wongeyeho imbonerahamwe ihindagurika.
Ibikorwa
- Erekana, uhishe, nibindi byinshi:
- Yakozwe yerekana ibikorwa byingirakamaro (urugero,
.d-none
nad-{sm,md,lg,xl}-none
). - Yataye igice kinini cyibikorwa
.hidden-*
byingirakamaro . Kurugero, aho kugirango , koresha . Yahinduye ibikorwa byingirakamaro kugirango ukoreshe kwerekana ibikorwa byo kwita izina gahunda. Ibisobanuro byinshi munsi yingirakamaro yibikorwa byuru rupapuro..hidden-sm-up
.d-sm-none
.hidden-print
- Wongeyeho
.float-{sm,md,lg,xl}-{left,right,none}
amasomo yo kureremba kureremba no gukurwaho.pull-left
kandi.pull-right
kuva arenze kuri.float-left
na.float-right
.
- Yakozwe yerekana ibikorwa byingirakamaro (urugero,
- Ubwoko:
- Wongeyeho ibisubizo byitondewe mubyiciro byacu byo guhuza inyandiko
.text-{sm,md,lg,xl}-{left,center,right}
.
- Wongeyeho ibisubizo byitondewe mubyiciro byacu byo guhuza inyandiko
- Guhuza no gutandukanya:
- Wongeyeho marge nshya yitabirwa hamwe na padding yingirakamaro kumpande zose, wongeyeho vertical na horizontal shorthands.
- Wongeyeho ubwato bwibikoresho bya flexbox .
- Yataye icyiciro
.center-block
gishya.mx-auto
.
- Clearfix ivugururwa kugirango igabanye inkunga ya verisiyo ishaje.
Abacuruzi prefix ivanze
Bootstrap 3 y'abacuruzi prefix ivanze, yataye agaciro muri v3.2.0, yavanyweho muri Bootstrap 4. Kuva dukoresha Autoprefixer , ntibikiri ngombwa.
Yakuyeho imvange zikurikira : animation
,,,,,,,,,,,,,,,,,,,,,,, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _animation-delay
animation-direction
animation-duration
animation-fill-mode
animation-iteration-count
animation-name
animation-timing-function
backface-visibility
box-sizing
content-columns
hyphens
opacity
perspective
perspective-origin
rotate
rotateX
rotateY
scale
scaleX
scaleY
skew
transform-origin
transition-delay
transition-duration
transition-property
transition-timing-function
transition-transform
translate
translate3d
user-select
Inyandiko
Inyandiko zacu zabonye kuzamurwa hejuru yubuyobozi. Dore hasi hasi:
- Turacyakoresha Jekyll, ariko dufite plugins muruvange:
bugify.rb
ikoreshwa mugutondekanya neza ibyanditswe kurupapuro rwacu rwa mushakisha .example.rb
ni igikoresho cyihariye cyahighlight.rb
plugin isanzwe, yemerera byoroshye urugero-code ikora.callout.rb
ni imigenzo isa nayo, ariko yagenewe abadasanzwe bahamagaye.- jekyll-toc ikoreshwa mukubyara imbonerahamwe yibirimo.
- Ibirimo byose bya doc byongeye kwandikwa muri Markdown (aho kuba HTML) kugirango byoroshye guhinduka.
- Urupapuro rwongeye kuvugururwa kubintu byoroshye kandi byegereye urwego.
- Twavuye muri CSS isanzwe tujya muri SCSS kugirango dukoreshe byuzuye impinduka za Bootstrap, ivanga, nibindi byinshi.
Ibikorwa byingirakamaro
Impinduka zose @screen-
zavanyweho muri v4.0.0. Koresha ivanga media-breakpoint-up()
,, media-breakpoint-down()
cyangwa media-breakpoint-only()
Sass ivanze cyangwa $grid-breakpoints
ikarita ya Sass aho.
Ibyiciro byingirakamaro byamasomo byavanyweho ahanini kugirango dushyigikire display
ibikorwa byingirakamaro.
- Amasomo yakuweho kuko bivuguruzanya
.hidden
nuburyo bwa jQuery . Ahubwo, gerageza uhindure ikiranga cyangwa ukoreshe inline stil nka na ..show
$(...).hide()
$(...).show()
[hidden]
style="display: none;"
style="display: block;"
- Ibyiciro byose
.hidden-
byavanyweho, uzigame kubikorwa byanditse byahinduwe.- Yakuwe kuri v3:
.hidden-xs
.hidden-sm
.hidden-md
.hidden-lg
.visible-xs-block
.visible-xs-inline
.visible-xs-inline-block
.visible-sm-block
.visible-sm-inline
.visible-sm-inline-block
.visible-md-block
.visible-md-inline
.visible-md-inline-block
.visible-lg-block
.visible-lg-inline
.visible-lg-inline-block
- Yakuwe kuri v4 gushimangira:
.hidden-xs-up
.hidden-xs-down
.hidden-sm-up
.hidden-sm-down
.hidden-md-up
.hidden-md-down
.hidden-lg-up
.hidden-lg-down
- Yakuwe kuri v3:
- Gusohora ibikoresho bitagikoreshwa na
.hidden-
cyangwa.visible-
, ariko hamwe.d-print-
.- Amazina ashaje :
.visible-print-block
,,,.visible-print-inline
.visible-print-inline-block
.hidden-print
- Ibyiciro bishya :
.d-print-block
,,,.d-print-inline
.d-print-inline-block
.d-print-none
- Amazina ashaje :
Aho gukoresha .visible-*
amasomo asobanutse, ukora ikintu kigaragara nukutabihisha kuri bunini bwa ecran. Urashobora guhuza .d-*-none
icyiciro kimwe nicyiciro kimwe .d-*-block
kugirango werekane ikintu gusa intera yatanzwe yubunini bwa ecran (urugero .d-none.d-md-block.d-xl-none
yerekana ikintu gusa kubikoresho biciriritse kandi binini).
Menya ko impinduka kuri gride yacitse muri v4 bivuze ko uzakenera kujya kumurongo umwe munini kugirango ugere kubisubizo bimwe. Ibyiciro bishya byingirakamaro byingirakamaro ntibigerageza kwakira imanza zidasanzwe aho ikintu kigaragara kidashobora kugaragazwa nkurwego rumwe ruhuza ibipimo byerekana; uzakenera ahubwo gukoresha CSS yihariye mubihe nkibi.