Kutamira kune v4
Bootstrap 4 ndeyekunyorazve kukuru kweprojekti yese. Shanduko dzinonyanya kukosha dzakapfupikiswa pazasi, dzichiteverwa neshanduko dzakanyanya kune zvakakosha zvikamu.
Kufamba kubva kuBeta 3 kuenda kune yedu yakagadzika v4.0 kuburitswa, hapana kutyora shanduko, asi kune dzimwe shanduko dzinozivikanwa.
-
Yakagadziriswa yakaputsika print utilities. Pakutanga, kushandisa
.d-print-*
kirasi kwaizokunda zvisingatarisirwi chero imwe.d-*
kirasi. Ikozvino, ivo vanofananidza nezvimwe zvedu zvekuratidzira zvinoshandiswa uye zvinongoshanda kune iyo midhiya (@media print
). -
Yakawedzera dhinda yekuratidza zvishandiso kuti ienderane nezvimwe zvinoshandiswa. Beta 3 uye vakuru vaingove ne
block
,,,,inline-block
uye . Yakagadzikana v4 yakawedzerwa , , , , uye .inline
none
flex
inline-flex
table
table-row
table-cell
-
Fixed print preview inopa mukati mebrowser nemataera matsva anotsanangura
@page
size
.
Nepo Beta 2 yakaona kuwanda kwekuchinja kwedu panguva yebeta, asi tichine mashoma aifanira kugadziriswa mukuburitswa kweBeta 3. Idzi shanduko dzinoshanda kana iwe uchigadziridza kuBeta 3 kubva kuBeta 2 kana chero yekare vhezheni yeBootstrap.
- Yakabvisa vhezheni isina
$thumbnail-transition
kushandiswa. Hatina chataishandura, saka yaingova kodhi yekuwedzera. - Iyo npm package haichasanganisi chero mafaera kunze kwedu kwakabva uye dist mafaera; kana iwe waivimba navo uye uchimhanyisa zvinyorwa zvedu kuburikidza
node_modules
neforodha, unofanirwa kugadzirisa mafambiro ako.
-
Nyora patsva mabhokisi ekutarisa uye ekare uye maredhiyo. Ikozvino, ese ari maviri ane inofananidzwa HTML chimiro (yekunze
<div>
nemunun'una<input>
uye<label>
) uye akafanana masitaera masitaera (akaturikidzana default, inline nemodhifi kirasi). Izvi zvinotitendera kuti titarise iyo label zvichienderana nemamiriro ekuisa, kurerutsa rutsigirodisabled
rwehunhu (yaimboda kirasi yevabereki) uye zvirinani kutsigira fomu redu rekusimbisa.Sechikamu cheizvi, takashandura iyo CSS yekubata akawanda
background-image
s pane tsika fomu cheki mabhokisi nemaredhiyo. Pakutanga,.custom-control-indicator
chinhu chabviswa ikozvino chaive neruvara rwekumashure, gradient, uye SVG icon. Kugadzirisa iyo yekumashure gradient kwaireva kutsiva ese aya pese pawaida kuchinja imwe chete. Iye zvino, isu tine.custom-control-label::before
yekuzadza uye gradient uye.custom-control-label::after
inobata iyo icon.Kuti uite cheki cheki mukati, wedzera
.custom-control-inline
. -
Sarudzo yakagadziridzwa yezvikwata zvemabhatani. Panzvimbo
[data-toggle="buttons"] { }
pemaitiro nemafambiro, isu tinoshandisadata
hunhu chete kune JS maitiro uye tinovimba.btn-group-toggle
nekirasi nyowani yekutaera. -
Yakabviswa
.col-form-legend
ichifarira yakavandudzwa zvishoma.col-form-label
. Iyi nzira.col-form-label-sm
uye.col-form-label-lg
inogona kushandiswa pazvinhu<legend>
zviri nyore. -
Tsika faira mamepu akagamuchira shanduko kune yavo
$custom-file-text
Sass kusiyanisa. Haisisiri mepu yeSass yakagara uye ikozvino inongopa tambo imwe chete-Browse
bhatani sezvo ndiyo chete pseudo-element yakagadzirwa kubva kuSass yedu. ChinyorwaChoose file
zvino chabva ku.custom-file-label
.
-
Input group addons vava chaivo pakuiswa kwavo maererano nekuisa. Isu tadonha
.input-group-addon
uye.input-group-btn
kune maviri makirasi matsva,.input-group-prepend
uye.input-group-append
. Iwe unofanirwa kunyatso shandisa append kana prepend ikozvino, kurerutsa yakawanda yeCSS yedu. Mukati me append kana prepend, isa mabhatani ako sezvaangave aripo kumwe kunhu, asi peta mavara mu.input-group-text
. -
Zvitaera zvekusimbisa zvave kutsigirwa, sezvakaita akawanda mapindiro (kunyangwe uchikwanisa kugonesa imwe chete yekupinda paboka).
-
Sizing makirasi anofanirwa kunge ari pamubereki
.input-group
uye kwete chimiro chemunhu.
Tichiri mubeta, tinovavarira kusatyora shanduko. Zvisinei, zvinhu hazviiti nguva dzose sezvazvakarongwa. Pazasi pane shanduko dzinotyora dzekufunga kana uchifamba kubva kuBeta 1 kuenda kuBeta 2.
- Yakabviswa
$badge-color
musiyano uye kushandiswa kwayo pa.badge
. Isu tinoshandisa ruvara rwekusiyanisa basa kusarudzacolor
zvichienderana neiyobackground-color
, saka shanduko haina basa. - Rakapihwa zita rekuti
grayscale()
kudziviriragray()
kutyora kusawirirana neCSS yemunograyscale
sefa. - Yakatumidzwazve
.table-inverse
,.thead-inverse
, uye.thead-default
ku.*-dark
uye.*-light
, inoenderana nemavara edu emavara anoshandiswa kumwewo. - Matafura anopindura zvino anogadzira makirasi kune yega yega grid breakpoint. Izvi zvinotyora kubva kuBeta 1 pakuti iyo
.table-responsive
yawave uchishandisa yakafanana.table-responsive-md
. Iwe unogona ikozvino kushandisa.table-responsive
kana.table-responsive-{sm,md,lg,xl}
sezvinodiwa. - Yakadonhedzwa Bower tsigiro sepakeji maneja akaregwa kune dzimwe nzira (semuenzaniso, Yarn kana npm). Ona bower/bower#2298 yeruzivo .
- Bootstrap ichiri kuda jQuery 1.9.1 kana kupfuura, asi unorayirwa kushandisa shanduro 3.x sezvo v3.x inotsigirwa nemabhurawuza ari iwo anotsigira Bootstrap plus v3.x ine zvimwe zvigadziriso zvekuchengetedza.
- Yakabviswa
.form-control-label
kirasi isina kushandiswa. Kana iwe wakashandisa kirasi iyi, yaive yakapetwa.col-form-label
yekirasi iyo yakamira pakati nepakati<label>
neiyo inosanganisirwa yekupinda mumarongerwo emafomu akachinjika. - Yakashandura iyo
color-yiq
kubva mumixin yaisanganisira chivakwacolor
kuita basa rinodzosa kukosha, zvichikubvumidza kuti uishandise kune chero CSS pfuma. Semuenzaniso, pane kuticolor-yiq(#000)
, iwe unonyoracolor: color-yiq(#000);
.
- Yakaunza kushandiswa kutsva
pointer-events
pa modals. Iyo yekunze.modal-dialog
inopfuura nemuzviitiko zvinepointer-events: none
tsika yekudzvanya kubata (zvichiita kuti zvikwanisike kungoteerera pane.modal-backdrop
chero kudzvanya), uye zvino kupesana nazvo kune chaiyo.modal-content
nepointer-events: auto
.
Hezvino zvinhu zvihombe zvetikiti zvauchazoda kuziva kana uchifamba kubva kuv3 kuenda kuv4.
- Yakadonhedza IE8, IE9, uye iOS 6 rutsigiro. v4 ikozvino inongova IE10+ uye iOS 7+. Kune masaiti anoda imwe yeaya, shandisa v3.
- Yakawedzerwa pamutemo rutsigiro rweAndroid v5.0 Lollipop's Browser uye WebView. Ekare mavhezheni eiyo Android Browser uye WebView anoramba achingotsigirwa zvisiri pamutemo.
- Flexbox inogoneswa nekusarudzika. Kazhinji izvi zvinoreva kusuduruka kubva kune zvinoyangarara uye nezvimwe muzvikamu zvedu.
- Yakachinja kubva paPass kuenda kuSass kune yedu source CSS mafaera.
- Yakachinjika kubva
px
kunerem
yedu yekutanga CSS unit, kunyange mapikseli achiri kushandiswa kumibvunzo midhiya uye maitiro egidhi sezvo mudziyo wekuona zviteshi haukanganiswe nemhando yemhando. - Saizi yepasi rose yakawedzera kubva
14px
pa16px
. - Yakagadziridzwa gidhi tiers kuti uwedzere yechishanu sarudzo (kutarisana nemidziyo midiki kuzasi
576px
uye pazasi) uye kubvisa iyo-xs
infix kubva kumakirasi iwayo. Muenzaniso.col-6.col-sm-4.col-md-3
:. - Yakatsiva iyo yakasarudzika sarudzo dingindira nezvinogadziriswa sarudzo kuburikidza neSCSS zvinosiyana (semuenzaniso,
$enable-gradients: true
). - Vaka sisitimu yakadzokororwa kuti ushandise akatevedzana npm zvinyorwa pachinzvimbo cheGrunt. Ona
package.json
zvinyorwa zvese, kana purojekiti yedu kuverenga kune zvinodiwa munharaunda. - Kusadaira kushandiswa kweBootstrap hakuchatsigirwi.
- Yakadonhedza online Customizer ichifarira mamwe akawedzera kuseta zvinyorwa uye akagadziridzwa anovaka.
- Yakawedzera gumi nemaviri emakirasi matsva ekushandisa kune akajairwa CSS pfuma-value peya uye margin/padding spacing mapfupi.
- Yakaendeswa kune flexbox.
- Yakawedzera rutsigiro rweflexbox mune grid musanganiswa uye makirasi akafanotsanangurwa.
- Sechikamu cheflexbox, yaisanganisira rutsigiro rwemakirasi akatwasuka uye akachinjika ekumisikidza.
- Yakagadziridzwa makirasi egidhi mazita uye itsva grid tier.
- Yakawedzera gidhi nyowani
sm
pazasi768px
kune mamwe granular control. Iye zvino tinexs
,sm
,md
,lg
, uyexl
. Izvi zvinoreva zvakare kuti tier yega yega yakakwidzwa nhanho imwe (saka.col-md-6
muv3 yave.col-lg-6
muv4). xs
makirasi egidhi akagadziridzwa kuti asade iyo infix kuti inyatso kumiririra kuti vanotanga kushandisa masitaeramin-width: 0
uye kwete seti pixel kukosha. Pane kudaro.col-xs-6
, ikozvino.col-6
. Mamwe ese mamwe magidhi tiers anoda iyo infix (semuenzaniso,sm
).
- Yakawedzera gidhi nyowani
- Yakagadziridzwa gidhi saizi, musanganiswa, uye akasiyana.
- Grid gutters ikozvino ine mepu yeSass kuitira kuti iwe ugone kudoma chaiwo upamhi hwegutter pane imwe neimwe breakpoint.
- Yakagadziridzwa grid musanganiswa kushandisa
make-col-ready
prep musanganiswa uye a kusetamake-col
iyoflex
uyemax-width
kune yega column saizi. - Yakachinjwa grid system midhiya yemubvunzo mabreakpoints uye upamhi hwechigadziko kuverengera kune itsva grid tier uye ive nechokwadi chekuti makoramu anopatsanurika zvakaenzana
12
nehupamhi hwawo. - Grid breakpoints uye upamhi hwemudziyo hwave kubatwa kuburikidza neSass mepu (
$grid-breakpoints
uye$container-max-widths
) panzvimbo pezvishoma zvakasiyana zvakasiyana. Izvi zvinotsiva@screen-*
zvinosiyana zvachose uye zvinokutendera kuti ugadzirise zvizere grid tiers. - Media queries yachinjawo. Pane kuti tidzokorore zviziviso zvedu zvemivhunzo nevezvenhau nehukoshi hwakafanana nguva yega yega, isu tava ne
@include media-breakpoint-up/down/only
. Iye zvino, pane kunyora@media (min-width: @screen-sm-min) { ... }
, unogona kunyora@include media-breakpoint-up(sm) { ... }
.
- Mapaneru akadonhedzwa, zvigunwe, uye matsime echinhu chitsva chinosanganisa zvese, makadhi .
- Yakadonhedza iyo Glyphicons icon font. Kana iwe uchida zvidhori, dzimwe sarudzo ndeidzi:
- iyo yekumusoro vhezheni yeGlyphicons
- Octicons
- Font Awesome
- Ona peji rekuwedzera kune runyoro rwedzimwe nzira. Une mamwe mazano here? Ndokumbira uvhure nyaya kana PR.
- Yakadonhedza iyo Affix jQuery plugin.
- Tinokurudzira kushandisa
position: sticky
pachinzvimbo. Ona iyo HTML5 Ndokumbira unyore kuti uwane ruzivo uye chaiwo polyfill kurudziro. Imwe zano nderekushandisa@supports
mutemo pakuushandisa (semuenzaniso,@supports (position: sticky) { ... }
)/ - Dai wanga uchishandisa Affix kuisa yekuwedzera,
position
isiri- masitayera, iyo polyfills inogona kusatsigira yako yekushandisa kesi. Imwe sarudzo yekushandiswa kwakadaro ndeyechitatu-bato ScrollPos-Styler raibhurari.
- Tinokurudzira kushandisa
- Yakadonhedza chikamu chepager sezvo chaive mabhatani akagadziridzwa zvishoma.
- Yakagadziridza dzinenge zvikamu zvese kuti ishandise mamwe makirasi asina-nested ekusarudza pane kunyanya-chaiwo vana vanosarudza.
Rondedzero iyi inoburitsa shanduko huru nechikamu pakati pev3.xx nev4.0.0.
Nyowani kuBootstrap 4 ndiyo Reboot , shizha idzva rinovaka paNormalize nevedu vane mafungiro ekugadziridza zvitaera. Vanosarudza vari mufaira iri vanongoshandisa zvinhu-hapana makirasi pano. Izvi zvinoparadzanisa masitaera edu ekugadzirisa kubva kune yedu chikamu masitaera kune imwe modular maitiro. Mamwe akanyanya kukosha kuseta izvi zvinosanganisira box-sizing: border-box
shanduko, kufamba kubva em
kune rem
mayuniti pane akawanda zvinhu, yekubatanidza masitaera, uye akawanda mafomu element reset.
- Akafambisa zvese
.text-
zvinoshandiswa_utilities.scss
kufaira. - Yakadonhedzwa
.page-header
se, padivi pemuganho, ese masitayipi ayo anogona kuiswa kuburikidza nezvishandiso. .dl-horizontal
yakadonha. Pane kudaro, shandisa.row
uye<dl>
shandisa grid column makirasi (kana musanganiswa) pairi<dt>
nevana<dd>
.- Tsika
<blockquote>
dhizaini yatamira kumakirasi-.blockquote
uye iyo.blockquote-reverse
modifier. .list-inline
zvino inoda kuti vana vayo vanyore zvinhu vave.list-inline-item
nekirasi itsva inoshandiswa kwavari.
- Yakapihwa zita
.img-responsive
rekuti.img-fluid
. - Yakapihwa zita
.img-rounded
rekuti.rounded
- Yakapihwa zita
.img-circle
rekuti.rounded-circle
- Anenge ese mameseji
>
emusarudzo abviswa, zvichireva kuti matafura akaiswa matafura zvino achangogara nhaka zvitaera kubva kuvabereki vavo. Izvi zvinorerutsa zvikuru vatinosarudzira uye vanogona kugadzirisa. - Matafura anopindura haachadi chinhu chekuputira. Pane kudaro, ingoisa
.table-responsive
kurudyi pa<table>
. - Yakapihwa zita
.table-condensed
rekuti.table-sm
kuenderana. - Yakawedzera sarudzo itsva
.table-inverse
. - Yakawedzerwa tafura yemusoro modifiers:
.thead-default
uye.thead-inverse
. - Akapihwa mazita emakirasi emamiriro ezvinhu kuti ave ne
.table-
-prefix. Saka.active
,.success
, uye ku , , uye ..warning
_ _.danger
.info
.table-active
.table-success
.table-warning
.table-danger
.table-info
- Yakafambiswa element reset
_reboot.scss
kufaira. - Yakapihwa zita
.control-label
rekuti.col-form-label
. - Yakatumidzwa
.input-lg
uye.input-sm
ku.form-control-lg
uye.form-control-sm
, zvichiteerana. - Makirasi akadonha
.form-group-*
nekuda kwekureruka. Shandisa.form-control-*
makirasi pane ikozvino. - Yakadonhedza
.help-block
uye yakaitsiva neiyo.form-text
block-level yerubatsiro mavara. Kuti uwane mameseji erubatsiro emukati uye dzimwe sarudzo dzinochinjika, shandisa makirasi ekushandisa senge.text-muted
. - Yakadonha
.radio-inline
uye.checkbox-inline
. - Consolidated
.checkbox
uye.radio
kupinda.form-check
uye akasiyana.form-check-*
makirasi. - Horizontal mafomu akagadziridzwa:
- Yakadonhedza
.form-horizontal
zvinodiwa nekirasi. .form-group
haichashandisi masitaera kubva.row
kuMixin, saka.row
ikozvino inodiwa kune yakachinjika grid marongero (semuenzaniso,<div class="form-group row">
).- Yakawedzera
.col-form-label
kirasi nyowani kune vertically pakati mavara ane.form-control
s. - Yakawedzerwa nyowani
.form-row
kune compact fomu marongero neiyo grid makirasi (chinjana yako.row
kuti.form-row
uende).
- Yakadonhedza
- Yakawedzerwa mafomu ekutsigira mafomu (yecheki mabhokisi, maredhiyo, anosarudza, uye mafaira ekuisa).
- Yakatsiviwa
.has-error
,.has-warning
, uye.has-success
makirasi ane HTML5 fomu yekusimbisa kuburikidza neCSS's:invalid
uye:valid
pseudo-makirasi. - Yakapihwa zita
.form-control-static
rekuti.form-control-plaintext
.
- Yakapihwa zita
.btn-default
rekuti.btn-secondary
. - Yakadonhedza
.btn-xs
kirasi zvachose sezvo.btn-sm
iri diki zvakanyanya pane v3's. - Iyo bhatani inomiririra chimiro
button.js
chejQuery plugin yakadonhedzwa. Izvi zvinosanganisira nzira$().button(string)
uye$().button('reset')
nzira. Isu tinopa zano kushandisa chidiki chidiki chetsika JavaScript pachinzvimbo, icho chinova nemubairo wekuzvibata chaizvo sezvaunoda.- Ziva kuti mamwe maficha eplugin (mabhatani echeki mabhokisi, mabhatani maredhiyo, mabhatani ega-toggle) akachengetwa muv4.
- Shandura mabhatani'
[disabled]
kuti:disabled
ave IE9+ inotsigira:disabled
. Zvisineyifieldset[disabled]
zvichiri kudikanwa nekuti nharaunda dzakaremara dzakaremara dzichiri buggy muIE11 .
- Nyorazve chikamu neflexbox.
- Kubviswa
.btn-group-justified
. Sekutsiva iwe unogona kushandisa<div class="btn-group d-flex" role="group"></div>
sechiputiriso chakatenderedza zvinhu zvine.w-100
. - Vakadonha
.btn-group-xs
kirasi zvachose vapiwa kubvisa.btn-xs
. - Yakabvisa kupatsanura kwakajeka pakati pemapoka emabhatani mumabhatani eturusi; shandisa margin utilities izvozvi.
- Zvinyorwa zvakavandudzwa zvekushandisa nezvimwe zvikamu.
- Yakachinjika kubva kuvasarudzo yevabereki kuenda kune imwe chete makirasi ezvese zvikamu, modhifita, nezvimwe.
- Zvitaera zvakarerutswa zvekudonhedza kuti zvirege kutakura nemiseve inokwira kana pasi yakanamirwa kumenyu yekudonhedza.
- Dropdowns inogona kuvakwa ne
<div>
s kana<ul>
s izvozvi. - Vakazve kudonhedza masitayipi uye markup kuti ipe nyore, yakavakirwa-mukati tsigiro
<a>
uye<button>
yakavakirwa kudonhedza zvinhu. - Yakapihwa zita
.divider
rekuti.dropdown-divider
. - Zvinhu zvekudonhedza zvino zvinoda
.dropdown-item
. - Dropdown toggles haichada chakajeka
<span class="caret"></span>
; izvi zvino zvinopihwa otomatiki kuburikidza neCSS's::after
pa.dropdown-toggle
.
- Yakawedzera
576px
grid breakpoint nyowani sesm
, zvichireva kuti pave nezvikamu zvishanu zvakazara (xs
,sm
,md
,lg
, uyexl
). - Yakapa zita remakirasi egidhi anopindura kubva
.col-{breakpoint}-{modifier}-{size}
kune.{modifier}-{breakpoint}-{size}
ari nyore makirasi egidhi. - Yakadonhedza push uye dhonza modifier makirasi emakirasi matsva eflexbox-powered
order
. Semuenzaniso, pachinzvimbo chekuti.col-8.push-4
uye.col-4.pull-8
, iwe ungashandisa.col-8.order-2
uye.col-4.order-1
. - Yakawedzera flexbox utility makirasi egridi system uye zvikamu.
- Nyorazve chikamu neflexbox.
- Yakatsiviwa
a.list-group-item
nekirasi yakajeka,.list-group-item-action
, yemaitiro ekubatanidza uye mabhatani ezvinyorwa zveboka zvinhu. - Yakawedzerwa
.list-group-flush
kirasi yekushandisa nemakadhi.
- Nyorazve chikamu neflexbox.
- Tichipihwa mafambiro kune flexbox, kurongeka kwezvidhori zvekudzinga mumusoro kungangotyoka sezvo isu tisisiri kushandisa zvinoyangarara. Zvemukati zvakayangarara zvinouya pekutanga, asi neflexbox hazvisisirizvo. Gadziridza zvidhori zvako zvekudzinga kuti zviuye mushure me modal mazita ekugadzirisa.
- Sarudzo
remote
(iyo yaigona kushandiswa kurongedza otomatiki uye jekiseni zvekunze zvemukati mune modal) uyeloaded.bs.modal
chiitiko chinoenderana chakabviswa. Isu tinokurudzira pachinzvimbo chekushandisa client-side templating kana data binding framework, kana kufonera jQuery.load iwe pachako.
- Nyorazve chikamu neflexbox.
- Yakadonhedza dzinenge dzese
>
sarudzo dzekuita nyore nyore kuburikidza nemakirasi asina-nested. - Panzvimbo pevanosarudza HTML-chaiyo senge
.nav > li > a
, tinoshandisa makirasi akasiyana e.nav
s,.nav-item
s, uye.nav-link
s. Izvi zvinoita kuti HTML yako iwedzere kushanduka paunenge uchiunza kuwedzera kuwedzera.
Iyo navbar yakanyorwa zvachose muflexbox nerutsigiro rwakavandudzwa rwekugadzirisa, kupindura, uye kugadzirisa.
- Inoteerera navbar maitiro ave kushandiswa
.navbar
kukirasi kuburikidza neinodiwa kwaunosarudza.navbar-expand-{breakpoint}
kwaunoputsira navbar. Pakutanga uku kwaive kuchinjika kwakaderera uye kwaida kudzoreredza. .navbar-default
ikozvino.navbar-light
, kunyange zvakadaro.navbar-dark
. Imwe yeiyi inodiwa pane imwe neimwe navbar. Zvisinei, makirasi aya haachagadziribackground-color
s; asi zvinongobata chetecolor
.- Navbar ikozvino inoda kuziviswa kwekumashure kweimwe mhando. Sarudza kubva kune yedu yekumashure zvishandiso (
.bg-*
) kana kuseta yako neyakajeka/yakapesana makirasi ari pamusoro pekuita mad customization . - Zvichipihwa flexbox masitaera, navbars ikozvino inogona kushandisa flexbox zvishandiso kune nyore kurongeka sarudzo.
.navbar-toggle
ikozvino.navbar-toggler
uye ine masitaera akasiyana uye yemukati mamaki (hapana matatu<span>
s).- Ndakasiya
.navbar-form
kirasi zvachose. Hazvichadiwi; pachinzvimbo, ingoshandisa.form-inline
uye shandisa margin utilities sezvinodiwa. - Navbars haichasanganisire
margin-bottom
kanaborder-radius
nekusingaperi. Shandisa zvishandiso sezvinodiwa. - Yese mienzaniso ine navbar yakagadziridzwa kuti ibatanidze nyowani markup.
- Nyorazve chikamu neflexbox.
- Makirasi akajeka (
.page-item
,.page-link
) ave kudiwa pavazukuru.pagination
ves - Yakadonhedza
.pager
chikamu zvachose sezvo chaive chishoma kudarika mabhatani erondedzero.
- Kirasi yakajeka
.breadcrumb-item
,,,,,,,,,,,,,,,,,,,,,.breadcrumb
- Yakapihwa zita
.label
rekuti.badge
kusanzwisisa kubva<label>
muchinhu. - Yakadonhedza
.badge
chikamu ichi sezvo chaive chakada kufanana nemalebula. Shandisa iyo.badge-pill
modifier pamwe chete neiyo label component pachinzvimbo chekutarisa kwakatenderedzwa. - Mabheji haachafambiswa otomatiki mumapoka ezvinyorwa uye zvimwe zvikamu. Utility makirasi ikozvino anodiwa kune izvozvo.
.badge-default
yakadonhedzwa uye.badge-secondary
yawedzerwa kuenderana nechikamu chekugadzirisa makirasi anoshandiswa kumwewo.
Yakadonhedzwa zvachose kune chikamu chitsva chekadhi.
.panel
ku.card
, ikozvino yakavakwa ne flexbox..panel-default
kubviswa uye hapana chinotsiva..panel-group
kubviswa uye hapana chinotsiva..card-group
haisi yokutsiva, yakasiyana..panel-heading
ku.card-header
.panel-title
ku.card-title
. Zvichienderana nechitarisiko chaunoda, iwe unogona zvakare kuda kushandisa zvinyorwa zvemusoro kana makirasi (eg<h3>
,.h3
) kana ma bold elements kana makirasi (eg<strong>
,<b>
,.font-weight-bold
). Ziva kuti.card-title
, kunyangwe yakatumidzwa zvakafanana, inogadzira chitarisiko chakasiyana pane.panel-title
..panel-body
ku.card-body
.panel-footer
ku.card-footer
.panel-primary
,.panel-success
,.panel-info
,.panel-warning
, uye.panel-danger
zvakadonhedzwa zve.bg-
,.text-
, uye.border
zvishandiso zvinogadzirwa kubva$theme-colors
kuSass mepu yedu.
- Akatsiviwa
.progress-bar-*
makirasi emamiriro ezvinhu nekushandisa.bg-*
. Somuenzaniso,class="progress-bar progress-bar-danger"
inovaclass="progress-bar bg-danger"
. - Yakatsiviwa nemabhawa
.active
ekufambira mberi ane.progress-bar-animated
.
- Yakakwenenzvera chikamu chose kuti chirerutsa dhizaini uye masitaera. Isu tine mashoma masitaera ekuti iwe uwedzere, zviratidzo zvitsva, uye zvidhori zvitsva.
- Yese CSS haina-nested uye kupihwa zita, kuve nechokwadi chekuti kirasi yega yega yakamisikidzwa ne
.carousel-
.- Zvecarousel zvinhu,
.next
,.prev
,.left
, uye.right
ikozvino.carousel-item-next
,.carousel-item-prev
,.carousel-item-left
, uye.carousel-item-right
. .item
zvakare ikozvino.carousel-item
.- Zveprev/zvinotevera zvidzoreso,
.carousel-control.right
uye.carousel-control.left
zvava zvino.carousel-control-next
uye.carousel-control-prev
, zvichireva kuti havachada imwe base base class.
- Zvecarousel zvinhu,
- Yakabvisa masitaera ese anoteerera, achimiririra kune zvinoshandiswa (semuenzaniso, kuratidza zvinyorwa pane mamwe maratidziro) uye masitaira echivanhu sezvinodiwa.
- Yakabviswa mifananidzo inodarika yemifananidzo iri mu carousel zvinhu, ichidzoreredzwa kune zvishandiso.
- Tweaked muenzaniso weCarousel kuti ubatanidze iyo nyowani markup uye masitaera.
- Yakabviswa rutsigiro rwematayera nested table. Ese masitayera etafura ave kugarwa nhaka muv4 kune vakareruka vanosarudza.
- Yakawedzerwa inverse tafura musiyano.
- Ratidza, zvakavanzika, nezvimwe:
- Yakagadzirwa kuratidza zvishandiso zvinoteerera (semuenzaniso,
.d-none
uyed-{sm,md,lg,xl}-none
). - Yakadonhedza huwandu
.hidden-*
hwezvishandiso zvezvishandiso zvitsva zvekuratidzira . Somuenzaniso, pane.hidden-sm-up
, shandisa.d-sm-none
. Akatumidza zita.hidden-print
rekushandisa kushandisa ratidziro yekushandisa zita chirongwa. Ruzivo rwakawanda pasi peChikamu chinopindura chezvishandiso chepeji rino. - Akawedzera
.float-{sm,md,lg,xl}-{left,right,none}
makirasi eanopindura anoyangarara uye akabviswa.pull-left
uye.pull-right
sezvo asingachashandi.float-left
uye.float-right
.
- Yakagadzirwa kuratidza zvishandiso zvinoteerera (semuenzaniso,
- Type:
- Yakawedzera mhinduro dzakasiyana kumakirasi edu ekugadzirisa zvinyorwa
.text-{sm,md,lg,xl}-{left,center,right}
.
- Yakawedzera mhinduro dzakasiyana kumakirasi edu ekugadzirisa zvinyorwa
- Kurongeka uye nzvimbo:
- Yakawedzera mitsva inopindura margin uye padding zvishandiso zvemativi ese, pamwe neakatwasuka uye akachinjika shorthands.
- Yakawedzera chikepe cheflexbox utilities .
- Akadonhedzwa kukirasi
.center-block
itsva ..mx-auto
- Clearfix yakagadziridzwa kudonhedza rutsigiro kune ekare browser shanduro.
Bootstrap 3's mutengesi prefix mixins, iyo yakaderedzwa muv3.2.0, yakabviswa muBootstrap 4. Sezvo isu tichishandisa Autoprefixer , ivo havachadiwi.
Yakabvisa misanganiswa inotevera : 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
Mapepa edu akagamuchira kuvandudzwa mukati mebhodhi zvakare. Heino yakaderera pasi:
- Tichiri kushandisa Jekyll, asi isu tine mapulagi mumusanganiswa:
bugify.rb
inoshandiswa kunyatso kunyora zvinyorwa pane yedu browser bugs peji.example.rb
iforogo yetsika yeiyo defaulthighlight.rb
plugin, ichibvumira kuti ive nyore muenzaniso-kodhi kubata.callout.rb
iforogo yakafanana yetsika iyoyo, asi yakagadzirirwa edu akakosha madocs callouts.markdown-block.rb
inoshandiswa kupa Markdown snippets mukati meHTML zvinhu sematafura.- jekyll-toc inoshandiswa kugadzira tafura yedu yezviri mukati.
- Zvese zvinyorwa zvemukati zvakanyorwa patsva muMarkdown (panzvimbo yeHTML) kuti zvive nyore kugadzirisa.
- Mapeji akarongwa patsva kuitira zviri nyore zvemukati uye hutungamiriri hunotaurika.
- Isu takatama kubva kuCSS yakajairwa kuenda kuSCSS kutora mukana wakazara weBootstrap's variables, musanganiswa, nezvimwe.
Zvose @screen-
zvakasiyana-siyana zvakabviswa mu v4.0.0. Shandisa iyo media-breakpoint-up()
, media-breakpoint-down()
, kana media-breakpoint-only()
Sass musanganiswa kana $grid-breakpoints
mepu yeSass panzvimbo.
Makirasi edu anopindura ekushandisa akabviswa zvakanyanya nekuda kwekushandisa zvakajeka display
.
- Iwo
.hidden
uye.show
makirasi akabviswa nekuti aipesana nejQuery's$(...).hide()
uye$(...).show()
nzira. Pane kudaro, edza kushandura[hidden]
hunhu kana kushandisa inline masitaera sestyle="display: none;"
uyestyle="display: block;"
. - Makirasi ese
.hidden-
abviswa, kunze kwezvishandiso zvekudhinda zvakapihwa zita.- Yakabviswa pav3:
.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
- Yakabviswa kubva kuv4 alphas:
.hidden-xs-up
.hidden-xs-down
.hidden-sm-up
.hidden-sm-down
.hidden-md-up
.hidden-md-down
.hidden-lg-up
.hidden-lg-down
- Yakabviswa pav3:
- Dhinda zvinoshandiswa hazvichatangi ne
.hidden-
kana.visible-
, asi ne.d-print-
.- Mazita ekare :
.visible-print-block
,,,,.visible-print-inline
.visible-print-inline-block
.hidden-print
- Zvidzidzo zvitsva
.d-print-block
:.d-print-inline
,,,,.d-print-inline-block
.d-print-none
- Mazita ekare :
Panzvimbo pekushandisa .visible-*
makirasi akajeka, unoita kuti chinhu chionekwe nekungorega kuchivanza pahukuru hwescreen. Iwe unogona kusanganisa .d-*-none
kirasi imwe .d-*-block
nekirasi imwe chete kuratidza chinhu pane yakapihwa nguva yesaizi yechidzitiro (semuenzaniso .d-none.d-md-block.d-xl-none
inoratidza chinhu pamidziyo yepakati uye yakakura).
Ziva kuti shanduko kune grid breakpoints muv4 zvinoreva kuti iwe uchafanirwa kuenda imwe breakpoint yakakura kuti uwane mibairo mimwechete. Iwo makirasi matsva anopindura ekushandisa haaedze kugashira zviitiko zvisinganyanyi kunyanyozivikanwa apo kuoneka kwechinhu hakugone kuratidzwa sechinhu chimwe chete chinobatika chehukuru hwenzvimbo yekuona; iwe uchazoda kushandisa tsika CSS mumamiriro ezvinhu akadaro.