Ibigize

Ibice byinshi byongeye gukoreshwa byubatswe muri Bootstrap kugirango bitange inzira, kumenyesha, popovers, nibindi byinshi.

Amatsinda ya buto

Koresha amatsinda ya buto kugirango uhuze buto nyinshi hamwe nkigice kimwe. Kububaka hamwe nurukurikirane <a>cyangwa <button>ibintu.

Imyitozo myiza

Turasaba amabwiriza akurikira yo gukoresha amatsinda ya buto hamwe nibikoresho byifashishwa:

  • Buri gihe ukoreshe ikintu kimwe mumatsinda imwe ya buto, <a>cyangwa <button>.
  • Ntukavange buto yamabara atandukanye mumatsinda amwe.
  • Koresha amashusho wongeyeho cyangwa aho kuba inyandiko, ariko menya neza ko ushiramo alt hamwe numutwe wicyubahiro aho bikenewe.

Amatsinda afitanye isano na Button hamwe nigitonyanga (reba hano hepfo) agomba guhamagarwa ukundi kandi buri gihe ushizemo caret yamanutse kugirango yerekane imyitwarire igamije.

Urugero rusanzwe

Dore uko HTML ishakisha itsinda rya buto risanzwe ryubatswe hamwe na buto ya tagi ya labour:

  1. <div class = "btn-itsinda" >
  2. <buto icyiciro = "btn" > 1 </button>
  3. <buto icyiciro = "btn" > 2 </button>
  4. <buto icyiciro = "btn" > 3 </button>
  5. </div>

Urugero rw'ibikoresho

Huza <div class="btn-group">ibice bya a <div class="btn-toolbar">kubintu byinshi bigoye.

  1. <div class = "btn-toolbar" >
  2. <div class = "btn-itsinda" >
  3. ...
  4. </div>
  5. </div>

Kugenzura agasanduku na radiyo nziza

Amatsinda ya buto arashobora kandi gukora nka radio, aho buto imwe yonyine ishobora kuba ikora, cyangwa agasanduku, aho umubare uwo ariwo wose wa buto ushobora kuba ukora. Reba inyandiko ya Javascript kubyo.

Shaka javascript »

Ibitonyanga mumatsinda ya buto

Umutwe! Utubuto dufite ibitonyanga bigomba kuba byiziritse kugiti cyabyo .btn-groupmuburyo .btn-toolbarbwo gutanga neza.

Ibitonyanga

Urugero

Bisa na buto itsinda, marike yacu ikoresha buto isanzwe, ariko hamwe nintoki zongeweho kugirango tunonosore imiterere kandi dushyigikire Bootstrap yamanutse jQuery plugin.

  1. <div class = "btn-itsinda" >
  2. <a class = "btn guta-toggle" data-toggle = "dropdown" href = "#">
  3. Igikorwa
  4. <span class = "caret" > </span>
  5. </a>
  6. <ul class = "ibitonyanga-menu" >
  7. <! - Ibitonyanga byamanutse bihuza ->
  8. </ul>
  9. </div>

Akorana na buto zose zingana

Ibitonyanga bya buto bikora mubunini ubwo aribwo bwose. buto yawe ingano kuri .btn-large,, .btn-smallcyangwa .btn-mini.

Irasaba javascript

Ibitonyanga bya buto bisaba Bootstrap yamanutse plugin kugirango ikore.

Rimwe na rimwe-nka mobile-ibimanuka bizamanuka hanze yukureba. Ugomba gukemura guhuza intoki cyangwa hamwe na javascript yihariye.


Gutandukanya buto yamanutse

Incamake n'ingero

Kubaka kuri buto yitsinda ryimiterere na marike, turashobora gukora byoroshye buto yo gutandukana. Gutandukanya utubuto tugaragaza ibikorwa bisanzwe ibumoso hamwe no kumanura iburyo iburyo hamwe nibihuza.

Ingano

Koresha inyongera ya buto y'ibyiciro .btn-mini, .btn-smallcyangwa .btn-largekubunini.

  1. <div class = "btn-itsinda" >
  2. ...
  3. <ul class = "guta-menu gukurura-iburyo" >
  4. <! - Ibitonyanga byamanutse bihuza ->
  5. </ul>
  6. </div>

Urugero

Twagutse kuri bouton isanzwe yamanutse kugirango dutange buto ya kabiri igikorwa ikora nkigitonyanga gitandukanye.

  1. <div class = "btn-itsinda" >
  2. <buto icyiciro = "btn" > Igikorwa </button>
  3. <buto icyiciro = "btn kumanuka-guhinduranya" data-toggle = "igitonyanga" >
  4. <span class = "caret" > </span>
  5. </button>
  6. <ul class = "ibitonyanga-menu" >
  7. <! - Ibitonyanga byamanutse bihuza ->
  8. </ul>
  9. </div>

