Inqwaba yezingxenye ezingasebenziseka kabusha ezakhelwe ukuhlinzeka ngokuzulazula, izexwayiso, ama-popovers, nokuningi.
Imenyu eguqukayo, engokomongo yokubonisa izinhlu zezixhumanisi. Kwenziwe ukusebenzisana nokwehliswa kwe- JavaScript plugin .
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> <li><a tabindex="-1" href="#">Isenzo</a></li> <li><a tabindex="-1" href="#">Esinye isenzo</a></li> <li><a tabindex="-1" href="#">Okunye lapha</a></li> <li class="divider"></li> <li><a tabindex="-1" href="#">Isixhumanisi esihlukanisiwe</a></li> </ul>
Uma ubheka imenyu yokudonsela phansi, nansi i-HTML edingekayo. Udinga ukugoqa i-trigger yokudonsela phansi kanye nemenyu yokudonsela phansi ngaphakathi kokuthi .dropdown
, noma enye into esho ukuthi position: relative;
. Bese uvele udale imenyu.
<div class="dropdown"> <!-- Xhumanisa noma inkinobho yokuguqula okwehliswayo --> <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> <li><a tabindex="-1" href="#">Isenzo</a></li> <li><a tabindex="-1" href="#">Esinye isenzo</a></li> <li><a tabindex="-1" href="#">Okunye lapha</a></li> <li class="divider"></li> <li><a tabindex="-1" href="#">Isixhumanisi esihlukanisiwe</a></li> </ul> </div>
Qondanisa amamenyu kwesokudla bese wengeza kufaka phakathi amazinga engeziwe okwehlayo.
Engeza .pull-right
kokuthi a .dropdown-menu
ukuze uqondanise kwesokudla imenyu eyehlayo.
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dLabel"> ... </ul>
Engeza ileveli eyengeziwe yamamenyu okwehlayo, avela phezulu njengalawo e-OS X, anezengezo zemakhaphu ezilula. Engeza .dropdown-submenu
kunoma iyiphi li
kumenyu eyehlayo ekhona ukuze wenze isitayela esizenzakalelayo.
Okuzenzakalelayo
Ukwehliswa
Imenyu engaphansi engakwesokunxele
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> ... <li class="dropdown-submenu"> <a tabindex="-1" href="#">Izinketho eziningi</a> <ul class="dropdown-menu"> ... </ul> </li> </ul>
Ukuqanjwa okulula okukhuthazwe yi-Rdio, kulungele izinhlelo zokusebenza nemiphumela yosesho. Ibhulokhi enkulu kunzima ukuyigeja, ingakala kalula, futhi ihlinzeka ngezindawo ezinkulu zokuchofoza.
<div class="pagination"> <ul> <li><a href="#">Okwedlule</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="#">Okulandelayo</a></li> </ul> </div>
Izixhumanisi zingenziwa ngendlela oyifisayo ezimeni ezahlukene. Sebenzisa .disabled
izixhumanisi ezingachofozwayo kanye .active
nokukhombisa ikhasi lamanje.
<div class="pagination"> <ul> <li class="disabled"><a href="#">Okwedlule</a></li> <li class="active"><a href="#">1</a></li> ... </ul> </div>
Ungakhetha ukushintsha amahange asebenzayo noma akhutshaziwe ukuze ususe ukusebenza kokuchofoza kuyilapho ugcina izitayela ezihlosiwe.
<div class="pagination"> <ul> <li class="disabled"><span>Okwedlule</span></li> <li class="active"><span>1</span></li> ... </ul> </div>
Uyathanda ukuqanjwa okukhudlwana noma okuncane? Engeza .pagination-large
, .pagination-small
, noma .pagination-mini
osayizi abengeziwe.
<div class="pagination pagination-large"> <ul> ... </ul> </div> <div class="pagination"> <ul> ... </ul> </div> <div class="pagination pagination-small"> <ul> ... </ul> </div> <div class="pagination pagination-mini"> <ul> ... </ul> </div>
Engeza izigaba ezimbili ozikhethela ukuze uguqule ukuqondanisa kwezixhumanisi zamakhasi: .pagination-centered
kanye .pagination-right
.
<div class="pagination pagination-centered"> ... </div>
<div class="pagination pagination-right"> ... </div>
Izixhumanisi ezisheshayo zangaphambilini nezilandelayo zokusetshenziswa okulula kokwakheka kwamagama okunophawu olukhanyayo nezitayela. Ilungele amasayithi alula njengamabhulogi noma omagazini.
Ngokuzenzakalela, izixhumanisi ze-pager.
<ul class="pager"> <li><a href="#">Okwedlule</a></li> <li><a href="#">Okulandelayo</a></li> </ul>
Kungenjalo, ungakwazi ukuqondanisa isixhumanisi ngasinye emaceleni:
<ul class="pager"> <li class="previous"> <a href="#">← Okudadlana</a> </li> <li class="next"> <a href="#">Okusha →</a> </li> </ul>
Izixhumanisi zama-pager nazo zisebenzisa isigaba sokusetshenziswa okujwayelekile .disabled
kusuka ephepheni.
<ul class="pager"> <li class="previous disabled"> <a href="#">← Okudadlana</a> </li> ... </ul>
Amalebula | Imakhaphu |
---|---|
Okuzenzakalelayo | <span class="label">Default</span> |
Impumelelo | <span class="label label-success">Success</span> |
Isexwayiso | <span class="label label-warning">Warning</span> |
Okubalulekile | <span class="label label-important">Important</span> |
Ulwazi | <span class="label label-info">Info</span> |
Okuphambene | <span class="label label-inverse">Inverse</span> |
Igama | Isibonelo | Imakhaphu |
---|---|---|
Okuzenzakalelayo | 1 | <span class="badge">1</span> |
Impumelelo | 2 | <span class="badge badge-success">2</span> |
Isexwayiso | 4 | <span class="badge badge-warning">4</span> |
Okubalulekile | 6 | <span class="badge badge-important">6</span> |
Ulwazi | 8 | <span class="badge badge-info">8</span> |
Okuphambene | 10 | <span class="badge badge-inverse">10</span> |
Ingxenye engasindi, evumelana nezimo ukuze ubonise okuqukethwe okuyinhloko kusayithi lakho. Isebenza kahle ekukhangiseni nakumasayithi anesisindo sokuqukethwe.
Leli iyunithi yeqhawe elilula, ingxenye elula yesitayela se-jumbotron yokubiza ukunaka okwengeziwe kokuqukethwe okufakiwe noma ulwazi.
<div class="hero-unit"> <h1>Isihloko</h1> <p>Umugqa wethegi</p> <p> <a class="btn btn-primary btn-large"> Funda kabanzi </a> </p> </div>
Igobolondo elilula h1
lendawo yokukhipha ngokufanelekile futhi uhlukanise izingxenye zokuqukethwe ekhasini. Ingasebenzisa h1
okumisiwe small
, ingxenye kanye nezinye izingxenye eziningi (ngezitayela ezengeziwe).
<div class="page-header"> <h1>Isibonelo seheda yekhasi <small>Umbhalo ongezansi weheda</small></h1> </div>
Ngokuzenzakalelayo, izithonjana ze-Bootstrap ziklanyelwe ukubonisa izithombe ezixhunyiwe ezinomakhaphu omncane odingekayo.
Ngophawu oluthe xaxa, ungakwazi ukwengeza noma yiluphi uhlobo lokuqukethwe kwe-HTML njengezihloko, izigaba, noma izinkinobho ezithonjaneni.
Izithonjana (ngaphambilini .media-grid
kuze kufike ku-v1.4) zinhle kumagridi ezithombe noma amavidiyo, imiphumela yosesho lwezithombe, imikhiqizo yokudayisa, amaphothifoliyo, nokunye okuningi. Kungaba izixhumanisi noma okuqukethwe okumile.
Umaki wezithonjana ulula—okunanoma ul
iyiphi inombolo li
yezinto yikho kuphela okudingekayo. Futhi iguquguquka kakhulu, ivumela noma iluphi uhlobo lokuqukethwe olunomakhaphu owengeziwe wokugoqa okuqukethwe kwakho.
Okokugcina, ingxenye yezithonjana isebenzisa amakilasi esistimu yegridi ekhona—njengenoma— .span2
ukulawula .span3
ubukhulu bezithonjana.
Njengoba kushiwo ngaphambili, umaka odingekayo wezithonjana ulula futhi uqondile. Nakhu ukubheka ukusethwa okuzenzakalelayo kwezithombe ezixhunyiwe :
<ul class="thumbnails"> <li class="span4"> <a href="#" class="thumbnail"> <img src="https://placehold.it/300x200" alt=""> </a> </li> ... </ul>
Ngokuqukethwe kwe-HTML yangokwezifiso ezithonjaneni, umaki uyashintsha kancane. Ukuvumela okuqukethwe kweleveli yebhulokhi noma yikuphi, sishintshanisa <a>
okufana <div>
nalokhu:
<ul class="thumbnails"> <li class="span4"> <div class="thumbnail"> <img src="https://placehold.it/300x200" alt=""> <h3>Ilebula yesithonjana</h3> <p>Isithombe-ncazo...</p> </div> </li> ... </ul>
Hlola zonke izinketho zakho ngamakilasi egridi ahlukahlukene atholakalayo kuwe. Ungaphinda uhlanganise futhi ufanise osayizi abahlukahlukene.
Goqa noma yimuphi umbhalo kanye nenkinobho yokuchitha ngokuzithandela .alert
ukuze uthole umlayezo oyisisekelo wesexwayiso.
<div class="alert"> <button type="button" class="close" data-dismiss="alert">×</button> <strong>Isexwayiso!</strong> Zihlole kahle, awubukeki umuhle kakhulu. </div>
Iziphequluli ze-Mobile Safari ne-Mobile Opera, ngaphezu data-dismiss="alert"
kwesibaluli, zidinga href="#"
ukuchithwa kwezixwayiso uma usebenzisa <a>
ithegi.
<a href="#" class="close" data-dismiss="alert">×</a>
Kungenjalo, ungasebenzisa i- <button>
elementi enesibaluli sedatha, esikhethe ukuyenzela amadokhumenti ethu. Uma usebenzisa <button>
, kufanele ufake type="button"
noma amafomu akho angase angawahambisi.
<button type="button" class="close" data-dismiss="alert">×</button>
Sebenzisa i- plugin yezaziso ye-jQuery ukuze ukhiphe izaziso ngokushesha futhi kalula.
Ngemilayezo emide, khulisa ukupheda phezulu nangaphansi kwesisonga sesexwayiso ngokungeza .alert-block
.
Kungcono uzihlole kahle, awubukeki umuhle kakhulu. I-Nulla vitae elit libero, i-pharetra augue. I-Preesent commodo cursus magna, vel scelerisque nisl consectetur et.
<div class="alert alert-block"> <button type="button" class="close" data-dismiss="alert">×</button> <h4>Isexwayiso!</h4> Okungcono uzihlole wena, awu... </div>
Engeza amakilasi ongawakhetha ukuze uguqule incazelo yesexwayiso.
<div class="alert alert-error"> ... </div>
<div class="alert alert-success"> ... </div>
<div class="alert alert-info"> ... </div>
Ibha yokuqhubeka ezenzakalelayo enegradient eqondile.
<div class="progress"> <div class="bar" style="width: 60%;"></div> </div>
Isebenzisa i-gradient ukuze idale umphumela onemigqa. Ayitholakali ku-IE7-8.
<div class="progress progress-striped"> <div class="bar" style="width: 20%;"></div> </div>
Engeza .active
ukuze .progress-striped
uphilise imithende kwesokudla ukuya kwesokunxele. Ayitholakali kuzo zonke izinguqulo ze-IE.
<div class="progress progress-striped active"> <div class="bar" style="width: 40%;"></div> </div>
Beka amabha amaningi okufanayo .progress
ukuze uwabeke.
<div class="progress"> <div class="bar bar-success" style="width: 35%;"></div> <div class="bar bar-warning" style="width: 20%;"></div> <div class="bar bar-danger" style="width: 10%;"></div> </div>
Amabha okuqhubeka asebenzisa inkinobho efanayo namakilasi okuxwayisa ngezitayela ezingaguquki.
<div class="progress progress-info"> <div class="bar" style="width: 20%"></div> </div> <div class="progress progress-success"> <div class="bar" style="width: 40%"></div> </div> <div class="progress progress-warning"> <div class="bar" style="width: 60%"></div> </div> <div class="progress progress-danger"> <div class="bar" style="width: 80%"></div> </div>
Ngokufana nemibala eqinile, sinemigoqo yenqubekelaphambili enemigqa ehlukahlukene.
<div class="progress progress-info progress-striped"> <div class="bar" style="width: 20%"></div> </div> <div class="progress progress-success progress-striped"> <div class="bar" style="width: 40%"></div> </div> <div class="progress progress-warning progress-striped"> <div class="bar" style="width: 60%"></div> </div> <div class="progress progress-danger progress-striped"> <div class="bar" style="width: 80%"></div> </div>
Amabha wenqubekelaphambili asebenzisa ama-gradient e-CSS3, ukuguqulwa, nokugqwayiza ukuze kuzuzwe yonke imiphumela yakhona. Lezi zici azisekelwa kuzinguqulo ze-IE7-9 noma ezindala zeFirefox.
Izinguqulo zangaphambi kwe-Internet Explorer 10 ne-Opera 12 azikusekeli ukugqwayiza.
Izitayela zento engabonakali zokwakha izinhlobo ezihlukahlukene zezingxenye (njengamazwana ebhulogi, ama-Tweets, njll) anesithombe esiqondaniswe kwesokunxele noma kwesokudla eceleni kokuqukethwe kombhalo.
Imidiya ezenzakalelayo ivumela ukuntanta into yemidiya (izithombe, ividiyo, umsindo) iye kwesokunxele noma kwesokudla sebhulokhi yokuqukethwe.
<div class="media"> <a class="pull-left" href="#"> <img class="media-object" src="https://placehold.it/64x64"> </a> <div class="media-body"> <h4 class="media-heading">Isihloko semidiya</h4> ... <!-- Into yemidiya efakwe esidlekeni --> <div class="media"> ... </div> </div> </div>
Ngokumakwa okuthe xaxa, ungasebenzisa imidiya engaphakathi kohlu (iwusizo ochungechungeni lwamazwana noma uhlu lwama-athikili).
Cras sit amet nibh libero, in gravida nulla. I-Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
<ul class="media-list"> <li class="media"> <a class="pull-left" href="#"> <img class="media-object" src="https://placehold.it/64x64"> </a> <div class="media-body"> <h4 class="media-heading">Isihloko semidiya</h4> ... <!-- Into yemidiya efakwe esidlekeni --> <div class="media"> ... </div> </div> </li> </ul>
Sebenzisa umthombo njengomphumela olula ku-elementi ukuze uyinikeze umphumela wokufakwayo.
<div class="well"> ... </div>
Lawula ama-padding namakhona ayindilinga ngamakilasi amabili okushintsha ozikhethela.
<div class="well well-large"> ... </div>
<div class="well well-small"> ... </div>
Sebenzisa isithonjana sokuvala esijwayelekile ukuze uchithe okuqukethwe okufana namamodeli nezixwayiso.
<button class="close">&izikhathi;</inkinobho>
Amadivayisi we-iOS adinga i- href="#" yokuchofoza imicimbi uma ungathanda ukusebenzisa ihange.
<a class="close" href="#">&izikhathi;</a>
Amakilasi alula, agxilile okubonisa okuncane noma ama-tweaks wokuziphatha.
Ntanta i-elementi kwesokunxele
class="donsa-kwesokunxele"
.donsela kwesokunxele { ukuntanta: kwesokunxele; }
Gcoba i-elementi kwesokudla
class="donsa-kwesokudla"
.donsela kwesokudla { ukuntanta: kwesokudla; }
Shintsha umbala we-elementi ube#999
class="thulisiwe"
.thulisiwe { umbala: #999; }
Sula float
kunoma iyiphi i-elementi
class="clearfix"
.clearfix { *sondeza: 1; &:ngaphambili, &:ngemuva { isibonisi: ithebula; okuqukethwe: ""; } &:ngemuva { cacile: kokubili; } }