Di tin dɛn we de insay di bɔdi

Dɛn bil bɔku bɔku kɔmpɔnɛnt dɛn we pɔsin kin yuz bak insay Bootstrap fɔ gi nevigishɔn, alɛt, popovers, ɛn bɔku ɔda tin dɛn.

Bɔtin grup dɛn

Yuz bɔtin grup dɛn fɔ jɔyn bɔku bɔtin dɛn togɛda as wan kɔmpɔzit kɔmpɔnɛnt. Bil dɛn wit wan siriɔs <a>ɔ <button>ɛlimɛnt dɛn.

Di bɛst we fɔ du tin

Wi kin advays yu fɔ yuz di bɔtin grup dɛn ɛn di tulba dɛn we de dɔŋ ya:

  • Yuz di sem ɛlimɛnt ɔltɛm na wan bɔtin grup, <a>ɔ <button>.
  • Nɔ miks bɔtin dɛn we gɛt difrɛn kɔlɔ dɛn na di sem bɔtin grup.
  • Yuz aykɔn dɛn apat frɔm ɔ insted fɔ tɛks, bɔt mek shɔ se yu put alt ɛn taytul tɛks usay i fayn.

Rilayt Bɔtin grup dɛn we gɛt drɔpdɔwn (luk dɔŋ ya) fɔ kɔl aut sɛpret ɛn ɔltɛm dɛn fɔ gɛt drɔpdɔwn caret fɔ sho di we aw dɛn want fɔ biev.

Difɔlt ɛgzampul

Na so di HTML de luk fɔ wan standad bɔtin grup we dɛn bil wit ankɔ tag bɔtin dɛn:

  1. <div klas = "btn-grup" >
  2. <bɔtin klas = "btn" > 1 </bɔtin>
  3. <bɔtin klas = "btn" > 2 </bɔtin>
  4. <bɔtin klas = "btn" > 3 </bɔtin>
  5. </div> fɔ di wan dɛn we de

Tulba ɛgzampul

Kɔmbayn sɛt dɛn fɔ <div class="btn-group">insay wan <div class="btn-toolbar">fɔ mɔ kɔmpleks kɔmpɔnɛnt dɛn.

  1. <div klas = "btn-tulba" >
  2. <div klas = "btn-grup" >
  3. ...
  4. </div> fɔ di wan dɛn we de
  5. </div> fɔ di wan dɛn we de

Chekbɔks ɛn redio flawa dɛn

Bɔtin grup dɛn kin wok bak lɛk redio, usay na wan bɔtin nɔmɔ kin wok, ɔ chɛk bɔks dɛn, usay ɛni nɔmba pan di bɔtin dɛn kin wok. Luk di JavaSkript dɔkyumɛnt dɛn fɔ dat.

Get di javaskript »

Drɔpdɔwn dɛn na di bɔtin grup dɛn

Hed dɛn de ɔp! Bɔtin dɛn we gɛt drɔpdɔwn dɛn fɔ rap dɛn wan bay wan .btn-groupinsay wan .btn-toolbarfɔ mek dɛn rɛnd dɛn fayn fayn wan.

Di bɔtin dɛn we de drɔp

Ɛgzampul fɔ mak

Semweso lɛk bɔtin grup, wi mak de yuz rɛgyula bɔtin mak, bɔt wit wan anful adishɔn fɔ rifin di stayl ɛn sɔpɔt Bootstrap in drɔpdɔwn jQuery plɔgin.

  1. <div klas = "btn-grup" >
  2. <a klas = "btn drɔpdɔwn-tɔgl" data-tɔgl = "drɔpdɔwn" href = "#" >
  3. Du
  4. <span klas = "kɛrɛt" ></span>
  5. </a> fɔ di wan dɛn we de
  6. <ul klas = "drɔpdɔwn-mɛnyu" >
  7. <!-- drɔpdɔwn mɛnyu link dɛn -->
  8. </ul> fɔ di wan dɛn we de
  9. </div> fɔ di wan dɛn we de

I de wok wit ɔl di bɔtin saiz dɛn

