Lintho tse ngata tse ka sebelisoang hape li hahiloe ho Bootstrap ho fana ka navigation, litemoso, popover, le tse ling tse ngata.
Mokhoa o bonolo le o sa reng letho oa pagination o bululetsoeng ke Rdio, o loketse lits'ebetso le liphetho tsa lipatlisiso. Sebaka se seholo se thata ho fosa, se ka senyeha habonolo, 'me se fana ka libaka tse kholo tsa ho tobetsa.
Lihokelo li ka khoneha 'me li sebetsa maemong a mangata ka sehlopha se nepahetseng. .disabled
bakeng sa lihokelo tse sa totobaleheng le .active
bakeng sa leqephe la hajoale.
Eketsa e 'ngoe ea lihlopha tse peli tseo u ka li khethang ho fetola lihokelo tsa pagination: .pagination-centered
le .pagination-right
.
Karolo ea kamehla ea pagination ea fetoha 'me e sebetsa ka mefuta e mengata.
E phuthetsoe ka <div>
, bohetene ke <ul>
.
- <div class = "pagination" >
- <ul>
- <li><a href = "#"> E fetileng </a></li>
- <li class = "active" >
- <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 = "#"> E latelang </a></li>
- </ul>
- </ div>
Karolo ea pager ke sete ea likhokahano bakeng sa ts'ebetso e bonolo ea bohetene e nang le markup e bobebe esita le mekhoa e bobebe. E ntle bakeng sa libaka tse bonolo joalo ka li-blog kapa limakasine.
Lihokelo tsa li-pager li boetse li sebelisa sehlopha se akaretsang .disabled
ho tloha boheteneng.
Ka ho sa feleng, li-pager centers li hokahanya.
- <ul class = "pager" >
- <li>
- <a href = "#"> E fetileng </a>
- </li>
- <li>
- <a href = "#"> E latelang </a>
- </li>
- </ul>
Ntle le moo, o ka hokahanya sehokelo se seng le se seng mahlakoreng:
- <ul class = "pager" >
- <li class = "e fetileng" >
- <a href = "#" > ← Khale </a>
- </li>
- <li class = "e latelang" >
- <a href = "#"> > Ntjhanyana → </a>
- </li>
- </ul>
Labels | Markup |
---|---|
Ea kamehla | <span class="label">Default</span> |
Katleho | <span class="label label-success">Success</span> |
Tlhokomediso | <span class="label label-warning">Warning</span> |
Bohlokoa | <span class="label label-important">Important</span> |
Info | <span class="label label-info">Info</span> |
E fapaneng | <span class="label label-inverse">Inverse</span> |
Libeche ke likaroloana tse nyane, tse bonolo bakeng sa ho hlahisa letšoao kapa palo ea mofuta o itseng. Li fumaneha hangata ho bareki ba lengolo-tsoibila joalo ka Mail.app kapa lits'ebetsong tsa mehala bakeng sa litsebiso.
Lebitso | Mohlala | Markup |
---|---|---|
Ea kamehla | 1 | <span class="badge">1</span> |
Katleho | 2 | <span class="badge badge-success">2</span> |
Tlhokomediso | 4 | <span class="badge badge-warning">4</span> |
Bohlokoa | 6 | <span class="badge badge-important">6</span> |
Info | 8 | <span class="badge badge-info">8</span> |
E fapaneng | 10 | <span class="badge badge-inverse">10</span> |
Bootstrap e fana ka karolo e bobebe, e tenyetsehang e bitsoang yuniti ea mohale ho bonts'a litaba sebakeng sa hau sa marang-rang. E sebetsa hantle ho mebaraka le liwebsaete tse boima ba litaba.
Qetella litaba tsa hau ka tsela e div
tšoanang:
- <div class = "hero-unit" >
- <h1> Sehlooho </h1>
- <p> Tagline </p>
- <p>
- <a class = "btn btn-primary btn-large">
- Ithute haholoanyane
- </a>
- </p>
- </ div>
Ena ke yuniti e bonolo ea mohale, karolo e bonolo ea mokhoa oa jumbotron bakeng sa ho lebisa tlhokomelo e eketsehileng ho litaba tse hlahang kapa lintlha.
Khetla e bonolo bakeng sa h1
ho beha sebaka ka nepo le ho arola likarolo tsa litaba leqepheng. E ka sebelisa h1
's default small
, element hammoho le likarolo tse ling tse ngata (ka mekhoa e meng).
- <div class = "leqephe-hlooho" >
- <h1> Sehlooho sa leqephe la mohlala </h1>
- </ div>
Ka nako e sa lekanyetsoang, linepe tsa Bootstrap li etselitsoe ho bonts'a litšoantšo tse hokahaneng tse nang le matšoao a fokolang a hlokahalang.
Ka li-markup tse ling, hoa khoneha ho kenya mofuta ofe kapa ofe oa litaba tsa HTML joalo ka lihlooho, lirapa, kapa likonopo ho li-thumbnails.
Li -thumbnails (pele .media-grid
ho fihlela v1.4) li ntle bakeng sa marang-rang a lifoto kapa livideo, liphetho tsa lipatlisiso tsa litšoantšo, lihlahisoa tsa mabenkele, li-portfolio, le tse ling tse ngata. E ka ba lihokelo kapa litaba tse sa fetoheng.
Letšoao la li-thumbnail le bonolo - ho ul
na le palo efe kapa efe ea li
likarolo ke sona se hlokahalang. E boetse e tenyetseha haholo, e lumella mofuta ofe kapa ofe oa litaba tse nang le li-markups tse ngatanyana ho thatela litaba tsa hau.
Qetellong, karolo ea li-thumbnail e sebelisa lihlopha tse seng li ntse li le teng tsa tsamaiso ea grid-joaloka .span2
kapa .span3
- bakeng sa ho laola boholo ba li-thumbnail.
Joalokaha ho boletsoe pejana, letšoao le hlokahalang bakeng sa li-thumbnails le bobebe ebile le hlakile. Mona ke ho sheba litlhophiso tsa kamehla tsa litšoantšo tse hokahantsoeng :
- <ul class = "thumbnails" >
- <li class = "span3" >
- <a href = "#" class = "thumbnail"> _
- <img src = "https://placehold.it/260x180" alt = "" >
- </a>
- </li>
- ...
- </ul>
Bakeng sa litaba tsa tloaelo tsa HTML ka har'a li-thumbnails, markup e fetoha hanyane. Ho lumella litaba tsa block level kae kapa kae, re fapanyetsana <a>
le <div>
tse ling tse joalo:
- <ul class = "thumbnails" >
- <li class = "span3" >
- <div class = "thumbnail" >
- <img src = "https://placehold.it/260x180" alt = "" >
- <h5> Leibole ya manane < /h5>
- <p> Lits'oants'o tse nyane hona mona... </p>
- </ div>
- </li>
- ...
- </ul>
Ka Bootstrap 2, re nolofalitse sehlopha sa motheo: .alert
sebakeng sa .alert-message
. Hape re fokolitse palo e tlase e hlokahalang - che <p>
e batloang ka ho sa feleng, e ka ntle feela <div>
.
Bakeng sa karolo e tšoarellang haholoanyane e nang le khoutu e nyane, re tlositse ponahalo e khethollang ea tlhokomeliso ea li-block, melaetsa e tlang le li-padding tse ngata le mongolo o mongata. Sehlopha le sona se fetohile ho .alert-block
.
Bootstrap e tla le plugin e ntle ea jQuery e ts'ehetsang melaetsa ea tlhokomeliso, e etsang hore e lelekoe kapele le ha bonolo.
Qetella molaetsa oa hau le aekhone ea boikhethelo ea ho koala ka div ka sehlopha se bonolo.
- <div class = "temoso" >
- < sehlopha sa konopo = "koala" data-dismiss = "temoso" > × </button>
- <strong> Temoso! </strong> Molemo ka ho fetisisa hlahloba u self, ha u shebahale hantle haholo.
- </ div>
Hlokomela! Lisebelisoa tsa iOS li hloka tlhokomeliso href="#"
bakeng sa ho tlosoa ha litemoso. Netefatsa hore oa e kenyelletsa le tšobotsi ea data bakeng sa li-icon tsa anchor close. Ntle le moo, o ka sebelisa <button>
ntho e nang le tšobotsi ea data, eo re khethileng ho e etsa bakeng sa litokomane tsa rona. Ha u sebelisa <button>
, u tlameha ho kenyelletsa type="button"
kapa liforomo tsa hau li ka 'na tsa se ke tsa fana ka tsona.
Atolosa molaetsa o tloaelehileng oa tlhokomeliso ka litlelase tse peli tseo u ka li khethang: .alert-block
bakeng sa li- padding tse ngata le li-taolo tsa mongolo le .alert-heading
bakeng sa sehlooho se nyallanang.
Ke hantle hore u itlhahlobe, ha u shebahale hantle haholo. Nulla vitae elit libero, pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
- <div class = "temoso ea tlhokomeliso-block" >
- <a class = "close" data-dismiss = "alert" href = "#"> × </a> _
- <h4 class = "alert-heading" > Tlhokomeliso! </h4>
- Ho molemo hore u itlhahlobe, ha u...
- </ div>
- <div class = "temoso-phoso ea tlhokomeliso" >
- ...
- </ div>
- <div class = "temoso-katleho ea tlhokomeliso" >
- ...
- </ div>
- <div class = "temoso ea tlhokomeliso-litaba" >
- ...
- </ div>
Sebaka sa kamehla sa tsoelo-pele se nang le gradient e otlolohileng.
- <div class = "tsoelopele" >
- <div class = "bar"
- style = " bophara : 60 %; " ></div>
- </ div>
E sebelisa gradient ho theha phello e metsero (ha ho IE).
- <div class = "tsoelopele-tsoelopele" >
- <div class = "bar"
- style = " bophara : 20 %; " ></div>
- </ div>
E nka mohlala o nang le mela 'me oa e phelisa (ha ho IE).
- <div class = "tsoelopele-tsoelopele
- e sebetsang" >
- <div class = "bar"
- style = " bophara : 40 %; " ></div>
- </ div>
Libaka tsa tsoelo-pele li sebelisa likonopo tse tšoanang le lihlopha tsa tlhokomeliso bakeng sa mekhoa e tsitsitseng.
Ho tšoana le mebala e tiileng, re na le mekoallo ea tsoelo-pele e fapaneng.
Libaka tsa tsoelo-pele li sebelisa liphetoho tsa CSS3, kahoo haeba u fetola bophara ka matla ka javascript, e tla fetola boholo ba eona hantle.
Haeba u sebelisa .active
sehlopha, mekoallo ea hau ea .progress-striped
tsoelo-pele e tla phelisa mela e tlohang ho le letšehali ho ea ho le letona.
Libaka tsa tsoelo-pele li sebelisa li-gradients tsa CSS3, liphetoho, le litšoantšo ho finyella liphello tsohle tsa tsona. Likarolo tsena ha li tšehetsoe ho IE7-9 kapa mefuta ea khale ea Firefox.
Opera le IE ha li tšehetse lipopae ka nako ena.
Sebelisa seliba e le phello e bonolo holim'a element ho e fa phello ea inset.
- <div class = "hantle" >
- ...
- </ div>
Sebelisa lets'oao le akaretsang la ho koala ho qhelela litaba tse kang mekhoa le litlhokomeliso.
- < sehlopha sa konopo = "koala" > &nako; </ konopo>
Lisebelisoa tsa iOS li hloka href="#" bakeng sa liketsahalo tsa ho tobetsa haeba u khetha ho sebelisa ankora.
- <a class = "close" href = "#" > × </a>