O le tele o vaega toe faʻaaogaina ua fausia i totonu o Bootstrap e tuʻuina atu ai faʻasalalauga, faʻaaliga, popovers, ma sili atu.
Fa'atosina fa'afaigofie ma la'ititi la'ititi na fa'aosoina e le Rdio, lelei mo polokalame ma fa'ai'uga su'esu'e. O le poloka tele e faigata ona misi, faigofie ona faʻaleleia, ma maua ai vaega tetele kiliki.
O feso'ota'iga e fa'avasegaina ma galue i le tele o tulaga ma le vasega sa'o. .disabled
mo so'otaga e le mafai ona kiliki ma .active
mo itulau o lo'o iai nei.
Fa'aopoopo se tasi o vasega e lua e filifili e sui ai le fa'aogaina o feso'ota'iga pagination: .pagination-centered
ma .pagination-right
.
Ole vaega ole pagination e fa'aogaina e fetu'una'i ma galue i le tele o fesuiaiga.
A'ai i se <div>
, fa'akomepiuta ua na'o se <ul>
.
- <div class = "fa'asinomaga" >
- <ul>
- <li><a href = "#" > Muamua </a></li>
- <li vasega = "toaga" >
- <a href = "#" > 1 </a>
- </li>
- <li><a href = "#" > 2 </a></li>
- <li><a href = "#" > 3 </a></li>
- <li><a href = "#" > 4 </a></li>
- <li><a href = "#" > Sosoo </a></li>
- </ul>
- </div>
O le vaega pager o se seti o fesoʻotaʻiga mo faʻatinoga faigofie pagination faʻatasi ai ma faʻailoga malamalama ma e oʻo lava i sitaili mama. E manaia tele mo nofoaga faigofie e pei o blogs poʻo mekasini.
O feso'ota'iga Pager e fa'aogaina fo'i le .disabled
vasega lautele mai le fa'ailoga.
Ona o le faaletonu, o le pager e totonugalemu sootaga.
- <ul class = "pager" >
- <li>
- <a href = "#" > Muamua </a>
- </li>
- <li>
- <a href = "#" > Sosoo </a>
- </li>
- </ul>
Fa'ailoga | Fa'ailoga |
---|---|
Fa'atonu | <span class="label">Default</span> |
Manuia | <span class="label label-success">Success</span> |
Lapataiga | <span class="label label-warning">Warning</span> |
Taua | <span class="label label-important">Important</span> |
Fa'amatalaga | <span class="label label-info">Info</span> |
Fa'afeagai | <span class="label label-inverse">Inverse</span> |
O pine o ni vaega laiti, faigofie mo le fa'aalia o se fa'ailoga po'o se numera o se ituaiga. E masani ona maua ile imeli e pei ole Mail.app po'o luga ole telefoni feavea'i mo fa'amatalaga tulei.
Igoa | Faataitaiga | Fa'ailoga |
---|---|---|
Fa'atonu | 1 | <span class="badge">1</span> |
Manuia | 2 | <span class="badge badge-success">2</span> |
Lapataiga | 4 | <span class="badge badge-warning">4</span> |
Taua | 6 | <span class="badge badge-important">6</span> |
Fa'amatalaga | 8 | <span class="badge badge-info">8</span> |
Fa'afeagai | 10 | <span class="badge badge-inverse">10</span> |
O le Bootstrap e maua ai se vaega mama, fetuutuunai e taʻua o le hero unit e faʻaalia ai mea i luga o lau 'upega tafaʻilagi. E galue lelei i luga o maketi ma mea-mamafa nofoaga.
Afifi lau anotusi i se div
tulaga faapea:
- <div class = "toa-unite" >
- <h1> Ulutala </h1>
- <p> Fa'ailoga igoa </p>
- <p>
- <a vasega = "btn btn-primary btn-tele" >
- Aoao atili
- </a>
- </p>
- </div>
O se vaega toa faigofie lea, o se vaega faigofie jumbotron-style mo le vala'au atili atu i mea fa'aalia po'o fa'amatalaga.
O se atigi faigofie mo se h1
avanoa talafeagai ma vaelua vaega o anotusi i luga o se itulau. E mafai ona fa'aogaina le h1
's default small
, elemene fa'apea le tele o isi vaega (fa'atasi ai ma sitaili fa'aopoopo).
- <div class = "itulau-ulutala" >
- <h1> Faataitaiga ulutala itulau </h1>
- </div>
Ona o le faaletonu, ua mamanuina ata laiti a Bootstrap e faʻaalia ata fesoʻotaʻi ma sina faʻailoga manaʻomia.
Faatasi ai ma sina faʻailoga faʻaopoopo, e mafai ona faʻaopoopo soʻo se ituaiga o mea HTML pei o ulutala, parakalafa, poʻo faʻamau i totonu o ata.
O ata laiti (muamua .media-grid
seia oo i le v1.4) e lelei tele mo fa'asologa o ata po'o vitiō, fa'ai'uga o su'esu'ega ata, oloa fa'atau oloa, fa'amaumauga, ma le tele o isi mea. E mafai ona avea ma so'oga po'o mea fa'amautu.
E faigofie lava le fa'ailoga o le la'ititi—a ul
ma so'o se numera o li
elemene na'o mea e mana'omia. E sili fo'i ona fetu'una'i, fa'ataga mo so'o se ituaiga o anotusi ma na'o sina fa'ailoga e afifi ai au mea.
O le mea mulimuli, e fa'aogaina e le vaega o ata laititi vasega o faiga fa'avasega o lo'o iai—pei .span2
po'o le .span3
—mo le fa'atonutonuina o le tele o ata.
E pei ona taʻua muamua, o le faʻailoga manaʻomia mo ata laiti e mama ma tuusaʻo. O se va'aiga lea i le seti fa'aletonu mo ata feso'ota'i :
- <ul class = "tusia" >
- <li vasega = "span3" >
- <a href = "#" vasega = "tusia" >
- <img src = "https://placehold.it/260x180" alt = "" >
- </a>
- </li>
- ...
- </ul>
Mo mea masani HTML i ata, o le faʻailoga e suia teisi. Ina ia faʻataga le poloka poloka i soʻo se mea, matou te fesuiaʻi le <a>
mo se <div>
faʻapea:
- <ul class = "tusia" >
- <li vasega = "span3" >
- <div class = "tusia" >
- <img src = "https://placehold.it/260x180" alt = "" >
- <h5> Fa'ailoga laititi </h5>
- <p> Fa'amatalaga ata i'i... </p>
- </div>
- </li>
- ...
- </ul>
Faatasi ai ma le Bootstrap 2, ua matou faafaigofieina le vasega faavae: .alert
nai lo le .alert-message
. Ua matou faʻaititia foʻi le faʻailoga pito i lalo e manaʻomia - leai <p>
e manaʻomia ona o le faaletonu, naʻo le pito i fafo <div>
.
Mo se vaega e sili atu le umi ma le itiiti ifo o le code, ua matou aveesea le vaʻaiga vaʻaia mo faʻasalalauga poloka, feʻau e oʻo mai ma le tele o padding ma e masani lava ona sili atu tusitusiga. Ua suia foi le vasega i .alert-block
.
O le Bootstrap e sau ma se faʻapipiʻi tele jQuery e lagolagoina savali mataala, faʻateʻa vave ma faigofie.
Afi lau fe'au ma se fa'aikona tapuni e filifili i totonu o se div ma se vasega faigofie.
- <div class = "talatala" >
- <button class = "close" data-dismiss = "alert" > × </button>
- <strong> Lapataiga! </strong> Sili siaki oe lava ia, e te le o lelei tele.
- </div>
Ulu i luga! O masini iOS e manaʻomia se href="#"
mo le faʻateʻaina o faʻasalalauga. Ia mautinoa e aofia ai ma le uiga o faʻamatalaga mo ata vavalalata taula. I le isi itu, e mafai ona e faʻaogaina se <button>
elemene ma le faʻamatalaga uiga, lea na matou filifili e fai mo a matou pepa. A fa'aaoga le <button>
, e tatau ona e fa'aofi type="button"
pe le mafai ona tu'uina atu au fomu.
Fa'afaigofie ona fa'alautele le fe'au mataala fa'atasi ma ni vasega se lua e filifili ai: .alert-block
mo le tele o padding ma fa'atonuga o tusitusiga ma .alert-heading
mo se ulutala fetaui.
E sili le siaki ia oe lava, e te le o lelei tele. Nulla vitae elit libero, a pharetra augue. O le mea lea, o le mea moni, o le mea moni, o le fa'asoaina atu ma isi.
- <div class = "poloka mataala" >
- <a class = "close" data-dismiss = "alert" href = "#" > × </a>
- <h4 class = "alt-heading" > Lapataiga! </h4>
- E sili le siaki oe lava ia, e te le...
- </div>
- <div class = "alert alert-error" >
- ...
- </div>
- <div class = "alert alert-success" >
- ...
- </div>
- <div class = "alert alert-info" >
- ...
- </div>
Pa'u aga'i i luma fa'atasi ma le fa'asolo sa'o.
- <div class = "agai i luma" >
- <div vasega = "pa"
- style = " lautele : 60 %; " ></div>
- </div>
Fa'aaogā le fa'alili e fa'atupu ai se fa'ai'uga ta'oto (leai se IE).
- <div class = "agai i luma-fa'asolo" >
- <div vasega = "pa"
- style = " lautele : 20 %; " ></div>
- </div>
Ave le fa'ata'ita'iga fa'ailoga ma fa'aola (leai se IE).
- <div class = "agai i luma-fa'asolo
- malosi" >
- <div vasega = "pa"
- style = " lautele : 40 %; " ></div>
- </div>
E fa'aogaina e pa o le alualu i luma nisi o ki tutusa ma vasega mataala mo sitaili faifai pea.
E tutusa ma lanu mafiafia, e iai a matou pa'u fa'asolosolo laina eseese.
Fa'aoga pa'u o le alualu i luma CSS3 suiga, o lea afai e te fetuutuunai malosi le lautele e ala i le javascript, o le a sologa lelei le suiga.
Afai e te fa'aogaina le .active
vasega, .progress-striped
o le a fa'aola e au pa'u aga'i i luma ta'i mai le agavale i le taumatau.
Fa'aoga pa o le alualu i luma CSS3 gradients, suiga, ma fa'afiafiaga e ausia uma ai o latou aafiaga. O nei foliga e le lagolagoina i le IE7-9 poʻo faʻasologa tuai o Firefox.
Opera ma IE e le lagolagoina fa'afiafiaga i le taimi nei.
Fa'aoga le vaieli e fai ma fa'aoga faigofie i luga o se elemene e tu'uina atu i ai se aafiaga fa'aofi.
- <div class = "lelei" >
- ...
- </div>
Fa'aoga le fa'aigoa tapuni lautele mo le fa'ate'aina o mea e pei o fa'ata'ita'iga ma fa'aaliga.
- <button class = "close" > &taimi; </fa'amau>
O masini iOS e mana'omia se href="#" mo kiliki mea e tutupu pe afai e te mana'o e fa'aoga se taula.
- <a vasega = "latalata" href = "#" > &taimi; </a>