Di bɔtin dɛn we de drɔp de wok pan ɛni saiz. yu bɔtin saiz dɛn to .btn-large, .btn-small, ɔ .btn-mini.

I nid fɔ gɛt javascript

Bɔtin drɔpdɔwn dɛn nid di Bootstrap drɔpdɔwn plɔgin fɔ wok.

Sɔntɛnde—lɛk mobayl—drɔp-dɔwn mɛnyu dɛn go de na do na di say usay dɛn de si di tin dɛn. Yu nid fɔ sɔlv di alaynɛshɔn wit yu an ɔ wit kɔstɔm javaskript.


Split bɔtin dɛn we de drɔp dɔŋ

Ɔvaviu ɛn ɛgzampul dɛn

We wi bil pan di bɔtin grup stayl ɛn mak, wi kin mek wan split bɔtin izi wan. Split bɔtin dɛn gɛt wan standad akshɔn na di lɛft ɛn wan drɔpdɔwn tɔgl na di rayt say wit kɔntɛkstual link dɛn.

Sayz dɛn

Yuz di ekstra bɔtin klas dɛn .btn-mini, .btn-small, ɔ .btn-largefɔ sayz.

  1. <div klas = "btn-grup" >
  2. ...
  3. <ul klas = "drɔpdɔwn-mɛnyu pul-rayt" >
  4. <!-- drɔpdɔwn mɛnyu link dɛn -->
  5. </ul> fɔ di wan dɛn we de
  6. </div> fɔ di wan dɛn we de

Ɛgzampul fɔ mak

Wi de ɛkspɛn di nɔmal bɔtin drɔpdɔwn dɛn fɔ gi sɛkɔn bɔtin akshɔn we de wok as sɛpret drɔpdɔwn triga.

  1. <div klas = "btn-grup" >
  2. <bɔtin klas = "btn" > Akshɔn </bɔtin>
  3. <bɔtin klas = "btn drɔpdɔwn-tɔgl" data-tɔgl = "drɔpdɔwn" >
  4. <span klas = "kɛrɛt" ></span>
  5. </bɔtin>
  6. <ul klas = "drɔpdɔwn-mɛnyu" >
  7. <!-- drɔpdɔwn mɛnyu link dɛn -->
  8. </ul> fɔ di wan dɛn we de
  9. </div> fɔ di wan dɛn we de

Di meny dɛn we de drɔp

Yu kin chenj di drɔpdɔwn mɛnyu dɛn bak frɔm di bɔt ɔp bay we yu ad wan klas to di mama ɔ papa we de nia .dropdown-menu. I go flip di dairekshɔn fɔ di .caretɛn ripɔzishɔn di mɛnyu sɛf fɔ muf frɔm di bɔt ɔp instead fɔ muf ɔp dɔŋ.

  1. <div klas = "btn-grup drɔp" >
  2. <bɔtin klas = "btn" > Drɔp ap </bɔtin>
  3. <bɔtin klas = "btn drɔpdɔwn-tɔgl" data-tɔgl = "drɔpdɔwn" >
  4. <span klas = "kɛrɛt" ></span>
  5. </bɔtin>
  6. <ul klas = "drɔpdɔwn-mɛnyu" >
  7. <!-- drɔpdɔwn mɛnyu link dɛn -->
  8. </ul> fɔ di wan dɛn we de
  9. </div> fɔ di wan dɛn we de

Pej dɛn we gɛt bɔku bɔku pej dɛn

Ustɛm fɔ yuz am

Ultra simplistik ɛn minimal stayl pejineshɔn we dɛn inspɛkt frɔm Rdio, fayn fɔ ap ɛn sɔch rizɔlt dɛn. Di big blɔk at fɔ mis, i izi fɔ skel, ɛn i de gi big say dɛn fɔ klik.

Stetful pej link dɛn

Links kin kɔstɔmayz ɛn dɛn kin wok insay bɔku tin dɛn wit di rayt klas. .disabledfɔ link dɛn we yu nɔ go ebul fɔ klik ɛn .activefɔ di pej we de naw.

Fleksibul alaynɛshɔn

