Iiglyphs ezifumanekayo
Ibandakanya ngaphezulu kwe-250 glyphs kwifomati yefonti ukusuka kwiseti ye-Glyphicon Halflings. IiGlyphicons Halflings azifumaneki simahla, kodwa umdali wazo uzenze zafumaneka kwiBootstrap simahla. Njengombulelo, sicela kuphela ukuba ufake ikhonkco elibuyela kwiiGlyphicons nanini na kunokwenzeka.
Kusetyenziswa kwanjani
Ngezizathu zokusebenza, zonke ii-icon zifuna iklasi yesiseko kunye neklasi ye icon yomntu. Ukusebenzisa, beka le khowudi ilandelayo naphi na. Qinisekisa ukuba ushiya isithuba phakathi kwe-icon kunye nesicatshulwa ukwenzela ukukhutshwa okufanelekileyo.
Musa ukudibanisa namanye amalungu
Iiklasi ze-Icon azinakudityaniswa ngokuthe ngqo namanye amacandelo. Akufunekanga zisetyenziswe kunye nezinye iiklasi kwinto enye. Endaweni yoko, yongeza i-nested <span>
kwaye usebenzise iiklasi ze icon kwi <span>
.
Kuphela isetyenziselwa izinto ezingenanto
Iiklasi ze-Icon kufuneka zisetyenziswe kuphela kwizinto ezingenamxholo wokubhaliweyo kwaye ezingenazo izinto zomntwana.
Ukutshintsha indawo yefonti ye icon
I-Bootstrap ithatha iifayile zomgca we icon ziya kufumaneka ../fonts/
kulawulo, ngokunxulumene neefayile zeCSS eziqokelelweyo. Ukuhambisa okanye ukuthiya ngokutsha ezo fayile zefonti kuthetha ukuhlaziya iCSS ngenye yeendlela ezintathu:
Guqula @icon-font-path
kunye/okanye @icon-font-name
iinguqu kumthombo Iifayile ezingaphantsi.
Sebenzisa isalamane se-URLs ukhetho olunikezwe nguMqokeleli oMncinane.
Guqula url()
iindlela kwi-CSS eqokelelweyo.
Sebenzisa naluphi na ukhetho olulungele ukuseta kwakho uphuhliso oluthile.
Iimpawu ezifikelelekayo
Iinguqulelo zanamhlanje zetekhnoloji ezincedisayo ziya kubhengeza umxholo owenziwe yiCSS, kunye neempawu ezithile ze-Unicode. Ukunqanda iziphumo ebezingalindelekanga nezibhidayo kwizifundi zesikrini (ingakumbi xa ii-icon zisetyenziselwa ukuhombisa kuphela), siyazifihla kunye aria-hidden="true"
nophawu.
Ukuba usebenzisa i-icon ukudlulisa intsingiselo (kunokuba ibe yinto yokuhombisa kuphela), qinisekisa ukuba le ntsingiselo ikwagqithiselwa kwiiteknoloji ezincedisayo - umzekelo, bandakanya umxholo owongezelelweyo, ofihliweyo ngokubonakalayo kunye .sr-only
neklasi.
Ukuba wenza izilawuli ezingenaso esinye isicatshulwa (esifana ne <button>
-icon kuphela), kufuneka usoloko unikezela ngomxholo ongomnye ukuchonga injongo yolawulo, ukuze kube sengqiqweni kubasebenzisi boncedo lobuchwepheshe. Kulo mzekelo, unokongeza aria-label
uphawu kulawulo ngokwalo.
Khuphela
<span class= "glyphicon glyphicon-search" aria-hidden= "true" ></span>
Imizekelo
Zisebenzise kumaqhosha, amaqela amaqhosha ebar yesixhobo, ukukhangela, okanye amagalelo efomu esele ibekiwe.
inkwenkwezi
inkwenkwezi
inkwenkwezi
inkwenkwezi
Khuphela
<button type= "button" class= "btn btn-default" aria-label= "Left Align" >
<span class= "glyphicon glyphicon-align-left" aria-hidden= "true" ></span>
</button>
<button type= "button" class= "btn btn-default btn-lg" >
<span class= "glyphicon glyphicon-star" aria-hidden= "true" ></span> Star
</button>
I-ayikhoni esetyenziswe kwisivuseleli ukubonisa ukuba ngumyalezo wemposiso, kunye .sr-only
nokubhaliweyo okongeziweyo ukuhambisa le ngcebiso kubasebenzisi boncedo lobuchwephesha.
Impazamo: Ngenisa idilesi ye-imeyile esebenzayo
Khuphela
<div class= "alert alert-danger" role= "alert" >
<span class= "glyphicon glyphicon-exclamation-sign" aria-hidden= "true" ></span>
<span class= "sr-only" > Error:</span>
Enter a valid email address
</div>
Iyatshintsheka, imenyu yomxholo yokubonisa uluhlu lwamakhonkco. Yenziwe yasebenzisane kunye nokwehla kweJavaScript plugin .
Umzekelo
Vala iqhosha lotsalo kunye nemenyu eyehlayo ngaphakathi .dropdown
, okanye enye into echaza position: relative;
. Emva koko yongeza i-HTML yemenyu.
Khuphela
<div class= "dropdown" >
<button class= "btn btn-default dropdown-toggle" type= "button" id= "dropdownMenu1" data-toggle= "dropdown" aria-haspopup= "true" aria-expanded= "true" >
Dropdown
<span class= "caret" ></span>
</button>
<ul class= "dropdown-menu" aria-labelledby= "dropdownMenu1" >
<li><a href= "#" > Action</a></li>
<li><a href= "#" > Another action</a></li>
<li><a href= "#" > Something else here</a></li>
<li role= "separator" class= "divider" ></li>
<li><a href= "#" > Separated link</a></li>
</ul>
</div>
Iimenyu ezihlayo zingatshintshwa ukuze zandise phezulu (endaweni yokuhla) ngokongeza .dropup
kumzali.
Khuphela
<div class= "dropup" >
<button class= "btn btn-default dropdown-toggle" type= "button" id= "dropdownMenu2" data-toggle= "dropdown" aria-haspopup= "true" aria-expanded= "false" >
Dropup
<span class= "caret" ></span>
</button>
<ul class= "dropdown-menu" aria-labelledby= "dropdownMenu2" >
<li><a href= "#" > Action</a></li>
<li><a href= "#" > Another action</a></li>
<li><a href= "#" > Something else here</a></li>
<li role= "separator" class= "divider" ></li>
<li><a href= "#" > Separated link</a></li>
</ul>
</div>
Ulungelelwaniso
Ngokungagqibekanga, imenyu eyehlayo ibekwa ngokuzenzekelayo nge-100% ukusuka phezulu kunye necala lasekhohlo lomzali wayo. Yongeza .dropdown-menu-right
ku-a .dropdown-menu
ukuya ekunene lungelelanisa imenyu eyehlayo.
Isenokufuna indawo eyongezelelweyo
Iidrophu zibekwe ngokuzenzekela ngeCSS ngaphakathi kokuhamba okuqhelekileyo koxwebhu. Oku kuthetha ukuba ukwehla kunokunqanyulwa ngabazali abaneempawu ezithile overflow
okanye kubonakale ngaphandle kwemida yezibuko. Sombulula le miba ngokwakho njengoko ivela.
.pull-right
Ulungelelwaniso olulahliweyo
Ukusukela kwi-v3.1.0, siye .pull-right
sarhoxa kwiimenyu ezihlayo. Ukulungelelanisa ekunene imenyu, sebenzisa .dropdown-menu-right
. Amacandelo e-nav alungelelaniswe ekunene kwi-navbar sebenzisa uguqulelo lwe-mixin yolu didi ukulungelelanisa ngokuzenzekelayo imenyu. Ukuyibhala ngaphezulu, sebenzisa .dropdown-menu-left
.
Khuphela
<ul class= "dropdown-menu dropdown-menu-right" aria-labelledby= "dLabel" >
...
</ul>
Yongeza iheader ukulebhelisha amacandelo eentshukumo kuyo nayiphi na imenyu eyehlayo.
Khuphela
<ul class= "dropdown-menu" aria-labelledby= "dropdownMenu3" >
...
<li class= "dropdown-header" > Dropdown header</li>
...
</ul>
Umahluli
Yongeza isahluli kuthotho olwahlukileyo lwekhonkco kwimenyu eyehlayo.
Khuphela
<ul class= "dropdown-menu" aria-labelledby= "dropdownMenuDivider" >
...
<li role= "separator" class= "divider" ></li>
...
</ul>
Izinto zemenyu zivaliwe
Yongeza .disabled
kwi <li>
-dropdown ukuvala ikhonkco.
Khuphela
<ul class= "dropdown-menu" aria-labelledby= "dropdownMenu4" >
<li><a href= "#" > Regular link</a></li>
<li class= "disabled" ><a href= "#" > Disabled link</a></li>
<li><a href= "#" > Another link</a></li>
</ul>
Hlanganisa uluhlu lwamaqhosha kunye kumgca omnye kunye neqela lamaqhosha. Yongeza unomathotholo weJavaScript okhethiweyo kunye nokuziphatha kwesimbo sebhokisi ngamaqhosha ethu eplagi .
Qinisekisa ukuba ichanekile role
kwaye unikeze ileyibhile
Ukuze uncediso lwetekhnoloji - ezifana nezifundi zesikrini - ukubonisa ukuba uthotho lwamaqhosha abekwe ngokwamaqela, uphawu olufanelekileyo role
kufuneka lubonelelwe. Kumaqela amaqhosha, oku kuyakuba role="group"
, ngelixa iibar zesixhobo kufuneka zibe ne role="toolbar"
.
Okunye ngaphandle ngamaqela aqulathe kuphela ulawulo olunye (umzekelo amaqela amaqhosha athetheleleyo aneziqalelo <button>
) okanye owa phantsi.
Ukongeza, amaqela kunye neebar zesixhobo kufuneka zinikwe ileyibhile ecacileyo, njengoko uninzi lweetekhnoloji ezincedisayo aziyi kuzibhengeza, nangona kukho role
uphawu oluchanekileyo. Kwimizekelo enikelwe apha, sisebenzisa aria-label
, kodwa ezinye iindlela aria-labelledby
ezinokuthi zisetyenziswe.
Umzekelo osisiseko
Gquba uthotho lwamaqhosha .btn
nge .btn-group
.
Khuphela
<div class= "btn-group" role= "group" aria-label= "..." >
<button type= "button" class= "btn btn-default" > Left</button>
<button type= "button" class= "btn btn-default" > Middle</button>
<button type= "button" class= "btn btn-default" > Right</button>
</div>
Dibanisa iiseti <div class="btn-group">
zibe ngu <div class="btn-toolbar">
a kumacandelo anzima ngakumbi.
Khuphela
<div class= "btn-toolbar" role= "toolbar" aria-label= "..." >
<div class= "btn-group" role= "group" aria-label= "..." > ...</div>
<div class= "btn-group" role= "group" aria-label= "..." > ...</div>
<div class= "btn-group" role= "group" aria-label= "..." > ...</div>
</div>
Ubungakanani
Endaweni yokufaka iiklasi zokulinganisa iqhosha kwiqhosha ngalinye kwiqela, yongeza .btn-group-*
nje kwelinye .btn-group
, kubandakanywa xa ugcina amaqela amaninzi.
Khohlo
Phakathi
Kunene
Khohlo
Phakathi
Kunene
Khohlo
Phakathi
Kunene
Khohlo
Phakathi
Kunene
Khuphela
<div class= "btn-group btn-group-lg" role= "group" aria-label= "..." > ...</div>
<div class= "btn-group" role= "group" aria-label= "..." > ...</div>
<div class= "btn-group btn-group-sm" role= "group" aria-label= "..." > ...</div>
<div class= "btn-group btn-group-xs" role= "group" aria-label= "..." > ...</div>
Ukuzalela
Faka .btn-group
phakathi kwenye .btn-group
xa ufuna iimenu ezihlayo ezixutywe nothotho lwamaqhosha.
Khuphela
<div class= "btn-group" role= "group" aria-label= "..." >
<button type= "button" class= "btn btn-default" > 1</button>
<button type= "button" class= "btn btn-default" > 2</button>
<div class= "btn-group" role= "group" >
<button type= "button" class= "btn btn-default dropdown-toggle" data-toggle= "dropdown" aria-haspopup= "true" aria-expanded= "false" >
Dropdown
<span class= "caret" ></span>
</button>
<ul class= "dropdown-menu" >
<li><a href= "#" > Dropdown link</a></li>
<li><a href= "#" > Dropdown link</a></li>
</ul>
</div>
</div>
Ukwahluka ngokuthe nkqo
Yenza isethi yamaqhosha abonakale epakishwe ngokuthe nkqo kunokuba uthe tye. Uwiso lweqhosha lokwahlula aluxhaswa apha.
Iqhosha
Iqhosha
Lahla phantsi
Iqhosha
Iqhosha
Lahla phantsi
Lahla phantsi
Lahla phantsi
Khuphela
<div class= "btn-group-vertical" role= "group" aria-label= "..." >
...
</div>
Amaqela amaqhosha athetheleleyo
Yenza iqela lamaqhosha anwebe ngokobukhulu obulinganayo ukunweba bonke ububanzi bomzali wayo. Ikwasebenza kunye nokwehla kwamaqhosha ngaphakathi kweqela lamaqhosha.
Ukuphatha imida
Ngenxa yeHTML ethile kunye neCSS esetyenziselwa ukuthethelela amaqhosha (okuthi display: table-cell
), imida phakathi kwayo iphindwe kabini. Kumaqela amaqhosha aqhelekileyo, margin-left: -1px
isetyenziselwa ukupakisha imida endaweni yokuyisusa. Nangona kunjalo, margin
ayisebenzi kunye display: table-cell
. Ngenxa yoko, kuxhomekeke kuhlengahlengiso lwakho kwiBootstrap, unokunqwenela ukususa okanye ukufaka umbala kwakhona kwimida.
IE8 kunye nemida
I-Internet Explorer 8 ayinikezeli imida kumaqhosha kwiqela elilungelelanisiweyo, nokuba ivuliwe <a>
okanye <button>
izakhi. Ukujikeleza oko, songela iqhosha ngalinye kwelinye .btn-group
.
Bona #12476 ngolwazi oluthe kratya.
Neziqalelo <a>
_
Songa nje uthotho lwe .btn
s kwi .btn-group.btn-group-justified
.
Khuphela
<div class= "btn-group btn-group-justified" role= "group" aria-label= "..." >
...
</div>
Amakhonkco asebenza njengamaqhosha
Ukuba <a>
izinto zisetyenziselwa ukwenza njengamaqhosha - ukuqalisa ukusebenza kwekhasi, kunokuba uhambe uye kwelinye uxwebhu okanye icandelo ngaphakathi kwephepha langoku - kufuneka kwakhona banikwe efanelekileyo role="button"
.
Ukusebenzisa amaqela amaqhosha <button>
aneziqalelo, kufuneka usonge iqhosha ngalinye kwiqela leqhosha . Uninzi lwabakhangeli beencwadi aluyisebenzisi ngokufanelekileyo i-CSS yethu ukuthetheleleka <button>
kwizinto, kodwa njengoko sixhasa ukwehla kwamaqhosha, sinokusebenza malunga naloo nto.
Khuphela
<div class= "btn-group btn-group-justified" role= "group" aria-label= "..." >
<div class= "btn-group" role= "group" >
<button type= "button" class= "btn btn-default" > Left</button>
</div>
<div class= "btn-group" role= "group" >
<button type= "button" class= "btn btn-default" > Middle</button>
</div>
<div class= "btn-group" role= "group" >
<button type= "button" class= "btn btn-default" > Right</button>
</div>
</div>
Sebenzisa naliphi na iqhosha ukuqalisa imenyu eyehlayo ngokuyibeka ngaphakathi .btn-group
kunye nokubonelela ngophawu olufanelekileyo lwemenyu.
Ukuxhomekeka kwi-plugin
Ukuhla kwamaqhosha kufuna iplagin eyehlayo ukuba ibandakanywe kwinguqulelo yakho yeBootstrap.
Ukwehla kweqhosha elinye
Jika iqhosha libe kuluhlu lokulahla kunye notshintsho olusisiseko lophawulo.
Ukuhlala kukho
Amabanga aphantsi
Impumelelo
Ulwazi
Isilumkiso
Ingozi
Khuphela
<!-- Single button -->
<div class= "btn-group" >
<button type= "button" class= "btn btn-default dropdown-toggle" data-toggle= "dropdown" aria-haspopup= "true" aria-expanded= "false" >
Action <span class= "caret" ></span>
</button>
<ul class= "dropdown-menu" >
<li><a href= "#" > Action</a></li>
<li><a href= "#" > Another action</a></li>
<li><a href= "#" > Something else here</a></li>
<li role= "separator" class= "divider" ></li>
<li><a href= "#" > Separated link</a></li>
</ul>
</div>
Ukwehliswa kweqhosha lokwahlula
Ngokukwanjalo, yenza iqhosha elicandiweyo elehlayo ngotshintsho olufanayo lophawulo, kuphela ngeqhosha elahlukileyo.
Ukuhlala kukho
NONE
Amabanga aphantsi
NONE
Impumelelo
NONE
Ulwazi
NONE
Isilumkiso
NONE
Ingozi
NONE
Khuphela
<!-- Split button -->
<div class= "btn-group" >
<button type= "button" class= "btn btn-danger" > Action</button>
<button type= "button" class= "btn btn-danger dropdown-toggle" data-toggle= "dropdown" aria-haspopup= "true" aria-expanded= "false" >
<span class= "caret" ></span>
<span class= "sr-only" > Toggle Dropdown</span>
</button>
<ul class= "dropdown-menu" >
<li><a href= "#" > Action</a></li>
<li><a href= "#" > Another action</a></li>
<li><a href= "#" > Something else here</a></li>
<li role= "separator" class= "divider" ></li>
<li><a href= "#" > Separated link</a></li>
</ul>
</div>
Ubungakanani
Amaqhosha okwehla asebenza ngamaqhosha abo bonke ubukhulu.
Khuphela
<!-- Large button group -->
<div class= "btn-group" >
<button class= "btn btn-default btn-lg dropdown-toggle" type= "button" data-toggle= "dropdown" aria-haspopup= "true" aria-expanded= "false" >
Large button <span class= "caret" ></span>
</button>
<ul class= "dropdown-menu" >
...
</ul>
</div>
<!-- Small button group -->
<div class= "btn-group" >
<button class= "btn btn-default btn-sm dropdown-toggle" type= "button" data-toggle= "dropdown" aria-haspopup= "true" aria-expanded= "false" >
Small button <span class= "caret" ></span>
</button>
<ul class= "dropdown-menu" >
...
</ul>
</div>
<!-- Extra small button group -->
<div class= "btn-group" >
<button class= "btn btn-default btn-xs dropdown-toggle" type= "button" data-toggle= "dropdown" aria-haspopup= "true" aria-expanded= "false" >
Extra small button <span class= "caret" ></span>
</button>
<ul class= "dropdown-menu" >
...
</ul>
</div>
Ukwahluka kokulahla
Qalisa imenyu eyehlayo ngasentla kwezinto ngokongeza .dropup
kumzali.
Khuphela
<div class= "btn-group dropup" >
<button type= "button" class= "btn btn-default" > Dropup</button>
<button type= "button" class= "btn btn-default dropdown-toggle" data-toggle= "dropdown" aria-haspopup= "true" aria-expanded= "false" >
<span class= "caret" ></span>
<span class= "sr-only" > Toggle Dropdown</span>
</button>
<ul class= "dropdown-menu" >
<!-- Dropdown menu links -->
</ul>
</div>
Yandisa ulawulo lwefom ngokongeza umbhalo okanye amaqhosha ngaphambi, emva, okanye kumacala omabini ayo nayiphi na itekisi esekwe <input>
. Sebenzisa .input-group
kunye .input-group-addon
okanye .input-group-btn
ukulungisa okanye ukudibanisa izinto kwenye .form-control
.
Okubhaliweyo <input>
s kuphela
Kuphephe ukusebenzisa <select>
izinto apha njengoko zingenako isitayile ngokupheleleyo kwizikhangeli zeWebKit.
Kuphephe ukusebenzisa <textarea>
iziqalelo apha njengoko rows
uphawu lwazo aluyi kuhlonitshwa kwezinye iimeko.
Iingcebiso zezixhobo kunye neepopovers kumaqela egalelo zifuna useto olulodwa
Xa usebenzisa iincam zesixhobo okanye iipopovers kwizinto ezingaphakathi kwe .input-group
, kuya kufuneka ukhankanye ukhetho container: 'body'
lokunqanda iziphumo ebezingalindelekanga ezingafunekiyo (ezifana ne element ikhula banzi kunye/okanye ilahlekwe neekona zayo ezingqukuva xa itooltip okanye ipopover isenziwa).
Beka i-add-on enye okanye iqhosha macala omabini wegalelo. Usenokubeka enye kumacala omabini egalelo.
Asizixhasi izongezo ezininzi ( .input-group-addon
okanye .input-group-btn
) kwicala elinye.
Asiluxhasi iifomu ezininzi zolawulo kwiqela elinye longeniso.
Khuphela
<div class= "input-group" >
<span class= "input-group-addon" id= "basic-addon1" > @</span>
<input type= "text" class= "form-control" placeholder= "Username" aria-describedby= "basic-addon1" >
</div>
<div class= "input-group" >
<input type= "text" class= "form-control" placeholder= "Recipient's username" aria-describedby= "basic-addon2" >
<span class= "input-group-addon" id= "basic-addon2" > @example.com</span>
</div>
<div class= "input-group" >
<span class= "input-group-addon" > $</span>
<input type= "text" class= "form-control" aria-label= "Amount (to the nearest dollar)" >
<span class= "input-group-addon" > .00</span>
</div>
<label for= "basic-url" > Your vanity URL</label>
<div class= "input-group" >
<span class= "input-group-addon" id= "basic-addon3" > https://example.com/users/</span>
<input type= "text" class= "form-control" id= "basic-url" aria-describedby= "basic-addon3" >
</div>
Yongeza iiklasi zokulinganisa ifom ehambelana .input-group
nayo kwaye iziqulatho ngaphakathi ziya kwenza ubungakanani kwakhona ngokuzenzekelayo-akukho mfuneko yokuphinda iiklasi zolawulo lwefom kwinto nganye.
Khuphela
<div class= "input-group input-group-lg" >
<span class= "input-group-addon" id= "sizing-addon1" > @</span>
<input type= "text" class= "form-control" placeholder= "Username" aria-describedby= "sizing-addon1" >
</div>
<div class= "input-group" >
<span class= "input-group-addon" id= "sizing-addon2" > @</span>
<input type= "text" class= "form-control" placeholder= "Username" aria-describedby= "sizing-addon2" >
</div>
<div class= "input-group input-group-sm" >
<span class= "input-group-addon" id= "sizing-addon3" > @</span>
<input type= "text" class= "form-control" placeholder= "Username" aria-describedby= "sizing-addon3" >
</div>
Beka nayiphi na ibhokisi yokukhangela okanye irediyo ukhetho phakathi kweaddon yeqela longeniso endaweni yokubhaliweyo.
Khuphela
<div class= "row" >
<div class= "col-lg-6" >
<div class= "input-group" >
<span class= "input-group-addon" >
<input type= "checkbox" aria-label= "..." >
</span>
<input type= "text" class= "form-control" aria-label= "..." >
</div> <!-- /input-group -->
</div> <!-- /.col-lg-6 -->
<div class= "col-lg-6" >
<div class= "input-group" >
<span class= "input-group-addon" >
<input type= "radio" aria-label= "..." >
</span>
<input type= "text" class= "form-control" aria-label= "..." >
</div> <!-- /input-group -->
</div> <!-- /.col-lg-6 -->
</div> <!-- /.row -->
Amaqhosha kumaqela egalelo ahluke kancinane kwaye afuna inqanaba elinye elongezelelweyo lokuzalela. Endaweni yoko .input-group-addon
, kuya kufuneka usebenzise .input-group-btn
ukusonga amaqhosha. Oku kuyafuneka ngenxa yesimbo sokungagqibeki sesikhangeli esingenako ukukhutshelwa ngaphezulu.
Khuphela
<div class= "row" >
<div class= "col-lg-6" >
<div class= "input-group" >
<span class= "input-group-btn" >
<button class= "btn btn-default" type= "button" > Go!</button>
</span>
<input type= "text" class= "form-control" placeholder= "Search for..." >
</div> <!-- /input-group -->
</div> <!-- /.col-lg-6 -->
<div class= "col-lg-6" >
<div class= "input-group" >
<input type= "text" class= "form-control" placeholder= "Search for..." >
<span class= "input-group-btn" >
<button class= "btn btn-default" type= "button" > Go!</button>
</span>
</div> <!-- /input-group -->
</div> <!-- /.col-lg-6 -->
</div> <!-- /.row -->
Khuphela
<div class= "row" >
<div class= "col-lg-6" >
<div class= "input-group" >
<div class= "input-group-btn" >
<button type= "button" class= "btn btn-default dropdown-toggle" data-toggle= "dropdown" aria-haspopup= "true" aria-expanded= "false" > Action <span class= "caret" ></span></button>
<ul class= "dropdown-menu" >
<li><a href= "#" > Action</a></li>
<li><a href= "#" > Another action</a></li>
<li><a href= "#" > Something else here</a></li>
<li role= "separator" class= "divider" ></li>
<li><a href= "#" > Separated link</a></li>
</ul>
</div> <!-- /btn-group -->
<input type= "text" class= "form-control" aria-label= "..." >
</div> <!-- /input-group -->
</div> <!-- /.col-lg-6 -->
<div class= "col-lg-6" >
<div class= "input-group" >
<input type= "text" class= "form-control" aria-label= "..." >
<div class= "input-group-btn" >
<button type= "button" class= "btn btn-default dropdown-toggle" data-toggle= "dropdown" aria-haspopup= "true" aria-expanded= "false" > Action <span class= "caret" ></span></button>
<ul class= "dropdown-menu dropdown-menu-right" >
<li><a href= "#" > Action</a></li>
<li><a href= "#" > Another action</a></li>
<li><a href= "#" > Something else here</a></li>
<li role= "separator" class= "divider" ></li>
<li><a href= "#" > Separated link</a></li>
</ul>
</div> <!-- /btn-group -->
</div> <!-- /input-group -->
</div> <!-- /.col-lg-6 -->
</div> <!-- /.row -->
Khuphela
<div class= "input-group" >
<div class= "input-group-btn" >
<!-- Button and dropdown menu -->
</div>
<input type= "text" class= "form-control" aria-label= "..." >
</div>
<div class= "input-group" >
<input type= "text" class= "form-control" aria-label= "..." >
<div class= "input-group-btn" >
<!-- Button and dropdown menu -->
</div>
</div>
Ngelixa unokongeza enye kuphela kwicala ngalinye, unokuba namaqhosha amaninzi ngaphakathi kwelinye .input-group-btn
.
Khuphela
<div class= "input-group" >
<div class= "input-group-btn" >
<!-- Buttons -->
</div>
<input type= "text" class= "form-control" aria-label= "..." >
</div>
<div class= "input-group" >
<input type= "text" class= "form-control" aria-label= "..." >
<div class= "input-group-btn" >
<!-- Buttons -->
</div>
</div>
Ii-Navs ezikhoyo kwi-Bootstrap ziye zabelane ngemarkup, ziqala ngeklasi yesiseko .nav
, kunye neendawo ezabelwana ngazo. Tshintsha iiklasi zesilungisi ukutshintsha phakathi kwesimbo ngasinye.
Ukusebenzisa i-navs kwiiphaneli zethebhu kufuna iplagi ye-JavaScript tabs
Kwiithebhu ezinendawo ezinokuthi zenzeke, kufuneka usebenzise ii tab JavaScript plugin . Imarkup nayo iya kufuna role
iimpawu ezongezelelweyo kunye ne-ARIA - bona umzekelo we-plugin yophawulo ngeenkcukacha ezithe vetshe.
Yenza i-navs isetyenziswe njengokukhangela kufikeleleke
Ukuba usebenzisa i-navs ukubonelela ngebar yokukhangela, qiniseka ukuba wongeza u role="navigation"
-a kwesona sikhongozeli sinomzali sinengqiqo se- <ul>
, okanye usonge <nav>
into ejikeleze lonke ukukhangela. Musa ukongeza indima kuyo <ul>
ngokwayo, njengoko oku kuya kuthintela ukuba ibhengezwe njengoluhlu lokwenyani ngobuchule bokuncedisa.
Iithebhu
Qaphela ukuba .nav-tabs
iklasi ifuna .nav
iklasi yesiseko.
Khuphela
<ul class= "nav nav-tabs" >
<li role= "presentation" class= "active" ><a href= "#" > Home</a></li>
<li role= "presentation" ><a href= "#" > Profile</a></li>
<li role= "presentation" ><a href= "#" > Messages</a></li>
</ul>
Iipilisi
Thatha kwaloo HTML inye, kodwa sebenzisa .nav-pills
endaweni yoko:
Khuphela
<ul class= "nav nav-pills" >
<li role= "presentation" class= "active" ><a href= "#" > Home</a></li>
<li role= "presentation" ><a href= "#" > Profile</a></li>
<li role= "presentation" ><a href= "#" > Messages</a></li>
</ul>
Iipilisi nazo zibekwe ngokuthe nkqo. Yongeza nje .nav-stacked
.
Khuphela
<ul class= "nav nav-pills nav-stacked" >
...
</ul>
Igwetyelwe
Yenza iithebhu okanye iipilisi ngokulula zibe nobubanzi obulinganayo bomzali wabo kwizikrini ezibanzi kuno-768px nge .nav-justified
. Kwizikrini ezincinci, amakhonkco e-nav apakishwe.
Amakhonkco e-navbar athethelelweyo akaxhaswa okwangoku.
Safari kunye navs ephendulayo ethethelelayo
Ukusukela kwi-v9.1.2, iSafari ibonisa ibug apho ukwenza ubungakanani bebrawuza yakho ngokuthe tye kubangela iimpazamo zonikezelo kwi-nav ethethelelekayo ecinywayo xa ihlaziya. Le bug ikwabonisiwe kumzekelo we nav othethelelekayo .
Khuphela
<ul class= "nav nav-tabs nav-justified" >
...
</ul>
<ul class= "nav nav-pills nav-justified" >
...
</ul>
Amakhonkco avaliwe
Kulo naliphi na icandelo le-nav (iithebhu okanye iipilisi), yongeza amakhonkco angwevu kwaye akukho ziphumo .disabled
ze - hover .
Ukusebenza kwekhonkco akuchaphazelekanga
Olu didi luzakutshintsha kuphela <a>
inkangeleko, hayi ukusebenza kwalo. Sebenzisa iJavaScript yesiko ukuvala amakhonkco apha.
Khuphela
<ul class= "nav nav-pills" >
...
<li role= "presentation" class= "disabled" ><a href= "#" > Disabled link</a></li>
...
</ul>
Ukusebenzisa iidrophu
Yongeza iimenu ezihlayo nge-HTML encinci eyongezelelweyo kunye neplagi ye- JavaScript eyehlayo .
Iithebhu ezinokwehla
Khuphela
<ul class= "nav nav-tabs" >
...
<li role= "presentation" class= "dropdown" >
<a class= "dropdown-toggle" data-toggle= "dropdown" href= "#" role= "button" aria-haspopup= "true" aria-expanded= "false" >
Dropdown <span class= "caret" ></span>
</a>
<ul class= "dropdown-menu" >
...
</ul>
</li>
...
</ul>
Iipilisi ezine dropdowns
Khuphela
<ul class= "nav nav-pills" >
...
<li role= "presentation" class= "dropdown" >
<a class= "dropdown-toggle" data-toggle= "dropdown" href= "#" role= "button" aria-haspopup= "true" aria-expanded= "false" >
Dropdown <span class= "caret" ></span>
</a>
<ul class= "dropdown-menu" >
...
</ul>
</li>
...
</ul>
I-navbar ehlala ikho
Ii-Navbar ngamalungu e-meta aphendulayo asebenza njengezihloko zokukhangela kwisicelo sakho okanye indawo. Ziqala ukudilika (kwaye zitshintsheka) kwiimboniselo ezihambayo kwaye zibe tyenzisiweyo njengoko ububanzi bendawo yokujonga bunyuka.
Amakhonkco e-navbar athethelelweyo akaxhaswa okwangoku.
Umxholo ophuphumayo
Kuba i-Bootstrap ingayazi ukuba singakanani na isithuba somxholo kwiimfuno zakho ze-navbar, ungangena kwimiba engomxholo kumqolo wesibini. Ukusombulula oku, unga:
Nciphisa inani okanye ububanzi bezinto ze-navbar.
Fihla izinto ezithile zebar ye navbar kwiisayizi ezithile zesikrini usebenzisa iiklasi eziluncedo eziphendulayo .
Guqula indawo apho i-navbar yakho itshintsha khona phakathi kwemo ewileyo kunye nethe tye. Lungiselela @grid-float-breakpoint
ukuguquguquka okanye wongeze owakho umbuzo kwimidiya.
Ifuna iJavaScript plugin
Ukuba iJavaScript ivaliwe kwaye indawo yokujonga imxinwa ngokwaneleyo ukuba i-navbar idilike, kuya kuba nzima ukwandisa i-navbar kwaye ujonge umxholo ngaphakathi kwe .navbar-collapse
.
Ibar ye-navbar ephendulayo ifuna iplagin yokudilika ukuba ibandakanywe kwinguqulelo yakho ye-Bootstrap.
Ukutshintsha indawo edilikileyo yebar ye navbar
Ibar ye-navbar iyawa kwimboniselo yayo ethe nkqo yeselfowuni xa indawo yokujonga imxinwa kune- @grid-float-breakpoint
, kwaye iyanda kwimboniselo yayo ethe tye engeyiyo ehambayo xa indawo yokujonga ibubanzi ubuncinane @grid-float-breakpoint
. Lungisa oku kuguquguquka kumthombo omncinci ukulawula xa i-navbar idilika/iyanda. Ixabiso elimiselweyo ngu 768px
(elona lincinane "elincinci" okanye "ithebhulethi" yesikrini).
Yenza ii-navbar zifikeleleke
Qinisekisa ukusebenzisa i <nav>
element okanye, ukuba usebenzisa isiqalelo esifana ne generic ngakumbi njenge <div>
, yongeza i role="navigation"
navbar nganye ukuyichaza ngokucacileyo njengommandla obalulekileyo wabasebenzisi boncedo lobuchwepheshe.
Khuphela
<nav class= "navbar navbar-default" >
<div class= "container-fluid" >
<!-- Brand and toggle get grouped for better mobile display -->
<div class= "navbar-header" >
<button type= "button" class= "navbar-toggle collapsed" data-toggle= "collapse" data-target= "#bs-example-navbar-collapse-1" aria-expanded= "false" >
<span class= "sr-only" > Toggle navigation</span>
<span class= "icon-bar" ></span>
<span class= "icon-bar" ></span>
<span class= "icon-bar" ></span>
</button>
<a class= "navbar-brand" href= "#" > Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class= "collapse navbar-collapse" id= "bs-example-navbar-collapse-1" >
<ul class= "nav navbar-nav" >
<li class= "active" ><a href= "#" > Link <span class= "sr-only" > (current)</span></a></li>
<li><a href= "#" > Link</a></li>
<li class= "dropdown" >
<a href= "#" class= "dropdown-toggle" data-toggle= "dropdown" role= "button" aria-haspopup= "true" aria-expanded= "false" > Dropdown <span class= "caret" ></span></a>
<ul class= "dropdown-menu" >
<li><a href= "#" > Action</a></li>
<li><a href= "#" > Another action</a></li>
<li><a href= "#" > Something else here</a></li>
<li role= "separator" class= "divider" ></li>
<li><a href= "#" > Separated link</a></li>
<li role= "separator" class= "divider" ></li>
<li><a href= "#" > One more separated link</a></li>
</ul>
</li>
</ul>
<form class= "navbar-form navbar-left" >
<div class= "form-group" >
<input type= "text" class= "form-control" placeholder= "Search" >
</div>
<button type= "submit" class= "btn btn-default" > Submit</button>
</form>
<ul class= "nav navbar-nav navbar-right" >
<li><a href= "#" > Link</a></li>
<li class= "dropdown" >
<a href= "#" class= "dropdown-toggle" data-toggle= "dropdown" role= "button" aria-haspopup= "true" aria-expanded= "false" > Dropdown <span class= "caret" ></span></a>
<ul class= "dropdown-menu" >
<li><a href= "#" > Action</a></li>
<li><a href= "#" > Another action</a></li>
<li><a href= "#" > Something else here</a></li>
<li role= "separator" class= "divider" ></li>
<li><a href= "#" > Separated link</a></li>
</ul>
</li>
</ul>
</div> <!-- /.navbar-collapse -->
</div> <!-- /.container-fluid -->
</nav>
Umfanekiso webrand
Buyisela ibhrendi ye navbar ngomfanekiso wakho ngokutshintshisa okubhaliweyo kwi <img>
. Kuba i .navbar-brand
-padding yayo kunye nobude bayo, unokufuna ngaphezulu kwe-CSS ngokuxhomekeke kumfanekiso wakho.
Khuphela
<nav class= "navbar navbar-default" >
<div class= "container-fluid" >
<div class= "navbar-header" >
<a class= "navbar-brand" href= "#" >
<img alt= "Brand" src= "..." >
</a>
</div>
</div>
</nav>
Beka umxholo wefom ngaphakathi .navbar-form
ukwenzela ulungelelwaniso oluthe nkqo olululo kunye nokuziphatha okugobileyo kwiindawo zokujonga ezimxinwa. Sebenzisa iinketho zolungelelwaniso ukwenza isigqibo apho ihlala khona ngaphakathi kumxholo we-navbar.
Njengentloko phezulu, .navbar-form
yabelana uninzi lwekhowudi yayo .form-inline
nge-mixin. Ezinye iifom zolawulo, njengamaqela egalelo, zinokufuna ububanzi obusisigxina ukuba buboniswe ngokufanelekileyo kwi-navbar.
Khuphela
<form class= "navbar-form navbar-left" role= "search" >
<div class= "form-group" >
<input type= "text" class= "form-control" placeholder= "Search" >
</div>
<button type= "submit" class= "btn btn-default" > Submit</button>
</form>
Isixhobo esiphathwayo caveats
Kukho ezinye izilumkiso malunga nokusetyenziswa kolawulo lwefom ngaphakathi kwezinto ezisisigxina kwizixhobo eziphathwayo. Jonga amaxwebhu ethu enkxaso kwisikhangeli ukuze ufumane iinkcukacha.
Yongeza .navbar-btn
iklasi <button>
kwiziqalelo <form>
ezingahlaliyo kwi-a ukuyibeka embindini ngokuthe nkqo kwi-navbar.
Khuphela
<button type= "button" class= "btn btn-default navbar-btn" > Sign in</button>
Ukusetyenziswa komxholo othile
Njengeeklasi zeqhosha elisezantsi , .navbar-btn
zingasetyenziswa <a>
kunye <input>
nezinto. Nangona kunjalo, .navbar-btn
akufuneki kusetyenziswe iiklasi zamaqhosha asezantsi kwizinto <a>
ezingaphakathi .navbar-nav
.
Isicatshulwa
Songa imitya yokubhaliweyo ngento nge .navbar-text
, ngokuqhelekileyo <p>
kwithegi yokukhokela nombala ofanelekileyo.
Khuphela
<p class= "navbar-text" > Signed in as Mark Otto</p>
amakhonkco Non-nav
Kubantu abasebenzisa amakhonkco asemgangathweni angekho ngaphakathi kwecandelo lokukhangela le-navbar eliqhelekileyo, sebenzisa .navbar-link
iklasi ukongeza imibala efanelekileyo yokhetho olungagqibekanga kunye nenguquko yebar ye-navbar.
Khuphela
<p class= "navbar-text navbar-right" > Signed in as <a href= "#" class= "navbar-link" > Mark Otto</a></p>
Ulungelelwaniso lwamacandelo
Lungelelanisa amakhonkco e-nav, iifom, amaqhosha, okanye okubhaliweyo, usebenzisa .navbar-left
okanye .navbar-right
iiklasi eziluncedo. Zombini iiklasi ziya kongeza i-CSS edadayo kwicala elichaziweyo. Umzekelo, ukulungelelanisa amakhonkco e-nav, uwabeke kwindawo eyahlukileyo <ul>
kunye nodidi oluluncedo olusetyenziswayo.
Ezi klasi ziinguqulelo ezixubeneyo ze .pull-left
kwaye .pull-right
, kodwa zijongwe kwimibuzo yemidiya ukuze kuphathwe lula amalungu e-navbar kuzo zonke iisayizi zesixhobo.
Ukulungelelanisa amalungu amaninzi ekunene
Ii-Navbar okwangoku zinomda ngeeklasi ezininzi .navbar-right
. Ukubeka ngokufanelekileyo umxholo, sisebenzisa umda ongalunganga kwinto yokugqibela .navbar-right
. Xa kukho izinto ezininzi ezisebenzisa olo didi, le mida ayisebenzi njengoko bekucetyiwe.
Siza kuphinda siyijonge oku xa sinokuphinda sibhale elo candelo kwi-v4.
Zilungiswe phezulu
Yongeza .navbar-fixed-top
kwaye uquke i .container
okanye .container-fluid
kwiziko kunye ne pad navbar umxholo.
Khuphela
<nav class= "navbar navbar-default navbar-fixed-top" >
<div class= "container" >
...
</div>
</nav>
Ukugquma umzimba kuyafuneka
Ibar ye navbar esisigxina iya kwaleka omnye umxholo wakho, ngaphandle kokuba wongeza padding
phezulu kwe <body>
. Zama amaxabiso akho okanye usebenzise isiqwengana sethu esingezantsi. Ingcebiso: Ngokuzenzekelayo, i-navbar iphezulu nge-50px.
Khuphela
body { padding-top : 70px ; }
Qinisekisa ukubandakanya oku emva kwe-CSS ye-Bootstrap engundoqo.
Ilungisiwe ukuya emazantsi
Yongeza .navbar-fixed-bottom
kwaye uquke i .container
okanye .container-fluid
kwiziko kunye ne pad navbar umxholo.
Khuphela
<nav class= "navbar navbar-default navbar-fixed-bottom" >
<div class= "container" >
...
</div>
</nav>
Ukugquma umzimba kuyafuneka
Ibar ye navbar elungisiweyo iya kwaleka omnye umxholo wakho, ngaphandle kokuba wongeza padding
ezantsi kwe <body>
. Zama amaxabiso akho okanye usebenzise isiqwengana sethu esingezantsi. Ingcebiso: Ngokuzenzekelayo, i-navbar iphezulu nge-50px.
Khuphela
body { padding-bottom : 70px ; }
Qinisekisa ukubandakanya oku emva kwe-CSS ye-Bootstrap engundoqo.
Umphezulu omileyo
Yenza i-navbar enobubanzi obugcweleyo eskrola kude nephepha ngokudibanisa .navbar-static-top
kwaye iquke i .container
okanye .container-fluid
ukuya embindini kunye nomxholo wepad navbar.
Ngokungafaniyo .navbar-fixed-*
neeklasi, awudingi ukutshintsha nayiphi na i-padding kwi- body
.
Khuphela
<nav class= "navbar navbar-default navbar-static-top" >
<div class= "container" >
...
</div>
</nav>
I-navbar eguqulweyo
Guqula inkangeleko ye navbar ngokongeza .navbar-inverse
.
Khuphela
<nav class= "navbar navbar-inverse" >
...
</nav>
Bonisa indawo yephepha langoku phakathi koluhlu lokukhangela.
Izahluli zongezwa ngokuzenzekelayo kwiCSS :before
nge content
.
Khuphela
<ol class= "breadcrumb" >
<li><a href= "#" > Home</a></li>
<li><a href= "#" > Library</a></li>
<li class= "active" > Data</li>
</ol>
Nikeza amakhonkco okwenziwa kwamaphepha esayithi yakho okanye i-app enecandelo lamaphepha amaninzi lokupheyija, okanye enye indlela elula yokupheyija .
I-pagination elula ephefumlelwe yi-Rdio, ilungile kwii-apps kunye neziphumo zokukhangela. Ibhloko enkulu kunzima ukuyiphosa, kulula ukukala, kwaye ibonelela ngeendawo ezinkulu zokucofa.
Khuphela
<nav aria-label= "Page navigation" >
<ul class= "pagination" >
<li>
<a href= "#" aria-label= "Previous" >
<span aria-hidden= "true" > « </span>
</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= "#" aria-label= "Next" >
<span aria-hidden= "true" > » </span>
</a>
</li>
</ul>
</nav>
Iimeko ezikhubazekileyo nezisebenzayo
Unxulumano luyakwazi ukwenzeka kwiimeko ezahlukeneyo. Sebenzisa .disabled
amakhonkco angenakucofa kunye .active
nokubonisa iphepha langoku.
Khuphela
<nav aria-label= "..." >
<ul class= "pagination" >
<li class= "disabled" ><a href= "#" aria-label= "Previous" ><span aria-hidden= "true" > « </span></a></li>
<li class= "active" ><a href= "#" > 1 <span class= "sr-only" > (current)</span></a></li>
...
</ul>
</nav>
Sicebisa ukuba utshintshe iiankile ezisebenzayo okanye ezikhubazekileyo ze <span>
, okanye ushiye iankile kwimeko yangaphambili/elandelayo iintolo, ukususa umsebenzi wonqakrazo ngelixa ugcina izimbo ezicetyiweyo.
Khuphela
<nav aria-label= "..." >
<ul class= "pagination" >
<li class= "disabled" >
<span>
<span aria-hidden= "true" > « </span>
</span>
</li>
<li class= "active" >
<span> 1 <span class= "sr-only" > (current)</span></span>
</li>
...
</ul>
</nav>
Ubungakanani
Ngaba ufuna ukwenza i-pagination enkulu okanye encinci? Yongeza .pagination-lg
okanye .pagination-sm
iisayizi ezongezelelweyo.
Khuphela
<nav aria-label= "..." ><ul class= "pagination pagination-lg" > ...</ul></nav>
<nav aria-label= "..." ><ul class= "pagination" > ...</ul></nav>
<nav aria-label= "..." ><ul class= "pagination pagination-sm" > ...</ul></nav>
Iikhonkco ezikhawulezayo zangaphambili kunye nezilandelayo zophumezo olulula lwe-pagination ngophawu olukhanyayo kunye nezitayile. Ilungile kwiziza ezilula ezifana neeblogi okanye iimagazini.
Umzekelo omiselweyo
Ngokungagqibekanga, amaziko e-pageja amakhonkco.
Khuphela
<nav aria-label= "..." >
<ul class= "pager" >
<li><a href= "#" > Previous</a></li>
<li><a href= "#" > Next</a></li>
</ul>
</nav>
Amakhonkco alungelelanisiweyo
Kungenjalo, unokulungelelanisa ikhonkco ngalinye emacaleni:
Khuphela
<nav aria-label= "..." >
<ul class= "pager" >
<li class= "previous" ><a href= "#" ><span aria-hidden= "true" > ← </span> Older</a></li>
<li class= "next" ><a href= "#" > Newer <span aria-hidden= "true" > → </span></a></li>
</ul>
</nav>
Ukhetho lwemeko yokukhubazeka
Amakhonkco ePager aphinda asebenzise .disabled
iklasi eluncedo ngokubanzi ukusuka kwipagination.
Khuphela
<nav aria-label= "..." >
<ul class= "pager" >
<li class= "previous disabled" ><a href= "#" ><span aria-hidden= "true" > ← </span> Older</a></li>
<li class= "next" ><a href= "#" > Newer <span aria-hidden= "true" > → </span></a></li>
</ul>
</nav>
Umzekelo
Umzekelo isihloko Esitsha
Umzekelo isihloko Esitsha
Umzekelo isihloko Esitsha
Umzekelo isihloko Esitsha
Umzekelo isihloko Esitsha
Umzekelo isihloko Esitsha
Khuphela
<h3> Example heading <span class= "label label-default" > New</span></h3>
Ukwahluka okukhoyo
Yongeza naziphi na iiklasi zesilungisi kwezi zikhankanywe ngezantsi ukutshintsha inkangeleko yeleyibhile.
ISilumkiso
seNgcaciso yeMpumelelo eMiselweyo esisiseko _
Khuphela
<span class= "label label-default" > Default</span>
<span class= "label label-primary" > Primary</span>
<span class= "label label-success" > Success</span>
<span class= "label label-info" > Info</span>
<span class= "label label-warning" > Warning</span>
<span class= "label label-danger" > Danger</span>
Unetoni zeelebhile?
Unikezelo lweengxaki zinokuvela xa unenqwaba yeelebhile ezingaphakathi kwisikhongozeli esimxinwa, nganye iqulethe eyeyayo inline-block
element (njenge icon). Indlela ejikeleze oku ibeka display: inline-block;
. Ngomxholo kunye nomzekelo, bona #13219 .
Gcoba ngokulula izinto ezintsha okanye ezingafundwanga ngokudibanisa <span class="badge">
ikhonkco, iBootstrap navs, kunye nokunye.
Khuphela
<a href= "#" > Inbox <span class= "badge" > 42</span></a>
<button class= "btn btn-primary" type= "button" >
Messages <span class= "badge" > 4</span>
</button>
Ukuziwisa
Xa kungekho zinto zintsha okanye zingafundwanga, iibheji ziya kuwa ngokulula (ngokusebenzisa :empty
umkhethi weCSS) ngaphandle kokuba akukho mxholo ukhoyo ngaphakathi.
Ukuhambelana kwebrowser
Iibheji azinakuziwisa kwi-Internet Explorer 8 kuba ayinankxaso :empty
yomkhethi.
Iqhelanisa neemeko ze-nav ezisebenzayo
Izitayela ezakhelwe ngaphakathi zibandakanyiwe ukubeka iibheji kwiindawo ezisebenzayo kwiipilisi zokuhamba.
Khuphela
<ul class= "nav nav-pills" role= "tablist" >
<li role= "presentation" class= "active" ><a href= "#" > Home <span class= "badge" > 42</span></a></li>
<li role= "presentation" ><a href= "#" > Profile</a></li>
<li role= "presentation" ><a href= "#" > Messages <span class= "badge" > 3</span></a></li>
</ul>
Into ekhaphukhaphu, eguquguqukayo enokuthi ngokuzikhethela yandise indawo yokujonga yonke ukubonisa umxholo ophambili kwisiza sakho.
Molo Lizwe!
Le yiyunithi yeqhawe elilula, icandelo elilula le-jumbotron lokubiza ingqalelo eyongezelelweyo kumxholo ofakiweyo okanye ulwazi.
Funda nzulu
Khuphela
<div class= "jumbotron" >
<h1> Hello, world!</h1>
<p> ...</p>
<p><a class= "btn btn-primary btn-lg" href= "#" role= "button" > Learn more</a></p>
</div>
Ukwenza ijumbotron ububanzi obugcweleyo, kwaye ngaphandle kweekona ezingqukuva, yibeke ngaphandle kwayo yonke .container
i-s kwaye endaweni yoko wongeze .container
ngaphakathi.
Khuphela
<div class= "jumbotron" >
<div class= "container" >
...
</div>
</div>
Iqokobhe elilula h1
lesithuba esifanelekileyo kunye namacandelo ecandelo lomxholo kwiphepha. Ingasebenzisa isiqalelo h1
esingagqibekanga small
, kunye noninzi lwamanye amalungu (enezimbo ezongezelelweyo).
Khuphela
<div class= "page-header" >
<h1> Example page header <small> Subtext for header</small></h1>
</div>
Yandisa inkqubo yegridi yeBootstrap kunye necandelo le-thumbnail ukubonisa ngokulula iigridi zemifanekiso, iividiyo, umbhalo, nokunye.
Ukuba ujonge iPinterest-efana neprezenteyishini yee-thumbnails zobude obahlukeneyo kunye/okanye ububanzi, kuya kufuneka usebenzise iplagi yomntu wesithathu efana neMasonry , Isotope , okanye Salvattore .
Umzekelo omiselweyo
Ngokungagqibekanga, ii-thumbnails zeBootstrap ziyilelwe ukubonisa imifanekiso edityanisiweyo enophawu oluncinci olufunekayo.
Khuphela
<div class= "row" >
<div class= "col-xs-6 col-md-3" >
<a href= "#" class= "thumbnail" >
<img src= "..." alt= "..." >
</a>
</div>
...
</div>
Umxholo oqhelekileyo
Ngophawu olongezelelweyo olongezelelweyo, kuyenzeka ukongeza naluphi na uhlobo lomxholo we-HTML njengezihloko, imihlathi, okanye amaqhosha kwi-thumbnails.
Ileyibhile ye-Thumbnail
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
Iqhosha Iqhosha
Ileyibhile ye-Thumbnail
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
Iqhosha Iqhosha
Ileyibhile ye-Thumbnail
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
Iqhosha Iqhosha
Khuphela
<div class= "row" >
<div class= "col-sm-6 col-md-4" >
<div class= "thumbnail" >
<img src= "..." alt= "..." >
<div class= "caption" >
<h3> Thumbnail label</h3>
<p> ...</p>
<p><a href= "#" class= "btn btn-primary" role= "button" > Button</a> <a href= "#" class= "btn btn-default" role= "button" > Button</a></p>
</div>
</div>
</div>
</div>
Nikezela ngemiyalezo yengxelo yomxholo kwiintshukumo eziqhelekileyo zabasebenzisi kunye nesandla semiyalezo efumanekayo neguqukayo yesilumkiso.
Imizekelo
Songa nasiphi na isicatshulwa kunye neqhosha lokuchitha elikhethiweyo .alert
kunye nenye yeeklasi ezine zomxholo (umzekelo, .alert-success
) kwimiyalezo esisiseko yesilumkiso.
Akukho didi oluhlala lukhona
Izivuseleli azinazo iiklasi ezingagqibekanga, kuphela isiseko kunye neeklasi zesilungisi. Isivuseleli esihlala singwevu asenzi ingqiqo kakhulu, ngoko ke kufuneka ukhankanye uhlobo ngodidi lomxholo. Khetha kwimpumelelo, ulwazi, isilumkiso, okanye ingozi.
Wenze kakuhle! Ufunde ngempumelelo lo myalezo ubalulekileyo wesilumkiso.
Iintloko phezulu! Esi silumkiso sidinga ukuhoywa kwakho, kodwa asibalulekanga kakhulu.
Isilumkiso! Ngcono uzijonge, awubukeki umhle kakhulu.
Owu khawuleza! Guqula izinto ezimbalwa kwaye uzame ukuthumela kwakhona.
Khuphela
<div class= "alert alert-success" role= "alert" > ...</div>
<div class= "alert alert-info" role= "alert" > ...</div>
<div class= "alert alert-warning" role= "alert" > ...</div>
<div class= "alert alert-danger" role= "alert" > ...</div>
Izilumkiso ezigxothwayo
Yakha kuso nasiphi na isivuseleli ngokongeza .alert-dismissible
iqhosha elikhethiweyo kunye nokuvala.
×
Isilumkiso! Ngcono uzijonge, awubukeki umhle kakhulu.
Khuphela
<div class= "alert alert-warning alert-dismissible" role= "alert" >
<button type= "button" class= "close" data-dismiss= "alert" aria-label= "Close" ><span aria-hidden= "true" > × </span></button>
<strong> Warning!</strong> Better check yourself, you're not looking too good.
</div>
Unxulumano kwizilumkiso
Sebenzisa .alert-link
iklasi eluncedo ukubonelela ngokukhawuleza amakhonkco ahambelanayo anemibala ngaphakathi nakwesiphi na isilumkiso.
Khuphela
<div class= "alert alert-success" role= "alert" >
<a href= "#" class= "alert-link" > ...</a>
</div>
<div class= "alert alert-info" role= "alert" >
<a href= "#" class= "alert-link" > ...</a>
</div>
<div class= "alert alert-warning" role= "alert" >
<a href= "#" class= "alert-link" > ...</a>
</div>
<div class= "alert alert-danger" role= "alert" >
<a href= "#" class= "alert-link" > ...</a>
</div>
Nikela ngengxelo ehlaziyiweyo malunga nenkqubela phambili yomsebenzi okanye intshukumo enemivalo yenkqubela phambili elula kodwa ebhetyebhetye.
Ukuhambelana kwebrowser
Imivalo yenkqubela phambili isebenzisa iinguqu ze-CSS3 kunye noopopayi ukuphumeza ezinye zeziphumo zazo. Ezi mpawu azixhaswa kwi-Internet Explorer 9 nangaphantsi okanye kwiinguqulelo ezindala zeFirefox. I-Opera 12 ayixhasi oopopayi.
Ukuhambelana koMgaqo-nkqubo woKhuseleko (CSP).
Ukuba iwebhusayithi yakho inoMgaqo- nkqubo woKhuseleko loMxholo (CSP) ongavumeli , style-src 'unsafe-inline'
ngoko awuyi kukwazi ukusebenzisa style
iimpawu ezingaphakathi ukuseta ububanzi bebha yenkqubela njengoko kubonisiwe kwimizekelo yethu engezantsi. Iindlela ezizezinye zokuseta ububanzi obuhambelana neeCSP ezingqongqo zibandakanya ukusebenzisa iJavaScript encinci yesiko (eseta element.style.width
) okanye ukusebenzisa iiklasi zeCSS zesiko.
Umzekelo osisiseko
Ibar yenkqubela phambili ehlala ikho.
Khuphela
<div class= "progress" >
<div class= "progress-bar" role= "progressbar" aria-valuenow= "60" aria-valuemin= "0" aria-valuemax= "100" style= "width: 60%;" >
<span class= "sr-only" > 60% Complete</span>
</div>
</div>
Ngeleyibhile
Susa iklasi kwibar yenkqubela ukubonisa ipesenti ebonakalayo <span>
..sr-only
Khuphela
<div class= "progress" >
<div class= "progress-bar" role= "progressbar" aria-valuenow= "60" aria-valuemin= "0" aria-valuemax= "100" style= "width: 60%;" >
60%
</div>
</div>
Ukuqinisekisa ukuba okubhaliweyo kweleyibhile kuhlala kufundeka nakwipesenti ezisezantsi, cinga ngokudibanisa a min-width
kwibar yenkqubela phambili.
Khuphela
<div class= "progress" >
<div class= "progress-bar" role= "progressbar" aria-valuenow= "0" aria-valuemin= "0" aria-valuemax= "100" style= "min-width: 2em;" >
0%
</div>
</div>
<div class= "progress" >
<div class= "progress-bar" role= "progressbar" aria-valuenow= "2" aria-valuemin= "0" aria-valuemax= "100" style= "min-width: 2em; width: 2%;" >
2%
</div>
</div>
Iindlela ezizezinye zomxholo
Imivalo yenkqubela phambili isebenzisa enye iqhosha elifanayo kunye neeklasi zesilumkiso kwizimbo ezihambelanayo.
I-40% igqityiwe (impumelelo)
Khuphela
<div class= "progress" >
<div class= "progress-bar progress-bar-success" role= "progressbar" aria-valuenow= "40" aria-valuemin= "0" aria-valuemax= "100" style= "width: 40%" >
<span class= "sr-only" > 40% Complete (success)</span>
</div>
</div>
<div class= "progress" >
<div class= "progress-bar progress-bar-info" role= "progressbar" aria-valuenow= "20" aria-valuemin= "0" aria-valuemax= "100" style= "width: 20%" >
<span class= "sr-only" > 20% Complete</span>
</div>
</div>
<div class= "progress" >
<div class= "progress-bar progress-bar-warning" role= "progressbar" aria-valuenow= "60" aria-valuemin= "0" aria-valuemax= "100" style= "width: 60%" >
<span class= "sr-only" > 60% Complete (warning)</span>
</div>
</div>
<div class= "progress" >
<div class= "progress-bar progress-bar-danger" role= "progressbar" aria-valuenow= "80" aria-valuemin= "0" aria-valuemax= "100" style= "width: 80%" >
<span class= "sr-only" > 80% Complete (danger)</span>
</div>
</div>
Inemigca
Isebenzisa igradient ukwenza isiphumo esinemigca. Ayifumaneki kwi-IE9 nangaphantsi.
I-40% igqityiwe (impumelelo)
Khuphela
<div class= "progress" >
<div class= "progress-bar progress-bar-success progress-bar-striped" role= "progressbar" aria-valuenow= "40" aria-valuemin= "0" aria-valuemax= "100" style= "width: 40%" >
<span class= "sr-only" > 40% Complete (success)</span>
</div>
</div>
<div class= "progress" >
<div class= "progress-bar progress-bar-info progress-bar-striped" role= "progressbar" aria-valuenow= "20" aria-valuemin= "0" aria-valuemax= "100" style= "width: 20%" >
<span class= "sr-only" > 20% Complete</span>
</div>
</div>
<div class= "progress" >
<div class= "progress-bar progress-bar-warning progress-bar-striped" role= "progressbar" aria-valuenow= "60" aria-valuemin= "0" aria-valuemax= "100" style= "width: 60%" >
<span class= "sr-only" > 60% Complete (warning)</span>
</div>
</div>
<div class= "progress" >
<div class= "progress-bar progress-bar-danger progress-bar-striped" role= "progressbar" aria-valuenow= "80" aria-valuemin= "0" aria-valuemax= "100" style= "width: 80%" >
<span class= "sr-only" > 80% Complete (danger)</span>
</div>
</div>
Oopopayi
Yongeza ukuphilisa imivumbo ekunene ukuya ekhohlo .active
. .progress-bar-striped
Ayifumaneki kwi-IE9 nangaphantsi.
Khuphela
<div class= "progress" >
<div class= "progress-bar progress-bar-striped active" role= "progressbar" aria-valuenow= "45" aria-valuemin= "0" aria-valuemax= "100" style= "width: 45%" >
<span class= "sr-only" > 45% Complete</span>
</div>
</div>
Ipakishwe
Beka iibar ezininzi kwindawo enye .progress
ukuze uzipakishe.
I-35% igqityiwe (impumelelo)
20% Gqibezela (isilumkiso)
I-10% igqityiwe (ingozi)
Khuphela
<div class= "progress" >
<div class= "progress-bar progress-bar-success" style= "width: 35%" >
<span class= "sr-only" > 35% Complete (success)</span>
</div>
<div class= "progress-bar progress-bar-warning progress-bar-striped" style= "width: 20%" >
<span class= "sr-only" > 20% Complete (warning)</span>
</div>
<div class= "progress-bar progress-bar-danger" style= "width: 10%" >
<span class= "sr-only" > 10% Complete (danger)</span>
</div>
</div>
Izitayile zento engabonakaliyo yokwakha iindidi ezahlukeneyo zamacandelo (njengamagqabantshintshi eblogi, iiTweets, njalo njalo) ezibonisa umfanekiso osekhohlo okanye olungelelaniswe ekunene ecaleni komxholo wombhalo.
Imidiya engagqibekanga ibonisa into yemidiya (imifanekiso, ividiyo, iaudio) ngasekhohlo okanye ngasekunene kwebhloko yomxholo.
Khuphela
<div class= "media" >
<div class= "media-left" >
<a href= "#" >
<img class= "media-object" src= "..." alt= "..." >
</a>
</div>
<div class= "media-body" >
<h4 class= "media-heading" > Media heading</h4>
...
</div>
</div>
Iiklasi .pull-left
kwaye .pull-right
zikwakho kwaye bezisetyenziswa ngaphambili njengenxalenye yecandelo lemidiya, kodwa ziyekisiwe kulungiselelwa ukusetyenziswa njengev3.3.0. Ziphantse zilingane .media-left
kunye ne .media-right
, ngaphandle kokuba .media-right
kufuneka zibekwe emva kwe .media-body
html.
Imifanekiso okanye ezinye imidiya zinokulungelelaniswa phezulu, phakathi, okanye ezantsi. Ukungagqibeki kuhambelana phezulu.
Khuphela
<div class= "media" >
<div class= "media-left media-middle" >
<a href= "#" >
<img class= "media-object" src= "..." alt= "..." >
</a>
</div>
<div class= "media-body" >
<h4 class= "media-heading" > Middle aligned media</h4>
...
</div>
</div>
Ngophawu olongezelelweyo, ungasebenzisa imidiya engaphakathi kuluhlu (iluncedo kwimisonto yezimvo okanye uludwe lwamanqaku).
Khuphela
<ul class= "media-list" >
<li class= "media" >
<div class= "media-left" >
<a href= "#" >
<img class= "media-object" src= "..." alt= "..." >
</a>
</div>
<div class= "media-body" >
<h4 class= "media-heading" > Media heading</h4>
...
</div>
</li>
</ul>
Amaqela oluhlu ayinxalenye eguquguqukayo kwaye enamandla yokubonisa nje uluhlu olulula lwezinto, kodwa eziyinkimbinkimbi ezinomxholo wesiko.
Umzekelo osisiseko
Elona qela loluhlu olusisiseko luluhlu nje olungacwangciswanga olunezinto zoluhlu, kunye neeklasi ezifanelekileyo. Yakha phezu kwayo ngeenketho ezilandelayo, okanye eyakho iCSS njengoko kufuneka.
Cras justo odio
Dapibus ac facilisis in
UMorbi namhlanje
Porta ac consectetur ac
Vestibulum kunye eros
Khuphela
<ul class= "list-group" >
<li class= "list-group-item" > Cras justo odio</li>
<li class= "list-group-item" > Dapibus ac facilisis in</li>
<li class= "list-group-item" > Morbi leo risus</li>
<li class= "list-group-item" > Porta ac consectetur ac</li>
<li class= "list-group-item" > Vestibulum at eros</li>
</ul>
Iibheji
Yongeza icandelo leebheji kuyo nayiphi na into yeqela loluhlu kwaye ngokuzenzekelayo iya kubekwa ekunene.
14 Cras justo odio
2 Dapibus ac facilisis in
1 UMorbi namhlanje
Khuphela
<ul class= "list-group" >
<li class= "list-group-item" >
<span class= "badge" > 14</span>
Cras justo odio
</li>
</ul>
Izinto ezidityanisiweyo
Nxulumanisa uluhlu lwezinto zeqela ngokusebenzisa iithegi ze-ankile endaweni yezinto zoluhlu ( oko kukwathetha umzali <div>
endaweni ye <ul>
). Akukho mfuneko yabazali ngabanye malunga nento nganye.
Khuphela
<div class= "list-group" >
<a href= "#" class= "list-group-item active" >
Cras justo odio
</a>
<a href= "#" class= "list-group-item" > Dapibus ac facilisis in</a>
<a href= "#" class= "list-group-item" > Morbi leo risus</a>
<a href= "#" class= "list-group-item" > Porta ac consectetur ac</a>
<a href= "#" class= "list-group-item" > Vestibulum at eros</a>
</div>
Uluhlu lwezinto zeqela zingamaqhosha endaweni yezinto zoluhlu ( oku kuthetha ukuba umzali <div>
endaweni ye <ul>
). Akukho mfuneko yabazali ngabanye malunga nento nganye. Musa ukusebenzisa .btn
iiklasi eziqhelekileyo apha.
Cras justo odio
Dapibus ac facilisis in
UMorbi namhlanje
Porta ac consectetur ac
Vestibulum kunye eros
Khuphela
<div class= "list-group" >
<button type= "button" class= "list-group-item" > Cras justo odio</button>
<button type= "button" class= "list-group-item" > Dapibus ac facilisis in</button>
<button type= "button" class= "list-group-item" > Morbi leo risus</button>
<button type= "button" class= "list-group-item" > Porta ac consectetur ac</button>
<button type= "button" class= "list-group-item" > Vestibulum at eros</button>
</div>
Izinto ezikhubazekileyo
Yongeza .disabled
ku-a .list-group-item
ukuya kwingwevu ukuze ibonakale ikhubazekile.
Khuphela
<div class= "list-group" >
<a href= "#" class= "list-group-item disabled" >
Cras justo odio
</a>
<a href= "#" class= "list-group-item" > Dapibus ac facilisis in</a>
<a href= "#" class= "list-group-item" > Morbi leo risus</a>
<a href= "#" class= "list-group-item" > Porta ac consectetur ac</a>
<a href= "#" class= "list-group-item" > Vestibulum at eros</a>
</div>
Iiklasi zomxholo
Sebenzisa iiklasi zomxholo ukwenza uluhlu lwezinto, ezingagqibekanga okanye ezidityanisiweyo. Ikwabandakanya .active
urhulumente.
Dapibus ac facilisis in
Cras sit amet nibh libero
Porta ac consectetur ac
Vestibulum kunye eros
Khuphela
<ul class= "list-group" >
<li class= "list-group-item list-group-item-success" > Dapibus ac facilisis in</li>
<li class= "list-group-item list-group-item-info" > Cras sit amet nibh libero</li>
<li class= "list-group-item list-group-item-warning" > Porta ac consectetur ac</li>
<li class= "list-group-item list-group-item-danger" > Vestibulum at eros</li>
</ul>
<div class= "list-group" >
<a href= "#" class= "list-group-item list-group-item-success" > Dapibus ac facilisis in</a>
<a href= "#" class= "list-group-item list-group-item-info" > Cras sit amet nibh libero</a>
<a href= "#" class= "list-group-item list-group-item-warning" > Porta ac consectetur ac</a>
<a href= "#" class= "list-group-item list-group-item-danger" > Vestibulum at eros</a>
</div>
Umxholo oqhelekileyo
Yongeza phantse nayiphi na i-HTML ngaphakathi, nakuluhlu lwamaqela adityanisiweyo afana neli lingezantsi.
Khuphela
<div class= "list-group" >
<a href= "#" class= "list-group-item active" >
<h4 class= "list-group-item-heading" > List group item heading</h4>
<p class= "list-group-item-text" > ...</p>
</a>
</div>
Ngelixa kungasoloko kuyimfuneko, ngamanye amaxesha kufuneka ubeke iDOM yakho ebhokisini. Kwezo meko, zama icandelo lephaneli.
Umzekelo osisiseko
Ngokungagqibekanga, zonke izinto .panel
ezenziwayo zisebenzisa umda osisiseko kunye ne-padding ukuqulatha umxholo othile.
Umzekelo wephaneli esisiseko
Khuphela
<div class= "panel panel-default" >
<div class= "panel-body" >
Basic panel example
</div>
</div>
Iphaneli enesihloko
Yongeza ngokulula isikhongozeli sesihloko kwiphaneli yakho nge .panel-heading
. Ungabandakanya nayiphi na <h1>
- <h6>
ngeklasi .panel-title
ukongeza isihloko esibhalwe ngaphambili. Nangona kunjalo, ubukhulu befonti ye- <h1>
bakhutshelwa <h6>
ngaphezulu ngu .panel-heading
.
Ngombala wekhonkco ofanelekileyo, qiniseka ukubeka amakhonkco kwizihloko ngaphakathi .panel-title
.
Isihloko sephaneli ngaphandle kwesihloko
Umxholo wephaneli
Isihloko sephaneli
Umxholo wephaneli
Khuphela
<div class= "panel panel-default" >
<div class= "panel-heading" > Panel heading without title</div>
<div class= "panel-body" >
Panel content
</div>
</div>
<div class= "panel panel-default" >
<div class= "panel-heading" >
<h3 class= "panel-title" > Panel title</h3>
</div>
<div class= "panel-body" >
Panel content
</div>
</div>
Amaqhosha okusonga okanye umbhalo wesibini kwi .panel-footer
. Qaphela ukuba izingqinisiso zephaneli aziyidli ilifa imibala kunye nemida xa kusetyenziswa iimeko ezahlukeneyo njengoko zingenzelwanga ukuba zibe ngaphambili.
Khuphela
<div class= "panel panel-default" >
<div class= "panel-body" >
Panel content
</div>
<div class= "panel-footer" > Panel footer</div>
</div>
Iindlela ezizezinye zomxholo
Njengamanye amacandelo, ngokulula yenza indawo yolawulo ibe nentsingiselo ngakumbi kumxholo othile ngokongeza naluphi na uhlobo lomxholo womxholo.
Isihloko sephaneli
Umxholo wephaneli
Isihloko sephaneli
Umxholo wephaneli
Isihloko sephaneli
Umxholo wephaneli
Isihloko sephaneli
Umxholo wephaneli
Isihloko sephaneli
Umxholo wephaneli
Khuphela
<div class= "panel panel-primary" > ...</div>
<div class= "panel panel-success" > ...</div>
<div class= "panel panel-info" > ...</div>
<div class= "panel panel-warning" > ...</div>
<div class= "panel panel-danger" > ...</div>
Ngeetafile
Yongeza nayiphi na i-non-mida .table
ngaphakathi kwephaneli yoyilo olungenamthungo. Ukuba kukho i .panel-body
, songeza umda owongezelelweyo phezulu kwetafile yokwahlula.
Isihloko sephaneli
Omnye umxholo wendawo yolawulo apha. I-Nulla vitae elit libero, i-pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.
#
Igama lokuqala
Ifani
Igama lomsebenzisi
1
Phawula
Otto
@mdo
2
uYakobi
Thornton
@fat
3
Larry
intaka
@twitter
Khuphela
<div class= "panel panel-default" >
<!-- Default panel contents -->
<div class= "panel-heading" > Panel heading</div>
<div class= "panel-body" >
<p> ...</p>
</div>
<!-- Table -->
<table class= "table" >
...
</table>
</div>
Ukuba akukho qela lephaneli, ilungu liyashukuma ukusuka kumxholo wendawo yolawulo ukuya kwitafile ngaphandle kokuphazamiseka.
Isihloko sephaneli
#
Igama lokuqala
Ifani
Igama lomsebenzisi
1
Phawula
Otto
@mdo
2
uYakobi
Thornton
@fat
3
Larry
intaka
@twitter
Khuphela
<div class= "panel panel-default" >
<!-- Default panel contents -->
<div class= "panel-heading" > Panel heading</div>
<!-- Table -->
<table class= "table" >
...
</table>
</div>
Ngamaqela uluhlu
Bandakanya ngokulula uluhlu olupheleleyo amaqela ngaphakathi kuyo nayiphi na indawo yolawulo.
Isihloko sephaneli
Omnye umxholo wendawo yolawulo apha. I-Nulla vitae elit libero, i-pharetra augue. Aenean lacinia bibendum nulla sed consectetur. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Nullam id dolor id nibh ultricies vehicula ut id elit.
Cras justo odio
Dapibus ac facilisis in
UMorbi namhlanje
Porta ac consectetur ac
Vestibulum kunye eros
Khuphela
<div class= "panel panel-default" >
<!-- Default panel contents -->
<div class= "panel-heading" > Panel heading</div>
<div class= "panel-body" >
<p> ...</p>
</div>
<!-- List group -->
<ul class= "list-group" >
<li class= "list-group-item" > Cras justo odio</li>
<li class= "list-group-item" > Dapibus ac facilisis in</li>
<li class= "list-group-item" > Morbi leo risus</li>
<li class= "list-group-item" > Porta ac consectetur ac</li>
<li class= "list-group-item" > Vestibulum at eros</li>
</ul>
</div>
Vumela iibhrawuza ukuba zimisele imilinganiselo yevidiyo okanye isilayidi ngokusekwe kububanzi bebhloko equlathe kuyo ngokwenza umlinganiselo ongaphakathi oya kukala ngokufanelekileyo kuso nasiphi na isixhobo.
Imigaqo isetyenziswa ngokuthe ngqo kwi <iframe>
, <embed>
, <video>
, kunye <object>
neziqalelo; ngokuzikhethela sebenzisa udidi lomzukulwana olucacileyo .embed-responsive-item
xa ufuna ukuthelekisa isimbo sezinye iimpawu.
Pro-Tip! Awudingi ukubandakanya frameborder="0"
kwi- <iframe>
s yakho njengoko sibhala ngaphezulu oko kuwe.
Khuphela
<!-- 16:9 aspect ratio -->
<div class= "embed-responsive embed-responsive-16by9" >
<iframe class= "embed-responsive-item" src= "..." ></iframe>
</div>
<!-- 4:3 aspect ratio -->
<div class= "embed-responsive embed-responsive-4by3" >
<iframe class= "embed-responsive-item" src= "..." ></iframe>
</div>
Ukuhlala ngokufanelekileyo
Sebenzisa iqula njengesiphumo esilula kwi-elementi ukuyinika isiphumo sokufakwa.
Khuphela
<div class= "well" > ...</div>
Iiklasi ozikhethelayo
Lawula ukukhuselwa kunye neekona ezingqukuva ngeeklasi ezimbini ozikhethelayo zesilungisi.
Khangela, ndisequleni elikhulu!
Khuphela
<div class= "well well-lg" > ...</div>
Jonga, ndikwiqula elincinane!
Khuphela
<div class= "well well-sm" > ...</div>