Kwimuka kuva kuri 2.x kugeza 3.0

Bootstrap 3 ntabwo isubira inyuma ihuza na v2.x. Koresha iki gice nkubuyobozi rusange bwo kuzamura kuva kuri v2.x kugeza kuri v3.0. Kubisobanuro birambuye, reba ibishya mumatangazo ya v3.0.

Impinduka zingenzi zicyiciro

Iyi mbonerahamwe yerekana imiterere ihinduka hagati ya v2.x na v3.0.

Bootstrap 2.x. Bootstrap 3.0
.row-fluid .row
.span* .col-md-*
.offset* .col-md-offset-*
.brand .navbar-brand
.navbar .nav .navbar-nav
.nav-collapse .navbar-collapse
.nav-toggle .navbar-toggle
.btn-navbar .navbar-btn
.hero-unit .jumbotron
.icon-* .glyphicon .glyphicon-*
.btn .btn .btn-default
.btn-mini .btn-xs
.btn-small .btn-sm
.btn-large .btn-lg
.alert .alert .alert-warning
.alert-error .alert-danger
.visible-phone .visible-xs
.visible-tablet .visible-sm
.visible-desktop Gabanyamo.visible-md .visible-lg
.hidden-phone .hidden-xs
.hidden-tablet .hidden-sm
.hidden-desktop Gabanyamo.hidden-md .hidden-lg
.input-block-level .form-control
.control-group .form-group
.control-group.warning .control-group.error .control-group.success .form-group.has-*
.checkbox.inline .radio.inline .checkbox-inline .radio-inline
.input-prepend .input-append .input-group
.add-on .input-group-addon
.img-polaroid .img-thumbnail
ul.unstyled .list-unstyled
ul.inline .list-inline
.muted .text-muted
.label .label .label-default
.label-important .label-danger
.text-error .text-danger
.table .error .table .danger
.bar .progress-bar
.bar-* .progress-bar-*
.accordion .panel-group
.accordion-group .panel .panel-default
.accordion-heading .panel-heading
.accordion-body .panel-collapse
.accordion-inner .panel-body

Ni iki gishya

Twongeyeho ibintu bishya kandi duhindura bimwe bihari. Dore uburyo bushya cyangwa bugezweho.

Ikintu Ibisobanuro
Ikibaho .panel .panel-default .panel-body .panel-title .panel-heading .panel-footer .panel-collapse
Andika amatsinda .list-group .list-group-item .list-group-item-text .list-group-item-heading
Glyphicons .glyphicon
Jumbotron .jumbotron
Urusobe ruto rudasanzwe (<768px) .col-xs-*
Urusobe ruto (68768px) .col-sm-*
Urusobe ruciriritse (≥992px) .col-md-*
Urusobe runini (≥1200px) .col-lg-*
Ibyiciro byingirakamaro byingirakamaro (≥1200px) .visible-lg .hidden-lg
Offsets .col-sm-offset-* .col-md-offset-* .col-lg-offset-*
Gusunika .col-sm-push-* .col-md-push-* .col-lg-push-*
Kurura .col-sm-pull-* .col-md-pull-* .col-lg-pull-*
Ingano yuburebure .input-sm .input-lg
Amatsinda yinjiza .input-group .input-group-addon .input-group-btn
Kugenzura imiterere .form-control .form-group
Ingano yitsinda rya buto .btn-group-xs .btn-group-sm .btn-group-lg
Inyandiko ya Navbar .navbar-text
Umutwe wa Navbar .navbar-header
Ibikoresho / ibinini bifite ishingiro .nav-justified
Amashusho asubiza .img-responsive
Imirongo ikurikira .success .danger .warning .active .info
Ikibaho .panel-success .panel-danger .panel-warning .panel-info
Modal .modal-dialog .modal-content
Igishusho .img-thumbnail
Ingano nziza .well-sm .well-lg
Ihuza .alert-link

Icyakuweho

Ibintu bikurikira byarahanuwe cyangwa byahinduwe muri v3.0.