Ad ɛni wan pan tu opshɔnal klas dɛn fɔ chenj di alaynɛshɔn fɔ pej link dɛn: .pagination-centeredɛn .pagination-right.

Mak-ap fɔ di tin dɛn we de apin

We dɛn rap am wit wan <div>, pej na jɔs wan <ul>.

  1. <div klas = "pejineshɔn" >
  2. <ul> fɔ di wan dɛn we de
  3. <li><a href = "#" > Di wan dɛn we de bifo </a></li>
  4. <li klas = "aktiv" >
  5. <a href = "#" > 1 </a>
  6. </li> fɔ di wan dɛn we de
  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 = "#" > Nɛks </a></li>
  11. </ul> fɔ di wan dɛn we de
  12. </div> fɔ di wan dɛn we de

Pager Fɔ kwik kwik link dɛn we bin de bifo ɛn di nɛks wan dɛn

Na bɔt pej

Di pej kɔmpɔnɛnt na wan sɛt fɔ link fɔ simpul pej implimɛnt wit layt mak ɛn ivin layt stayl dɛn. I fayn fɔ simpul sayt dɛn lɛk blɔk ɔ magazin.

Opshɔnal disabled stet

Peja link dɛn de yuz di jenɛral .disabledklas bak frɔm di pejeshɔn.

Difɔlt ɛgzampul

Bay difɔlt, di pej de sɛnt di link dɛn.

  1. <ul klas = "peja" >
  2. <li> fɔ di wan dɛn we de
  3. <a href = "#" > Di wan dɛn we bin dɔn de bifo </a>
  4. </li> fɔ di wan dɛn we de
  5. <li> fɔ di wan dɛn we de
  6. <a href = "#" > Nɛks </a>
  7. </li> fɔ di wan dɛn we de
  8. </ul> fɔ di wan dɛn we de

Links dɛn we dɛn dɔn alaynɛd

Ɔda we de fɔ du dat, yu kin alaynɛd ​​ɛni link to di sayd dɛn:

  1. <ul klas = "peja" >
  2. <li klas = "we bin de bifo" >
  3. <a href = "#" > ɛn di wan dɛn we de na di wɔl. Di wan dɛn we dɔn ol </a>
  4. </li> fɔ di wan dɛn we de
  5. <li klas = "nɛks" >
  6. <a href = "#" > Nyu wan → </a> fɔ di wan dɛn we de
  7. </li> fɔ di wan dɛn we de
  8. </ul> fɔ di wan dɛn we de
Lebul dɛn Mak-ap fɔ di tin dɛn we de apin
Balans <span class="label">Default</span>
Go bifo <span class="label label-success">Success</span>
Wɔnin <span class="label label-warning">Warning</span>
Impɔtant <span class="label label-important">Important</span>
Info <span class="label label-info">Info</span>
Invas fɔ di Baybul <span class="label label-inverse">Inverse</span>

Bɔt

Badge na smɔl, simpul kɔmpɔnɛnt dɛn fɔ sho wan indikɛtɔ ɔ kɔnt ɔf sɔm kayn. Dɛn kin de na imel klaynt dɛn lɛk Mail.app ɔ na mobayl ap fɔ push notis.

Klas dɛn we de

Nem Ɛgzampul Mak-ap fɔ di tin dɛn we de apin
Balans 1. Di wan dɛn we de <span class="badge">1</span>
Go bifo 2. Di wan dɛn we de <span class="badge badge-success">2</span>
Wɔnin 4. Di wan dɛn we de <span class="badge badge-warning">4</span>
Impɔtant 6. Di wan dɛn we de <span class="badge badge-important">6</span>
Info 8. Di wan dɛn we de <span class="badge badge-info">8</span>
Invas fɔ di Baybul 10. Di wan dɛn we de <span class="badge badge-inverse">10</span>

Hiro yunit

Bootstrap de gi yu wan layt, fleksibul kɔmpɔnɛnt we dɛn kɔl hiro yunit fɔ sho di tin dɛn we de insay yu sayt. I de wok fayn pan sayt dɛn we gɛt bɔku bɔku tin dɛn fɔ sɛl ɛn we gɛt bɔku tin dɛn fɔ du.

