Ke neʻe nei mai 2.x a i 3.0

ʻAʻole kūpono ʻo Bootstrap 3 me v2.x. E hoʻohana i kēia ʻāpana i alakaʻi maʻamau no ka hoʻonui ʻana mai v2.x a i v3.0. No ka ʻike ākea ākea, e ʻike i ka mea hou ma ka hoʻolaha hoʻolaha v3.0.

Hoʻololi papa nui

Hōʻike kēia pākaukau i nā loli kaila ma waena o v2.x a me 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 Māhele i loko.visible-md .visible-lg
.hidden-phone .hidden-xs
.hidden-tablet .hidden-sm
.hidden-desktop Māhele i loko.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

He aha ka mea hou

Ua hoʻohui mākou i nā mea hou a hoʻololi i kekahi mau mea i loaʻa. Eia nā ʻano hou a i ʻole nā ​​mea hou.

ʻElemu wehewehe
Nā Panela .panel .panel-default .panel-body .panel-title .panel-heading .panel-footer .panel-collapse
E papa inoa i nā hui .list-group .list-group-item .list-group-item-text .list-group-item-heading
Nā Glyphicons .glyphicon
ʻO Jumbotron .jumbotron
Māhele liʻiliʻi liʻiliʻi (<768px) .col-xs-*
Māmā liʻiliʻi (≥768px) .col-sm-*
Mānoa waena (≥992px) .col-md-*
Māhele nui (≥1200px) .col-lg-*
Nā papa pono kūpono (≥1200px) .visible-lg .hidden-lg
Offsets .col-sm-offset-* .col-md-offset-* .col-lg-offset-*
Paʻi .col-sm-push-* .col-md-push-* .col-lg-push-*
Huki .col-sm-pull-* .col-md-pull-* .col-lg-pull-*
Nui kiʻekiʻe hoʻokomo .input-sm .input-lg
Pūʻulu hoʻokomo .input-group .input-group-addon .input-group-btn
Nā mana palapala .form-control .form-group
Nui pūʻulu pihi .btn-group-xs .btn-group-sm .btn-group-lg
Navbar kikokikona .navbar-text
Poʻomanaʻo Navbar .navbar-header
ʻO nā papa / lāʻau i hoʻopaʻa ʻia .nav-justified
Nā kiʻi pane .img-responsive
Nā lālani papaʻaina .success .danger .warning .active .info
Nā panela kuʻuna .panel-success .panel-danger .panel-warning .panel-info
Modal .modal-dialog .modal-content
Kiʻi liʻiliʻi .img-thumbnail
ʻO nā nui maikaʻi .well-sm .well-lg
Nā loulou makaʻala .alert-link

He aha ka mea i wehe ʻia

Ua hoʻokuʻu ʻia a hoʻololi ʻia kēia mau mea i ka v3.0.

ʻElemu Wehe ʻia mai 2.x 3.0 Kaulike
Hana i nā hana .form-actions N/A
Palapala huli .form-search N/A
E hana i ka hui me ka ʻike .control-group.info N/A
Nā nui hoʻokomo laula paʻa .input-mini .input-small .input-medium .input-large .input-xlarge .input-xxlarge E hoʻohana .form-controla me ka ʻōnaehana mānoanoa.
Hoʻokomo puka pae ʻākaʻaka .input-block-level ʻAʻole like pololei, akā like nā mana o nā palapala.
Nā pihi hoʻohuli .btn-inverse N/A
Lālani wai .row-fluid .row(ʻaʻohe mākia paʻa hou)
Mea hoʻomalu .controls N/A
Manaʻo lālani .controls-row .rowa i ʻole.form-group
Navbar i loko .navbar-inner N/A
Nā mea hoʻokaʻawale kūpaʻa Navbar .navbar .divider-vertical N/A
Papa koho iho .dropdown-submenu N/A
Nā hoʻolikelike ʻana o ka pā .tabs-left .tabs-right .tabs-below N/A
ʻAʻohe papa papa ma luna o ka pila .pill-content .tab-content
Pane wahi tabable ma muli o ka pila .pill-pane .tab-pane
Nā papa inoa .nav-list .nav-header ʻAʻole like pololei, akā like nā pūʻulu papa inoa a me nā .panel-groups .
Kōkua inline no ka hoʻomalu palapala .help-inline ʻAʻohe mea like, akā .help-blocklike.
Nā kala holomua pae ʻole .progress-info .progress-success .progress-warning .progress-danger E hoʻohana .progress-bar-*ma .progress-barkahi.