Ibitonyanga

Ibitonyanga byamanuka birashobora kandi guhindurwa kuva hasi hejuru wongeyeho icyiciro kimwe kubabyeyi ba hafi .dropdown-menu. Bizahindura icyerekezo cya i .caretno guhinduranya menu ubwayo kugirango yimuke kuva hasi hejuru aho hejuru hejuru.

  1. <div class = "btn-itsinda ryamanutse" >
  2. <buto icyiciro = "btn" > Igitonyanga </button>
  3. <buto icyiciro = "btn kumanuka-guhinduranya" data-toggle = "igitonyanga" >
  4. <span class = "caret" > </span>
  5. </button>
  6. <ul class = "ibitonyanga-menu" >
  7. <! - Ibitonyanga byamanutse bihuza ->
  8. </ul>
  9. </div>

Urupapuro rwinshi

Igihe cyo gukoresha

Ultra yoroshye kandi yoroheje yerekana pagination yahumetswe na Rdio, nziza kuri porogaramu n'ibisubizo by'ishakisha. Inzitizi nini iragoye kubura, byoroshye kugereranywa, kandi itanga ahantu hanini ho gukanda.

Ipaji ya leta ihuza

Ihuza irashobora guhindurwa kandi ikora mubihe byinshi hamwe nicyiciro gikwiye. .disabledkumirongo idahinduka no .activekurupapuro rwubu.

Guhuza byoroshye

Ongeramo kimwe mubyiciro bibiri bidahwitse kugirango uhindure guhuza pagination ihuza: .pagination-centeredna .pagination-right.

Ingero

Mburabuzi pagination ibice biroroshye kandi ikora muburyo butandukanye.

Markup

Bipfunyitse muri a <div>, pagination ni a <ul>.

  1. <div class = "pagination" >
  2. <ul>
  3. <li> <a href = "#"> Ibanza </a> </li>
  4. <li urwego = "rukora" >
  5. <a href = "#"> 1 </a> _
  6. </li>
  7. <li> <a href = "#"> 2 </a> </li>
  8. <li> <a href = "#"> 3 </a> </li>
  9. <li> <a href = "#"> 4 </a> </li>
  10. <li> <a href = "#"> Ibikurikira </a> </li>
  11. </ul>
  12. </div>

Pager Kubyihuta byambere nibikurikira

Ibyerekeye pager

Igice cya pager ni ihuriro ryibihuza byoroheje byo gushyira mubikorwa hamwe nurumuri ndetse nuburyo bworoshye. Nibyiza kurubuga rworoshye nka blog cyangwa ibinyamakuru.

Leta ihitamo ubumuga

Ipaji ihuza kandi ikoresha .disabledicyiciro rusange uhereye kuri pagination.

Urugero rusanzwe

Mburabuzi, pager hagati ihuza.

  1. <ul class = "pager" >
  2. <li>
  3. <a href = "#"> Mbere </a> _
  4. </li>
  5. <li>
  6. <a href = "#"> Ibikurikira </a> _
  7. </li>
  8. </ul>

Guhuza

Ubundi, urashobora guhuza buri murongo kumpande:

  1. <ul class = "pager" >
  2. <li urwego = "ubanza" >
  3. <a href = "#"> & larr ; Umusaza </a>
  4. </li>
  5. <li urwego = "ubutaha" >
  6. <a href = "#"> Gishya & rarr ; </a>
  7. </li>
  8. </ul>
Ibirango Markup
Mburabuzi <span class="label">Default</span>
Intsinzi <span class="label label-success">Success</span>
Iburira <span class="label label-warning">Warning</span>
Ni ngombwa <span class="label label-important">Important</span>
Amakuru <span class="label label-info">Info</span>
Ibinyuranye <span class="label label-inverse">Inverse</span>

Ibyerekeye

Badges ni ntoya, yoroshye ibice byo kwerekana icyerekezo cyangwa kubara ubwoko runaka. Bakunze kuboneka mubakiriya ba imeri nka Mail.app cyangwa kuri porogaramu zigendanwa kugirango bamenyeshe.

Amasomo aboneka

Izina Urugero Markup
Mburabuzi 1 <span class="badge">1</span>
Intsinzi 2 <span class="badge badge-success">2</span>
Iburira 4 <span class="badge badge-warning">4</span>
Ni ngombwa 6 <span class="badge badge-important">6</span>
Amakuru 8 <span class="badge badge-info">8</span>
Ibinyuranye 10 <span class="badge badge-inverse">10</span>

Igice cyintwari

Bootstrap itanga ibintu byoroshye, byoroshye byitwa intwari kugirango yerekane ibiri kurubuga rwawe. Ikora neza kubucuruzi no kurubuga-ruremereye.

Markup