Mak-ap fɔ di tin dɛn we de apin

Rap yu kɔntinyu insay wan divlɛk so:

  1. <div klas = "hiro-yunit" >
  2. <h1> Ɛd fɔ </h1>
  3. <p> Taglayn </p>
  4. <p> fɔ di wan dɛn we de
  5. <a klas = "btn btn-praymari btn-big" >
  6. Lan mɔ bɔt dis
  7. </a> fɔ di wan dɛn we de
  8. </p>we de sho aw fɔ du dat
  9. </div> fɔ di wan dɛn we de

Halo, wɔl!

Dis na simpul hiro yunit, wan simpul jumbotron-stayl kɔmpɔnɛnt fɔ kɔl ɛkstra atɛnshɔn to fichu kɔntinyu ɔ infɔmeshɔn.

Lan mɔ bɔt dis

Di pej we de na di pej

Wan simpul shel fɔ wan h1fɔ apɔpriet spɛs aut ɛn sɛgmɛnt sɛkshɔn dɛn fɔ kɔntinyu na wan pej. I kin yuz di h1's difɔlt small, ɛlimɛnt ɛn mɔs ɔda kɔmpɔnɛnt dɛn (wit ɔda stayl dɛn).

  1. <div klas = "pej-hɛda" >
  2. <h1> Ɛgzampul pej hεda </h1>
  3. </div> fɔ di wan dɛn we de

Difɔlt smɔl pikchɔ dɛn

Bay difɔlt, dɛn mek Bootstrap in smɔl pikchɔ dɛn fɔ sho pikchɔ dɛn we gɛt link wit smɔl mak we dɛn nid.

I rili kɔstɔmayz

Wit smɔl ɛkstra mak, i pɔsibul fɔ ad ɛni kayn HTML kɔntinyu lɛk ɛd, paregraf, ɔ bɔtin dɛn insay smɔl pikchɔ dɛn.

  • Lebul fɔ di smɔl pikchɔ dɛn

    Kras jɔsto odio, dapibus asid fasilisis in, egestas eget quam. Donec id elit non mi porta gravida na eget metus. Nullam id dolor id nibh ultrisis vehikula ut id elit.

    Du Du

  • Lebul fɔ di smɔl pikchɔ dɛn

    Kras jɔsto odio, dapibus asid fasilisis in, egestas eget quam. Donec id elit non mi porta gravida na eget metus. Nullam id dolor id nibh ultrisis vehikula ut id elit.

    Du Du

Wetin mek yu yuz smɔl pikchɔ dɛn

Thumbnails (we bin de bifo .media-gridte to v1.4) fayn fɔ grid dɛn fɔ foto ɔ fim dɛn, pikchɔ sɔch rizɔlt dɛn, rital prɔdak dɛn, pɔtfolio dɛn, ɛn bɔku ɔda tin dɛn. Dɛn kin bi link ɔ statik kɔntinyu.

Simpul, fleksibul mak-ap

Thumbnail markup na simpul tin—a ulwit ɛni nɔmba fɔ di liɛlimɛnt dɛn na ɔl wetin dɛn nid. I de tu supa fleksibul, alaw fɔ ɛni kayn kɔntinyu wit jɔs smɔl mɔ mak fɔ rap yu kɔntinyu.

Yuz grid kɔlɔm saiz dɛn

Las wan, di thumbnails kɔmpɔnɛnt de yuz di grid sistem klas dɛn we dɔn de—lɛk .span2ɔ .span3—fɔ kɔntrol di thumbnail dimɛnshɔn dɛn.

Di mak-ap

As wi bin dɔn tɔk, di mak we dɛn nid fɔ mek di smɔl pikchɔ dɛn layt ɛn i nɔ izi fɔ yuz. Na dis na wan luk pan di difɔlt sɛtup fɔ linked pikchɔ dɛn :

  1. <ul klas = "smɔl pikchɔ dɛn" >
  2. <li klas = "span3" >
  3. <a href = "#" klas = "smɔl pikchɔ" >
  4. <img src = "https://pleshold.it/260x180" alt = "" >
  5. </a> fɔ di wan dɛn we de
  6. </li> fɔ di wan dɛn we de
  7. ...
  8. </ul> fɔ di wan dɛn we de