Ikintu Yakuwe kuri 2.x 3.0 Bingana
Shiraho ibikorwa .form-actions N / A.
Ifishi yo gushakisha .form-search N / A.
Shiraho itsinda rifite amakuru .control-group.info N / A.
Ingano-yubugari bwinjiza ingano .input-mini .input-small .input-medium .input-large .input-xlarge .input-xxlarge Koresha .form-controlna gride sisitemu aho.
Hagarika urwego rwinjiza .input-block-level Ntabwo bihwanye neza, ariko uburyo bwo kugenzura burasa.
Utubuto .btn-inverse N / A.
Umurongo utemba .row-fluid .row(ntakindi gisanzwe gikwiye)
Igenzura .controls N / A.
Igenzura umurongo .controls-row .rowcyangwa.form-group
Imbere imbere .navbar-inner N / A.
Navbar ihagaritse .navbar .divider-vertical N / A.
Ibitonyanga .dropdown-submenu N / A.
Guhuza tab .tabs-left .tabs-right .tabs-below N / A.
Agace gashingiye kumeza .pill-content .tab-content
Inkingi ishingiye kumeza yumwanya pane .pill-pane .tab-pane
Urutonde .nav-list .nav-header Ntabwo bihwanye neza, ariko urutonde rwamatsinda na .panel-groups birasa.
Inline ifasha kugenzura ifishi .help-inline Ntabwo bihwanye neza, ariko .help-blockbirasa.
Amabara atari murwego rwo gutera imbere .progress-info .progress-success .progress-warning .progress-danger Koresha .progress-bar-*aho .progress-bar.

Inyandiko z'inyongera

Izindi mpinduka muri v3.0 ntabwo zihita zigaragara. Ibyiciro shingiro, imiterere yingenzi, nimyitwarire byahinduwe kugirango bihindurwe hamwe na mobile yacu ya mbere . Dore urutonde rw'igice:

  • Mburabuzi, inyandiko-shusho ifatika igenzura ubu yakira gusa stiling. Kubireba amabara hamwe nu mfuruka zegeranye, shyira .form-controlmucyiciro ku kintu.
  • Ifishi ishingiye kumyandikire igenzura hamwe .form-controlnicyiciro cyakoreshejwe ubu ni 100% mugari kubisanzwe. Kuzuza ibyinjira imbere <div class="col-*"></div>kugirango ugenzure ubugari bwinjira.
  • .badgentagifite amasomo ajyanye (-gutsindira, -ibanze, nibindi ..) amasomo.
  • .btnigomba kandi gukoresha .btn-defaultkugirango ubone buto "isanzwe".
  • .rowubu ni amazi.
  • Amashusho ntagisubizwa muburyo busanzwe. Koresha ubunini .img-responsivebwamazi <img>.
  • Udushushondanga, ubu .glyphicon, ni imyandikire ishingiye. Udushushondanga dusaba kandi shingiro nicyiciro (urugero .glyphicon .glyphicon-asterisk).
  • Typeahead yahagaritswe, kugirango ishyigikire Twitter Typeahead .
  • Ibiranga modal byahindutse kuburyo bugaragara. .modal-header,,, Ibice ubu bipfunyitse .modal-bodykandi kugirango bigerweho neza byimiterere yimyitwarire. Na none, ntugomba kongera gusaba mubirango byawe..modal-footer.modal-content.modal-dialog.hide.modal
  • Kuva kuri v3.1.0, HTML yapakiwe nuburyo bwa remotemodal ubu yinjijwe muri .modal-content(kuva v3.0.0 kugeza v3.0.3, muri .modal) aho kuba muri .modal-body. Ibi biragufasha kandi guhindura byoroshye imitwe na footer ya modal, ntabwo ari umubiri gusa.
  • Kugenzura agasanduku na radio biranga buto.js plugin ubu byombi ikoresha data-toggle="buttons"aho gukoresha data-toggle="buttons-checkbox"cyangwa data-toggle="buttons-radio"mubiranga.
  • JavaScript ibyabaye ni amazina. Kurugero, kugirango ukore modal "kwerekana" ibyabaye, koresha 'show.bs.modal'. Kuri tabs "yerekanwe" gukoresha 'shown.bs.tab', nibindi.

Kubindi bisobanuro bijyanye no kuzamura v3.0, hamwe nibice bya kode biva mubaturage, reba Bootply .