Kuzuza ibikubiyemo muri divubu buryo:

  1. <div class = "intwari-ubumwe" >
  2. <h1> Umutwe </h1>
  3. <p> Tagine </p>
  4. <p>
  5. <a class = "btn btn- primaire btn-large">
  6. Wige byinshi
  7. </a>
  8. </p>
  9. </div>

Mwaramutse, isi!

Nibintu byintwari byoroheje, byoroshye jumbotron-yuburyo bwo guhamagarira kwitondera cyane ibintu bigaragara cyangwa amakuru.

Wige byinshi

Urupapuro

Igikonoshwa cyoroheje h1kugirango kibe umwanya ukwiye hamwe nigice cyibigize kurupapuro. Irashobora gukoresha h1'Mburabuzi small, Ikintu Nka Ibindi Byinshi (hamwe nuburyo bwinyongera).

  1. <div class = "page-umutwe" >
  2. <h1> Urugero rwumutwe wurupapuro </h1>
  3. </div>

Mburabuzi

Mburabuzi, Bootstrap's thumbnail yagenewe kwerekana amashusho ahujwe nibimenyetso bike bisabwa.

Birashoboka cyane

Hamwe na bike byongeweho, birashoboka kongeramo ubwoko ubwo aribwo bwose bwa HTML nkimitwe, paragarafu, cyangwa buto muri thumbnail.

  • Ikimenyetso cya Thumbnail

    Cras justo odio, dapibus ac facilisis muri, egestas eget quam. Donec id elit non mi porta gravida kuri eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

    Igikorwa Igikorwa

  • Ikimenyetso cya Thumbnail

    Cras justo odio, dapibus ac facilisis muri, egestas eget quam. Donec id elit non mi porta gravida kuri eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.

    Igikorwa Igikorwa

Kuki ukoresha igikumwe

Thumbnail (mbere .media-gridkugeza kuri v1.4) nibyiza kuri gride yamafoto cyangwa videwo, ibisubizo byo gushakisha amashusho, ibicuruzwa bicuruzwa, portfolios, nibindi byinshi. Birashobora kuba amahuza cyangwa ibirimo bihamye.

Ikimenyetso cyoroshye, cyoroshye

Thumbnail marup iroroshye - a ulhamwe numubare uwo ariwo wose liwibintu byose bisabwa. Nibindi byoroshye guhinduka, kwemerera ubwoko bwibirimo byose hamwe nibimenyetso byinshi byo gupfunyika ibikubiyemo.

Koresha grid inkingi ingano

Ubwanyuma, igikumwe gikoresha sisitemu ya gride ya sisitemu isanzwe-nka .span2cyangwa .span3-kugenzura ibipimo bya thumbnail.

Ikimenyetso

Nkuko byavuzwe mbere, ibimenyetso bisabwa kuri thumbnail biroroshye kandi byoroshye. Hano reba uburyo busanzwe bwo gushiraho amashusho :

  1. <ul class = "igikumwe" >
  2. <li urwego = "span3" >
  3. <a href = "#" class = "thumbnail"> _
  4. <img src = "https://placehold.it/260x180" alt = "" >
  5. </a>
  6. </li>
  7. ...
  8. </ul>

Kubisanzwe HTML yibirimo muri thumbnail, marike ihinduka gato. Kwemerera guhagarika urwego urwego aho ariho hose, twahinduye i <a>kubintu <div>nkibi:

  1. <ul class = "igikumwe" >
  2. <li urwego = "span3" >
  3. <div class = "igikumwe" >
  4. <img src = "https://placehold.it/260x180" alt = "" >
  5. <h5> Ikirango cya Thumbnail </h5>
  6. <p> Ibisobanuro bito hano hano ... </p>
  7. </div>
  8. </li>
  9. ...
  10. </ul>

Ingero nyinshi

Shakisha amahitamo yawe yose hamwe nibyiciro bitandukanye bya gride ushobora kubona. Urashobora kandi kuvanga no guhuza ubunini butandukanye.

Mburabuzi

Icyiciro cyibanze

Hamwe na Bootstrap 2, tworoheje icyiciro shingiro: .alertaho .alert-message. Twagabanije kandi ibimenyetso byibuze bisabwa - oya <p>ntibisabwa byanze bikunze, hanze gusa <div>.

Ubutumwa bumwe bwo kumenyesha

Kubintu byinshi biramba hamwe na code nkeya, twakuyeho itandukaniro ryo kureba kubihagarika, ubutumwa buzana na padi nyinshi kandi mubisanzwe inyandiko nyinshi. Icyiciro nacyo cyahindutse kuri .alert-block.


Kugenda neza hamwe na javascript

Bootstrap izanye plugin nini ya jQuery ishyigikira ubutumwa bwitondewe, bigatuma kubirukana byihuse kandi byoroshye.

Shaka plugin »

Urugero