Fɔ kɔstɔm HTML kɔntinyu insay smɔl pikchɔ dɛn, di mak kin chenj smɔl. Fɔ alaw blɔk lɛvɛl kɔntinyu ɛnisay, wi de swap di <a>fɔ wan <div>lɛk so:

  1. <ul klas = "smɔl pikchɔ dɛn" >
  2. <li klas = "span3" >
  3. <div klas = "smɔl pikchɔ" >
  4. <img src = "https://pleshold.it/260x180" alt = "" >
  5. <h5> Lebul fɔ di smɔl pikchɔ dɛn </h5>
  6. <p> Thumbnail kapshɔn rayt ya... </p>
  7. </div> fɔ di wan dɛn we de
  8. </li> fɔ di wan dɛn we de
  9. ...
  10. </ul> fɔ di wan dɛn we de

Mɔ ɛgzampul dɛn

Eksplɔrɔ ɔl yu opshɔn dɛn wit di difrɛn grid klas dɛn we de fɔ yu. Yu kin miks ɛn mach difrɛn sayz dɛn bak.

Difɔlt dɛn we laytwɛt

Rirayt bays klas

Wit Bootstrap 2, wi don simpul di bes klas: .alertinsted of .alert-message. Wi dɔn ridyus bak di smɔl mak we dɛn nid—nɔ <p>nid fɔ de bay difɔlt, jɔs di ɔda <div>wan .

Single alert mɛsej

Fɔ wan mɔ durable kɔmpɔnɛnt wit less kɔd, wi dɔn pul di difrɛns luk fɔ blɔk alɛt, mɛsej dɛn we kam wit mɔ pad ɛn tipikli mɔ tɛks. Di klas sɛf dɔn chenj to .alert-block.


Go gud gud wan wit javascript

Bootstrap kam wit wan fayn jQuery plɔgin we de sɔpɔt alɛt mɛsej dɛn, we de mek fɔ dismis dɛn kwik ɛn izi.

Get di plɔgin »

Ɛgzampul alɛt dɛn

Rap yu mɛsej ɛn wan opshɔnal klos aykɔn insay wan div wit simpul klas.

Wɔnin! Best check yo self, yu no luk tu gud.
  1. <div klas = "alɛt" >
  2. <bɔt klas = "klos" data-dismis = "alɛt" > × </bɔtin>
  3. <strong> Na wɔnin! </strong> Best check yo self, yu no de luk tu gud.
  4. </div> fɔ di wan dɛn we de

Hed dɛn de ɔp! iOS divays dɛn nid wan href="#"fɔ di dismisal fɔ di alɛt dɛn. Mek shɔ se yu put am ɛn di data atribyut fɔ ankɔ klos aykɔn dɛn. Ɔda we de fɔ du dat, yu kin yuz wan <button>ɛlimɛnt wit di data atribyut, we wi dɔn pik fɔ du fɔ wi dɔkyumɛnt dɛn. We yu de yuz <button>, yu fɔ put type="button"am ɔ yu fɔm dɛn nɔ go sɛn.

I izi fɔ ɛkstɛnd di standad alɛt mɛsej wit tu opshɔnal klas dɛn: .alert-blockfɔ mɔ pad ɛn tɛks kɔntrol ɛn .alert-headingfɔ wan edlayn we de mach.

Wɔnin!

Best check yo self, yu no de luk tu gud. Nulla vitae elit libero, we na wan pharetra augu. Praesent commodo cursus magna, vel scelerisk nisl kɔnsɛkt ɛn.

  1. <div klas = "alɛt alert-blɔk" >
  2. <a klas = "klos" data-dismis = "alɛt" href = "#" > × </a>
  3. <h4 klas = "alɛt-hɛdin" > Wɔnin! </h4> fɔ di wan dɛn we de
  4. Best check yo self, yu no...
  5. </div> fɔ di wan dɛn we de