Nā memo hou aku

ʻAʻole ʻike koke ʻia nā loli ʻē aʻe ma v3.0. Ua hoʻoponopono ʻia nā papa kumu, nā ʻano kī, a me nā ʻano no ka maʻalahi a me kā mākou ala hele mua . Eia kahi papa inoa ʻāpana:

  • ʻO ka mea paʻamau, loaʻa i nā mana palapala ma ke kikokikona ke ʻano liʻiliʻi wale nō. No nā kala kikoʻī a me nā kihi poepoe, e hoʻopili i ka .form-controlpapa ma ka mea i ke ʻano.
  • .form-controlHe 100% ka laula o ka laula ma ke ano pa'amau ka mana o ke kikokikona me ka papa i hoohanaia. E hoʻopili i nā mea hoʻokomo i loko <div class="col-*"></div>e hoʻomalu i nā laula hoʻokomo.
  • .badgeʻaʻohe papa ʻokoʻa (-success,-primary, etc.).
  • .btnpono e hoʻohana .btn-defaultno ka loaʻa ʻana o ke pihi "paʻamau".
  • .rowhe wai i kēia manawa.
  • ʻAʻole pane hou nā kiʻi ma ka paʻamau. E hoʻohana .img-responsiveno ka nui o ka wai <img>.
  • ʻO nā kiʻi, i kēia manawa .glyphicon, ua hoʻokumu ʻia i ka font. Pono pū nā kiʻi i kahi papa kumu a me ka papa kiʻiona (eg .glyphicon .glyphicon-asterisk).
  • Ua hoʻokuʻu ʻia ʻo Typeahead, no ka hoʻohana ʻana iā Twitter Typeahead .
  • Ua loli nui ka markup. Hoʻopili ʻia ka .modal-header, .modal-body, a me .modal-footernā ʻāpana i kēia manawa .modal-contenta .modal-dialogno ka hoʻolima ʻana a me ka hana ʻoi aku ka maikaʻi. Eia kekahi, ʻaʻole pono ʻoe e hoʻopili hou .hidei .modalkāu markup.
  • E like me v3.1.0, ua hoʻokomo ʻia ka HTML i hoʻouka ʻia e ke remotekoho modal i loko o ka .modal-content(mai v3.0.0 a i v3.0.3, i loko o ka .modal) ma kahi o ka .modal-body. Hiki iā ʻoe ke hoʻololi maʻalahi i ke poʻo a me ka wāwae o ka modal, ʻaʻole wale ke kino modal.
  • Hoʻohana ʻia ka pahu pahu a me nā hiʻohiʻona lekiō o ka plugin button.js i kēia manawa ma data-toggle="buttons"kahi o a i data-toggle="buttons-checkbox"ʻole data-toggle="buttons-radio"i kā lākou markup.
  • Hoʻokaʻawale ʻia nā hanana JavaScript. No ka laʻana, e hoʻohana i ka hanana "hōʻike" modal, e hoʻohana 'show.bs.modal'. No nā papa "hōʻike" hoʻohana 'shown.bs.tab', etc.

No ka ʻike hou aku e pili ana i ka hoʻonui ʻana i v3.0, a me nā snippet code mai ke kaiāulu, e ʻike iā Bootply .