Kuzuza ubutumwa bwawe hamwe nigishushanyo cyo gufunga muri div hamwe nicyiciro cyoroshye.

Iburira! Byiza kugenzura yo wenyine, ntabwo ureba neza cyane.
  1. <div class = "menyesha" >
  2. <buto icyiciro = "gufunga" data-gusezerera = "kumenyesha" > × </button>
  3. <strong> Iburira! </strong> Kugenzura neza yo wenyine, ntabwo ureba neza.
  4. </div>

Umutwe! Ibikoresho bya iOS bisaba an href="#"kwirukana imenyesha. Wemeze kubishyiramo hamwe namakuru yimiterere ya ankeri ifunga amashusho. Ubundi, urashobora gukoresha ikintu <button>hamwe namakuru yikiranga, twahisemo gukora kubitabo byacu. Mugihe ukoresha <button>, ugomba gushiramo type="button"cyangwa impapuro zawe ntizishobora gutanga.

Byoroshe kwagura ubutumwa busanzwe bwo kumenyesha hamwe nibyiciro bibiri bidahitamo: .alert-blockkuri padi nyinshi hamwe ninyandiko igenzura hamwe no .alert-headingguhuza umutwe.

Iburira!

Byiza kugenzura yo wenyine, ntabwo ureba neza cyane. Nulla vitae elit libero, pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

  1. <div class = "kumenyesha integuza-guhagarika" >
  2. <a class = "close" data-dismiss = "alert" href = "#"> × </a> _
  3. <h4 urwego = " kumenyesha-umutwe" > Kuburira! </h4>
  4. Byiza kugenzura yo wenyine, ntabwo uri ...
  5. </div>

Ibindi bisobanuro Ongeraho amasomo yo guhitamo kugirango uhindure ibisobanuro

Ikosa cyangwa akaga

Yoo! Hindura ibintu bike hanyuma ugerageze kongera gutanga.
  1. <div class = "kumenyesha-kwibeshya" >
  2. ...
  3. </div>

Intsinzi

Muraho neza! Urasoma neza ubu butumwa bwingenzi bwo kumenyesha.
  1. <div class = "kumenyesha-gutsinda" >
  2. ...
  3. </div>

Amakuru

Umutwe! Uku kumenyesha gukeneye kwitabwaho, ariko ntabwo ari ngombwa cyane.
  1. <div class = "kumenyesha amakuru-amakuru" >
  2. ...
  3. </div>

Ingero na marike

Shingiro

Mburabuzi Iterambere umurongo hamwe na vertical gradient.

  1. <div class = "iterambere" >
  2. <div class = "akabari"
  3. style = " ubugari : 60 %; " > </div>
  4. </div>

Yanditse

Koresha icyiciro kugirango ukore ingaruka (nta IE).

  1. <div class = "amajyambere atera imbere" >
  2. <div class = "akabari"
  3. style = " ubugari : 20 %; " > </div>
  4. </div>

Animated

Fata urugero rwakuweho hanyuma ukarushushanya (nta IE).

  1. <div class = "amajyambere atera imbere
  2. ikora " >
  3. <div class = "akabari"
  4. style = " ubugari : 40 %; " > </div>
  5. </div>

Amahitamo hamwe nubufasha bwa mushakisha

Amabara yinyongera

Utubari twiterambere dukoresha bimwe mubuto bumwe no kumenyesha ibyiciro kuburyo buhoraho.

Utubari

Bisa namabara akomeye, twagiye dutandukanya imirongo yiterambere.

Imyitwarire

Utubari twiterambere dukoresha inzibacyuho ya CSS3, niba rero uhinduye muburyo bugari ukoresheje ubugari ukoresheje javascript, bizahinduka neza.

Niba ukoresheje .activeicyiciro, .progress-stripedutubari twawe twiterambere tuzahindura imirongo ibumoso iburyo.

Inkunga ya mushakisha

Utubari twiterambere dukoresha CSS3 gradients, inzibacyuho, na animasiyo kugirango ugere ku ngaruka zabo zose. Ibiranga ntabwo bishyigikiwe muri IE7-9 cyangwa verisiyo ishaje ya Firefox.

Opera na IE ntabwo bashyigikiye animasiyo muriki gihe.

Iriba

Koresha neza nkibintu byoroshye kubintu kugirango utange inset.

Dore ndi mu iriba!
  1. <div class = "neza" >
  2. ...
  3. </div>

Funga agashusho

Koresha igishushanyo rusange cyo gufunga kugirango wirukane ibirimo nka moderi no kumenyesha.

  1. <buto icyiciro = "gufunga" > & ibihe; </button>

Ibikoresho bya iOS bisaba href = "#" kugirango ukande ibyabaye niba uhisemo gukoresha inanga.

  1. <a class = "close" href = "#"> & ibihe; </a>