Kɔntekst ɔltɛrnativ Ad opshɔnal klas dɛn fɔ chenj wan alɛt in kɔnotashɔn

Mistek ɔ denja

Oh snap! Chenj sɔm tin dɛn ɔp ɛn tray fɔ sɛn am bak.
  1. <div klas = "alɛt alert-ɛrɔd" >
  2. ...
  3. </div> fɔ di wan dɛn we de

Go bifo

Wɛl dɔn! Yu rid dis impɔtant mɛsej fɔ wɔn yu fayn fayn wan.
  1. <div klas = "alɛt alert-sakses" >
  2. ...
  3. </div> fɔ di wan dɛn we de

Tin dɛn

Hed dɛn de ɔp! Dis alert nid yu atɛnshɔn, bɔt i nɔ rili impɔtant.
  1. <div klas = "alɛt alɛt-infɔ" >
  2. ...
  3. </div> fɔ di wan dɛn we de

Ɛgzampul dɛn ɛn mak-ap

Men

Difɔlt prɔgrɛs bar wit wan vertikal grɛdiɛnt.

  1. <div klas = "prɔgrɛs" >
  2. <div klas = "bar".
  3. stayl = " wit : 60 %; " ></div>
  4. </div> fɔ di wan dɛn we de

Striped we gɛt strɛp

Yuz wan gradient fɔ mek wan strɛp ifɛkt (nɔ gɛt IE).

  1. <div klas = "prɔgrɛs prɔgrɛs-strip" >
  2. <div klas = "bar".
  3. stayl = " wit : 20 %; " ></div>
  4. </div> fɔ di wan dɛn we de

Animashɔn we dɛn mek

Tek di strɛp ɛgzampul ɛn animate am (nɔ IE).

  1. <div klas = "prɔgrɛs prɔgrɛs-strip."
  2. aktif" >
  3. <div klas = "bar".
  4. stayl = " wit : 40 %; " ></div>
  5. </div> fɔ di wan dɛn we de

Opshɔn dɛn ɛn sɔpɔt fɔ di brɔwza

Ɔda kɔlɔ dɛn

Progrɛs bar dɛn de yuz sɔm pan di sem bɔtin ɛn alɛt klas dɛn fɔ stayl dɛn we nɔ de chenj.

Bar dɛn we gɛt strɛp

Semweso lɛk di sɔlid kɔlɔ dɛn, wi gɛt difrɛn strɛp prɔgrɛs bar dɛn.

Biev

Progres bar dɛn de yuz CSS3 transishɔn dɛn, so if yu dinamik wan ajɔst di wit via javascript, i go chenj di sayz fayn fayn wan.

If yu yuz di .activeklas, yu .progress-stripedprɔgrɛs bar dɛn go mek di strɛp dɛn gɛt layf frɔm lɛft to rayt.

Brawza sɔpɔt

Progres bar dɛn de yuz CSS3 gradient, transishɔn, ɛn animashɔn fɔ ajɔst ɔl dɛn ifɛkt dɛn. Dɛn tin ya nɔ de sɔpɔt na IE7-9 ɔ ol wan dɛn fɔ Fayafaks.

Opera ɛn IE nɔ de sɔpɔt animashɔn dɛn dis tɛm.

Wɛls

Yuz di wɛl as simpul ifɛkt pan wan ɛlimɛnt fɔ gi am insɛt ifɛkt.

Luk, a de insay wan wɛl!
  1. <div klas = "wɛl" >
  2. ...
  3. </div> fɔ di wan dɛn we de

Klos di aykɔn

Yuz di jenɛrik klos aykɔn fɔ dismis kɔntinyu lɛk modal ɛn alɛt.

  1. <bɔtin klas = "klos" > &tayms; </bɔtin>

iOS divays dɛn nid fɔ gɛt href="#" fɔ klik ivin if yu lɛk fɔ yuz ankɔ.

  1. <a klas = "klos" href = "#" > &taym dɛn; </a> fɔ di wan dɛn we de