Ọtụtụ akụrụngwa enwere ike iji rụọ ọrụ iji nye igodo, ọkwa, popovers na ndị ọzọ.
Enwere ike ịgbanwee, menu onodu okirikiri maka igosipụta ndepụta njikọ. Ejiri ngwa mgbakwunye Javascript emekọrịta ihe .
- <ul klaasị = "ndropdown-menu" ọrụ = "menu" aria-labelledby = "dropdownMenu" >
- <li><a tabindex = "-1" href = "#" > Omume </a></li>
- <li><a tabindex = "-1" href = "#" > Omume ọzọ </a></li>
- <li><a tabindex = "-1" href = "#" > Ihe ọzọ ebe a </a></li>
- <li klas = "onye nkesa" </li>
- <li><a tabindex = "-1" href = "#" > Njikọ dị iche </a></li>
- </ul>
Na-ele anya naanị menu ndọpụta, nke a bụ HTML achọrọ. Ịkwesịrị kechie mkpalite dropdown na menu dropdown n'ime .dropdown
, ma ọ bụ ihe ọzọ na-ekwupụta position: relative;
. Mgbe ahụ dị nnọọ mepụta menu.
- <div klas = "mkpọda" >
- <!-- Njikọ ma ọ bụ bọtịnụ ka ịgbanwee dropdown -->
- <ul class = "nchịkọta-nchịkọta-n'ala " ọrụ = "menu" aria-labelledby = "dLabel" >
- <li><a tabindex = "-1" href = "#" > Omume </a></li>
- <li><a tabindex = "-1" href = "#" > Omume ọzọ </a></li>
- <li><a tabindex = "-1" href = "#" > Ihe ọzọ ebe a </a></li>
- <li klas = "onye nkesa" </li>
- <li><a tabindex = "-1" href = "#" > Njikọ dị iche </a></li>
- </ul>
- </div>
Hazie menus n'aka nri ma gbakwunye gụnyere ọkwa mgbada agbakwunyere.
Tinye .pull-right
na a .dropdown-menu
n'aka nri kwado menu ndọpụta.
- <ul class = "ndokwada-menu pull-right" ọrụ = "menu" aria-labeledby = "dLabel" >
- ...
- </ul>
Tinye .disabled
na a <li>
na ndọpụta iji gbanyụọ njikọ ahụ.
- <ul klaasị = "ndropdown-menu" ọrụ = "menu" aria-labelledby = "dropdownMenu" >
- <li><a tabindex = "-1" href = "#" > Njikọ oge niile </a></li>
- <li class = "nkwarụ" ><a tabindex = "-1" href = "#" > Njikọ agbanyụrụ </a></li>
- <li><a tabindex = "-1" href = "#" > Njikọ ọzọ </a></li>
- </ul>
Tinye mgbakwunye ọkwa nke menus dropdown, na-apụta na hover dị ka nke OS X, yana ụfọdụ mgbakwunye akara dị mfe. Tinye .dropdown-submenu
na nke ọ bụla li
na menu ndọpụta dị maka ịke akpaka.
- <ul class = "nchịkọta-nchịkọta-n'ala " ọrụ = "menu" aria-labelledby = "dLabel" >
- ...
- <li klaasị = "dopụta-submenu" >
- <a tabindex = "-1" href = "#" > Nhọrọ ndị ọzọ </a>
- <ul klas = "ndropdown-menu" >
- ...
- </ul>
- </li>
- </ul>
Mpempe akwụkwọ dị mfe sitere na Rdio, mara mma maka ngwa na nsonaazụ ọchụchọ. Nnukwu ngọngọ siri ike ịgbaghara, na-adị mfe ịrị elu, ma na-enye nnukwu mpaghara pịa.
- <div klas = "pagination" >
- <ul>
- <li><a href = "#" > Nke gara aga </a></li>
- <li><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 = "#" > 5 </a></li>
- <li><a href = "#" > Ọzọ </a></li>
- </ul>
- </div>
Enwere ike ịhazi njikọ maka ọnọdụ dị iche iche. Jiri .disabled
maka njikọ enweghị ike ịpị yana .active
igosi ibe dị ugbu a.
- <div klas = "pagination" >
- <ul>
- <li class = "nkwarụ" ><a href = "#" > « </a></li>
- <li class = "ọrụ" ><a href = "#" > 1 </a></li>
- ...
- </ul>
- </div>
Ị nwere ike gbanwee arịlịka na-arụ ọrụ ma ọ bụ nwere nkwarụ maka ogologo oge iji wepụ ọrụ pịa ma na-ejigide ụdị ndị e bu n'obi.
- <div klas = "pagination" >
- <ul>
- <li class = "nkwarụ" ><span> « </span></li>
- <li class = "arụ ọrụ" ><span> 1 </span></li>
- ...
- </ul>
- </div>
Ọ na-amasị gị ibu ma ọ bụ obere pagination? Tinye .pagination-large
, .pagination-small
, ma ọ bụ .pagination-mini
maka nha ndị ọzọ.
- <div class = "pagination pagination-large" >
- <ul>
- ...
- </ul>
- </div>
- <div klas = "pagination" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "pagination pagination-small" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "pagination pagination-mini" >
- <ul>
- ...
- </ul>
- </div>
Tinye otu n'ime klaasị abụọ nhọrọ iji gbanwee nhazi njikọ pagination: .pagination-centered
na .pagination-right
.
- <div class = "pagination pagination-centered" >
- ...
- </div>
- <div class = "pagination pagination-right" >
- ...
- </div>
Njikọ ngwa ngwa gara aga na nke na-esote maka mmejuputa pagination dị mfe nwere akara ọkụ na ụdị. Ọ dị mma maka saịtị dị mfe dị ka blọọgụ ma ọ bụ akwụkwọ akụkọ.
Site na ndabara, ebe nrụọrụ pager na-ejikọta njikọ.
- <ul klas = "pager" >
- <li><a href = "#" > Nke gara aga </a></li>
- <li><a href = "#" > Ọzọ </a></li>
- </ul>
N'aka nke ọzọ, ị nwere ike ịhazi njikọ ọ bụla n'akụkụ:
- <ul klas = "pager" >
- <li klas = "buburu" >
- <a href = "#" > ← Oke </a>
- </li>
- <li klas = "na-esote" >
- <a href = "#" > Ọhụrụ → </a>
- </li>
- </ul>
Njikọ Pager na-ejikwa .disabled
klas ịba uru izugbe sitere na pagination.
- <ul klas = "pager" >
- <li klaasị = "enwere nkwarụ na mbụ" >
- <a href = "#" > ← Oke </a>
- </li>
- ...
- </ul>
Akara aha | Akara akara |
---|---|
Ọdabara | <span class="label">Default</span> |
Ihe ịga nke ọma | <span class="label label-success">Success</span> |
Ịdọ aka ná ntị | <span class="label label-warning">Warning</span> |
Ihe dị mkpa | <span class="label label-important">Important</span> |
Ozi | <span class="label label-info">Info</span> |
Ngbanwe | <span class="label label-inverse">Inverse</span> |
Aha | Ọmụmaatụ | Akara akara |
---|---|---|
Ọdabara | 1 | <span class="badge">1</span> |
Ihe ịga nke ọma | 2 | <span class="badge badge-success">2</span> |
Ịdọ aka ná ntị | 4 | <span class="badge badge-warning">4</span> |
Ihe dị mkpa | 6 | <span class="badge badge-important">6</span> |
Ozi | 8 | <span class="badge badge-info">8</span> |
Ngbanwe | 10 | <span class="badge badge-inverse">10</span> |
Maka mmemme dị mfe, akara na baajị ga-ada naanị (site na onye na :empty
-ahọrọ CSS) mgbe enweghị ọdịnaya dị n'ime.
Ngwa dị fechaa, na-agbanwe agbanwe iji gosipụta ọdịnaya dị na saịtị gị. Ọ na-arụ ọrụ nke ọma na ahịa na saịtị ọdịnaya-dị arọ.
Nke a bụ otu dike dị mfe, ngwa ngwa jumbotron dị mfe maka ịkpọkwu nlebara anya na ọdịnaya ma ọ bụ ozi egosipụtara.
- <div klas = "hero-unit" >
- <h1> Isi </h1>
- <p> Mkpado </p>
- <p>
- <a klas = "btn btn-primary btn-large" >
- Mụtakwuo
- </a>
- </p>
- </div>
Shei dị mfe maka h1
ịpụpụ n'ụzọ kwesịrị ekwesị na akụkụ nke ọdịnaya na ibe. Ọ nwere ike iji nke h1
ndabara small
, mmewere yana ọtụtụ ihe ndị ọzọ (nwere ụdị ndị ọzọ).
- <div class = "ibe-nkụnye ihe" >
- <h1> Ihe atụ nkụnye eji isi mee ibe <obere> Ederede maka nkụnye eji isi mee </small></h1>
- </div>
Site na ndabara, emebere obere mkpụkọ Bootstrap iji gosipụta onyonyo ejikọrọ na obere akara achọrọ.
N'iji ntakịrị nrịbama agbakwunyere, ọ ga-ekwe omume itinye ụdị ọdịnaya HTML ọ bụla dị ka isiokwu, paragraf, ma ọ bụ bọtịnụ n'ime obere mkpịsị aka.
Mkpịsị aka (nke gara aga .media-grid
ruo v1.4) dị mma maka grids nke foto ma ọ bụ vidiyo, nsonaazụ ọchụchọ onyonyo, ngwaahịa azụmaahịa, Pọtụfoliyo na ọtụtụ ndị ọzọ. Ha nwere ike ịbụ njikọ ma ọ bụ ọdịnaya kwụ ọtọ.
Mkpịsị mkpịsị mkpịsị aka dị mfe - ul
nwere ọnụọgụ ihe ọ bụla li
bụ naanị ihe achọrọ. Ọ dịkwa oke mgbanwe, na-enye ohere maka ụdị ọdịnaya ọ bụla nwere ntakịrị akara karịa iji kechie ọdịnaya gị.
N'ikpeazụ, akụrụngwa thumbnails na-eji klaasị sistemụ grid dị ugbu a-dị ka .span2
ma ọ bụ .span3
-maka njikwa nke akụkụ thumbnail.
Dịka ekwuru na mbụ, akara achọrọ maka obere mkpịsị aka dị mfe ma kwụ ọtọ. Nke a bụ lelee ntọala ndabara maka onyonyo ejikọrọ :
- <ul klas = "thumbnails" >
- <li klas = "span4" >
- <a href = "#" klaasị = "thumbnail" >
- <img data-src = " holder.js /300x200" alt = ""
- </a>
- </li>
- ...
- </ul>
Maka ọdịnaya HTML omenala na obere mkpịsị aka, akara ahụ na-agbanwe ntakịrị. Iji kwe ka ọdịnaya ngọngọ ngọngọ ebe ọ bụla, anyị na-agbanwe ya <a>
maka otu <div>
a:
- <ul klas = "thumbnails" >
- <li klas = "span4" >
- <div klas = "thumbnail" >
- <img data-src = " holder.js /300x200" alt = ""
- <h3> akara mkpịsị mkpịsị mkpịsị aka </h3>
- <p> Nkọwa okwu ntutuaka... </p>
- </div>
- </li>
- ...
- </ul>
Jiri klas grid dị iche iche chọgharịa nhọrọ gị niile. Ị nwekwara ike ịgwakọta ma kwekọọ nha dị iche iche.
Kechie ederede ọ bụla na bọtịnụ ịchụpụ nhọrọ .alert
maka ozi ịdọ aka na ntị bụ isi.
- <div class = "ọkwa" >
- < ụdị bọtịnụ = "bọtịnụ" klaasị = "emechi" data-dismiss = "alert" > & ugboro; </bọtịnụ>
- <strong> Ịdọ aka ná ntị! </strong> Lelee kacha mma maka onwe gị, ị naghị adị oke mma.
- </div>
Ihe nchọgharị Safari Mobile na Mobile Opera, na mgbakwunye na data-dismiss="alert"
njirimara ahụ, chọrọ href="#"
maka ịchụpụ ọkwa mgbe ị na-eji <a>
mkpado.
- <a href = "#" klaasị = "emechi" data-dismiss = "alert" > & ugboro; </a>
N'aka nke ọzọ, ịnwere ike iji <button>
mmewere nwere njirimara data, nke anyị họrọla ime maka doc anyị. Mgbe ị na-eji <button>
, ị ga-etinyerịrị type="button"
ma ọ bụ ụdị gị enweghị ike ịnyefe.
- < ụdị bọtịnụ = "bọtịnụ" klaasị = "emechi" data-dismiss = "alert" > & ugboro; </bọtịnụ>
Jiri ngwa mgbakwunye jQuery nkwuputa maka ịchụpụ ọkwa ngwa ngwa ma dị mfe.
Maka ozi dị ogologo, welie mpe mpe akwa na elu na ala nke mkpuchi njikere site na ịgbakwunye .alert-block
.
Kachasị mma ịlele onwe gị, ị naghị adị oke mma. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel selerisque nisl consectetur et.
- <div class = "njikere-block" >
- < ụdị bọtịnụ = "bọtịnụ" klaasị = "emechi" data-dismiss = "alert" > & ugboro; </bọtịnụ>
- <h4> Ịdọ aka ná ntị! </h4>
- Lelee onwe gị nke ọma, ị bụghị ...
- </div>
Tinye klaasị nhọrọ iji gbanwee nkọwa njikere.
- <div class = "Njehie nchegharị anya" >
- ...
- </div>
- <div class = "njikere-ihe ịga nke ọma" >
- ...
- </div>
- <div klaasị = "amara ọkwa-ozi" >
- ...
- </div>
Ogwe ọganihu na-aga nke ọma nwere gradient kwụ ọtọ.
- <div klas = "ọganihu" >
- <div class = "ogwe" ụdị = " obosara : 60 %; " ></ div>
- </div>
Na-eji gradient mepụta mmetụta dị warara. Ọ dịghị na IE7-8.
- <div klaasị = "ọganihu na-aga n'ihu" >
- <div class = "ogwe" ụdị = " obosara : 20 %; " ></ div>
- </div>
Tinye .active
n'ime .progress-striped
ka emee ahịrị ndị dị n'aka nri gaa n'aka ekpe. Ọ dịghị na ụdị IE niile.
- <div klaasị = "ọganihu ọganihu-na-arụsi ọrụ ike" >
- <div class = "ogwe" ụdị = " obosara : 40 %; " ></ div>
- </div>
Tinye ọtụtụ mmanya n'ime otu .progress
ka ikpokọta ha.
- <div klas = "ọganihu" >
- <div class = "ogwe mmanya-ihe ịga nke ọma" style = " obosara : 35 %; " ></ div>
- <div class = "bar-ịdọ aka ná ntị mmanya" ịke = " obosara : 20 %; " ></ div>
- <div class = "bar-danger" style = " obosara : 10 %; " ></ div>
- </div>
Ogwe na-aga n'ihu na-eji ụfọdụ bọtịnụ na klaasị njikere maka ụdị na-agbanwe agbanwe.
- <div klas = "ọganihu ọganihu-ozi" >
- <div class = "ogwe" ụdị = " obosara : 20 % " ></ div>
- </div>
- <div klas = "ọganihu ọganihu-ihe ịga nke ọma" >
- <div class = "ogwe" ụdị = " obosara : 40 % " ></ div>
- </div>
- <div class = "ọganiihu-ịdọ aka na ntị. "
- <div class = "ogwe" ụdị = " obosara : 60 % " ></ div>
- </div>
- <div klas = "ọganihu ọganihu-ihe egwu" >
- <div class = "bar" style = " obosara : 80 % " ></ div>
- </div>
Yiri agba siri ike, anyị nwere ogwe ọganihu dị iche iche dị iche iche.
- <div class = "progress progress-info progress-striped" >
- <div class = "ogwe" ụdị = " obosara : 20 % " ></ div>
- </div>
- <div class = "ọganihu ọganihu-ọganihu ọganihu-striped" >
- <div class = "ogwe" ụdị = " obosara : 40 % " ></ div>
- </div>
- <div klaasị = "ọganihu ọganihu-ịdọ aka na ntị na-aga n'ihu" >
- <div class = "ogwe" ụdị = " obosara : 60 % " ></ div>
- </div>
- <div class = "oganihu ọganihu-ihe egwu na-aga n'ihu" >
- <div class = "bar" style = " obosara : 80 % " ></ div>
- </div>
Ogwe ọganihu na-eji gradients CSS3, ntụgharị na ihe ngosi iji nweta mmetụta ha niile. Anaghị akwado atụmatụ ndị a na IE7-9 ma ọ bụ ụdị Firefox ochie.
Ụdị dị tupu Internet Explorer 10 na Opera 12 anaghị akwado animation.
Ụdị ihe na-adịghị ahụkebe maka iwulite ụdị ngwa dị iche iche (dị ka nkọwa blọgụ, Tweets, wdg) nke na-egosipụta onyonyo aka ekpe ma ọ bụ aka nri n'akụkụ ọdịnaya ederede.
Mgbasa ozi ndabara na-enye ohere ka sere n'elu ihe mgbasa ozi (onyinyo, vidiyo, ọdịyo) n'aka ekpe ma ọ bụ aka nri nke ngọngọ ọdịnaya.
- <div klas = "media" >
- <a class = "pull-left" href = "#" >
- <img klas = "media-object" data-src = "holder.js/64x64" >
- </a>
- <div klas = "media-body" >
- <h4 klas = "media-heading" > Isi mgbasa ozi </h4>
- ...
- <!-- Ihe mgbasa ozi akwụrụ -->
- <div klas = "media" >
- ...
- </div>
- </div>
- </div>
N'iji ntakịrị nrịbama agbakwunyere, ị nwere ike iji mgbasa ozi n'ime listi (ọ bara uru maka eriri okwu ma ọ bụ ndepụta akụkọ).
Cras sit amet nibh libero, na gravida nulla. Nulla vel metus sclerisque ante sollicitudin commodo. Cras purus odio, vestibulum na vulputate na, tempus viverra turpis.
- <ul class = "ndepụta mgbasa ozi" >
- <li klas = "mgbasa ozi" >
- <a class = "pull-left" href = "#" >
- <img klas = "media-object" data-src = "holder.js/64x64" >
- </a>
- <div klas = "media-body" >
- <h4 klas = "media-heading" > Isi mgbasa ozi </h4>
- ...
- <!-- Ihe mgbasa ozi akwụrụ -->
- <div klas = "media" >
- ...
- </div>
- </div>
- </li>
- </ul>
Jiri nke ọma dị ka mmetụta dị mfe na mmewere iji nye ya mmetụta inset.
- <div klas = "mma" >
- ...
- </div>
Mkpuchi njikwa na akụkụ gbara okirikiri nwere klaasị mgbanwe nhọrọ abụọ.
- <div class = "nke ọma tozuru oke" >
- ...
- </div>
- <div class = "nke ọma-obere" >
- ...
- </div>
Jiri akara ngosi nso nso a maka ịchụpụ ọdịnaya dịka modal na ọkwa.
- <bọtịnụ klas = " nso" > & ugboro; </bọtịnụ>
Ngwa iOS chọrọ ihe href="#"
omume pịa ma ọ bụrụ na ị ga-achọ iji arịlịka.
- <a class = "emechi" href = "#" > & ugboro; </a>
Klas dị mfe, lekwasịrị anya maka obere ngosi ma ọ bụ tweaks omume.
Fee ihe mmewere aka ekpe
- klas = "dọrọ-aka ekpe"
- . sere - aka ekpe {
- sere n'elu : aka ekpe ;
- }
Fee ihe mmewere aka nri
- klas = "dọrọ aka nri"
- . sere - aka nri {
- sere n'elu : nri ;
- }
Gbanwee agba nke mmewere ka ọ bụrụ#999
- klas = "mechiri emechi"
- . mechie ọnụ {
- agba : #999;
- }
Kpochapụ ihe float
ọ bụla na mmewere ọ bụla
- klas = "clearfix"
- . mkpochapụ {
- * mbugharị : 1 ;
- &: tupu ,
- &: mgbe {
- ngosi : okpokoro ;
- ọdịnaya : "" ;
- }
- &: mgbe {
- doro anya : abụọ ;
- }
- }