Lintlha tsa mantlha tsa HTML li entsoe le ho ntlafatsoa ka litlelase tse atolositsoeng.
Lihlooho tsohle tsa HTML, <h1>
ka har'a <h6>
tsona lia fumaneha.
Boemo ba lefatše ka bophara ba Bootstrap font-size
ke 14px , e nang line-height
le 20px . Sena se sebetsa <body>
lirapeng tsohle. Ho feta moo, <p>
(lirapa) li fumana moeli o ka tlase oa halofo ea bophahamo ba line ea tsona (10px ka ho sa feleng).
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. E entse hore ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. E entse hore ullamcorper nulla non metus auctor fringilla.
Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.
<p> ... </p>
Etsa hore serapa se hlahelle ka ho eketsa .lead
.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Ke mollis, e seng commodo luctus.
<p class = "etapele" > ... </p>
Sekala sa typographic se ipapisitse le mefuta e 'meli ea LESS ka mefuta-futa.ka tlase : @baseFontSize
le @baseLineHeight
. Ea pele ke boholo ba fonte e sebelisoang hohle 'me ea bobeli ke bophahamo ba mohala. Re sebelisa mefuta eo le lipalo tse bonolo ho theha marang-rang, li-padding, le bophahamo ba mela ea mefuta eohle ea rona le tse ling. Iketsetse tsona 'me u ikamahanye le Bootstrap.
Sebelisa li-tag tsa khatiso tsa HTML tse nang le mekhoa e bobebe.
<small>
Bakeng sa ho nyenyefatsa ka har'a mola kapa li-block tsa mongolo, sebelisa theke e nyane.
Mola ona oa mongolo o reretsoe ho nkoa e le mongolo o motle.
<p> <e nyenyane> Mola ona oa mongolo o reretsoe ho nkoa e le mongolo o motle. </ nyenyane> </p>
Bakeng sa ho totobatsa sekhechana sa mongolo ka boima bo boima ba fonte.
Sekhechana se latelang sa mongolo se ngotsoe joalo ka mongolo o motenya .
<strong> e ngotsoe joalo ka mongolo o motenya </strong>
Bakeng sa ho totobatsa sekhechana sa mongolo ka mongolo o tšekaletseng.
Sekhechana se latelang sa mongolo se ngotsoe joalo ka mongolo o tšekaletseng .
<em> e ngotsoe joalo ka mongolo o ngotsoeng ka mongolo o tšekaletseng </em>
Hlokomela!Ikutloe u lokolohile ho sebelisa <b>
le <i>
ho HTML5. <b>
e reretsoe ho totobatsa mantsoe kapa lipoleloana ntle le ho fana ka bohlokoa bo eketsehileng ha <i>
boholo e le ea lentsoe, mantsoe a theknoloji, joalo-joalo.
Hlophisa mongolo habonolo ho likarolo ka litlelase tsa tatellano ea mongolo.
Mongolo o tsamaellaneng le leqele.
Mongolo o tsepameng bohareng.
Mongolo o tsepameng ka ho le letona.
- <p class = "text-left" > Mongolo o tsamaellaneng le leqele. </p>
- <p class = "text-center" > Mongolo o tsamaellaneng le bohareng. </p>
- <p class = "text-right" > Mongolo o tsamaellaneng le letona. </p>
Hlahisa moelelo ka mebala ka lihlopha tse 'maloa tsa lisebelisoa tsa khatiso.
Fusce dapibus, tellus ac cursus commodo, tor mauris nibh.
Etiam porta sem malesuada magna mollis euismod.
E entse hore ullamcorper nulla non metus auctor fringilla.
Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
- <p class = "muted" > Fusce dapibus, tellus ac cursus commodo, tor mauris nibh. </p>
- <p class = "temoso ya mongolo" > Etiam porta sem malesuada magna mollis euismod. </p>
- <p class = "text-error" > Donec ullamcorper nulla non metus auctor fringilla. </p>
- <p class = "text-info" > Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis. </p>
- <p class = "text-success" > Duis mollis, est non commodo luctus, nisi erat porttitor ligula. </p>
Ts'ebetsong e hlophisitsoeng ea HTML's <abbr>
element bakeng sa khutsufatso le li-acronyms ho bonts'a mofuta o atolositsoeng ho hover. Likgutsufatso tse nang le title
tšobotsi li na le moeli o tlase o nang le matheba a bobebe le sekhesa sa thuso ho hover, se fanang ka moelelo o eketsehileng ho hover.
<abbr>
Bakeng sa mongolo o atolositsoeng holim'a sebaka se selelele sa khutsufatso, kenyelletsa title
tšobotsi.
Kgutsufatso ya lentsoe tšobotsi ke attr .
<abbr title = "attribute" > attr </abbr>
<abbr class="initialism">
Eketsa .initialism
ho khutsufatso ea boholo ba fonte e nyane hanyane.
HTML ke ntho e ntle ka ho fetisisa ho tloha ha bohobe bo sehiloeng.
<abbr title = "HyperText Markup Language" class = "initialism" > HTML </abbr>
Hlahisa lintlha tsa ho ikopanya le moholo-holo ea haufi kapa sehlopha sohle sa mosebetsi.
<address>
Boloka fomete ka ho qetella mela eohle ka <br>
.
- <aterese>
- <strong> Twitter, Inc. </strong><br>
- 795 Folsom Ave, Suite 600 <br>
- San Francisco, CA 94107 <br>
- <abbr title = "Mohala" > P: </abbr> (123) 456-7890
- </aterese>
- <aterese>
- <strong> Lebitso le Feletseng </strong><br>
- <a href = "mailto:#"> [email protected] </a> _
- </aterese>
Bakeng sa ho qotsa li-block tsa litaba tse tsoang mohloling o mong ka har'a tokomane ea hau.
Qetella HTML<blockquote>
efe kapa efe joalo ka qotso. Bakeng sa mantsoe a qotsitsoeng ka kotloloho re khothaletsa a .<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pokello e felletseng e na le palo e kholo.
- <blockquote>
- <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Posuere e feletseng e na le palo e kholo. </p>
- </blockquote>
Setaele le litaba li fetoha bakeng sa mefuta e bonolo ea blockquote e tloaelehileng.
Kenya <small>
tag bakeng sa ho tseba mohloli. Qetella lebitso la mosebetsi oa mohloli ka <cite>
.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pokello e felletseng e na le palo e kholo.
Motho ea tummeng ho Mohloli Title
- <blockquote>
- <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Posuere e feletseng e na le palo e kholo. </p>
- <e nyenyane> Motho ea tummeng <cite title = "Mohloli oa Sehlooho" > Sehlooho sa Mohloli </cite></small>
- </blockquote>
Sebelisa .pull-right
bakeng sa blockquote e phaphametseng, e lebang ka ho le letona.
- <blockquote class = "hula-ho le letona" >
- ...
- </blockquote>
Lethathamo la lintho tseo tatellano e sa tsotelleng ka ho hlaka.
- <ul>
- <li> ... </li>
- </ul>
Lethathamo la lintho tseo tatellano e bohlokoa ka ho hlaka.
- <ol>
- <li> ... </li>
- </ol>
Tlosa lintho tsa kamehla list-style
le tse ka letsohong le letšehali lethathamong la lintho (bana ba haufi feela).
- <ul class = "unstyled" >
- <li> ... </li>
- </ul>
Beha lintho tsohle tsa lethathamo moleng o le mong o nang inline-block
le mabone a mabone.
- <ul class = "inline" >
- <li> ... </li>
- </ul>
Lethathamo la mantsoe a nang le litlhaloso tse amanang le ona.
- <dl>
- <dt> ... </dt>
- <dd> ... </dd>
- </dl>
Etsa mantsoe le litlhaloso ka ho <dl>
latellana.
- <dl sehlopha = "dl-horizontal" >
- <dt> ... </dt>
- <dd> ... </dd>
- </dl>
Hlokomela!Manane a litlhaloso a tšekaletseng a tla fokotsa mantsoe a malelele haholo hore a kenelle karolong e ka ho le letšehali text-overflow
. Libopong tsa pono tse tšesaane, li tla fetohela ho sebopeho sa tlhophiso ea kamehla.
Qetella likotoana tse nyane tsa khoutu ka <code>
.
<section>
e lokela ho phutheloa joalo ka inline.
- Ka mohlala , <code> & lt ; karolo & gt ;</ code > e lokela ho phutheloa joalo ka inline .
Sebelisa <pre>
bakeng sa mela e mengata ea khoutu. Etsa bonnete ba hore u balehile masakaneng afe kapa afe a khouto bakeng sa phetolelo e nepahetseng.
<p>Mohlala oa mongolo mona...</p>
- <pele>
- <p>Mohlala oa mongolo mona...</p>
- </ pre>
Hlokomela!Etsa bonnete ba hore u boloka khoutu ka har'a <pre>
li-tag haufi le le letšehali kamoo ho ka khonehang; e tla fana ka li-tab tsohle.
O ka eketsa ka boikhethelo .pre-scrollable
sehlopha se tla beha bophahamo bo boholo ba 350px mme se fane ka y-axis scrollbar.
Bakeng sa setaele sa mantlha - padding e bobebe le li-divider tse tšekaletseng feela - eketsa sehlopha sa mantlha .table
ho eng kapa eng <table>
.
# | Lebitso la pele | Fane | Username |
---|---|---|---|
1 | Tšoaea | Otto | @mdo |
2 | Jakobo | Thornton | @mafura |
3 | Larry | Nonyana |
- < sehlopha sa tafole = "tafole" >
- …
- </tafole>
Kenya leha e le efe ea lihlopha tse latelang ho sehlopha .table
sa basebetsi.
.table-striped
E eketsa liqoaha moleng ofe kapa ofe oa tafole ka har'a khetho <tbody>
ea :nth-child
CSS (ha e fumanehe ho IE7-8).
# | Lebitso la pele | Fane | Username |
---|---|---|---|
1 | Tšoaea | Otto | @mdo |
2 | Jakobo | Thornton | @mafura |
3 | Larry | Nonyana |
- < sehlopha sa tafole = "table-striped table" >
- …
- </tafole>
.table-bordered
Kenya meeli le likhutlo tse chitja tafoleng.
# | Lebitso la pele | Fane | Username |
---|---|---|---|
1 | Tšoaea | Otto | @mdo |
Tšoaea | Otto | @getbootstrap | |
2 | Jakobo | Thornton | @mafura |
3 | Larry Nonyana |
- < sehlopha sa tafole = "tafole e moeling oa tafole" >
- …
- </tafole>
.table-hover
Lumella boemo ba hover holim'a mela ea tafole ka har'a <tbody>
.
# | Lebitso la pele | Fane | Username |
---|---|---|---|
1 | Tšoaea | Otto | @mdo |
2 | Jakobo | Thornton | @mafura |
3 | Larry Nonyana |
- < sehlopha sa tafole = "table table-hover" >
- …
- </tafole>
.table-condensed
E etsa hore litafole li kopane haholoanyane ka ho seha li-cell padding ka halofo.
# | Lebitso la pele | Fane | Username |
---|---|---|---|
1 | Tšoaea | Otto | @mdo |
2 | Jakobo | Thornton | @mafura |
3 | Larry Nonyana |
- < sehlopha sa tafole = "table table-condensed" >
- …
- </tafole>
Sebelisa litlelase tsa maemo ho mebala methalong ea litafole.
Sehlopha | Tlhaloso |
---|---|
.success |
E bontsha ketso e atlehileng kapa e ntle. |
.error |
E supa ketso e kotsi kapa e ka bang mpe. |
.warning |
E bontša temoso e ka 'nang ea hloka ho eloa hloko. |
.info |
E sebelisoa e le mokhoa o mong oa mefuta e sa tšoaneng. |
# | Sehlahisoa | Tefo e Nkiloeng | Boemo |
---|---|---|---|
1 | TB - Khoeli le khoeli | 01/04/2012 | E amohetsoe |
2 | TB - Khoeli le khoeli | 02/04/2012 | Hanne |
3 | TB - Khoeli le khoeli | 03/04/2012 | E emetse |
4 | TB - Khoeli le khoeli | 04/04/2012 | Letsetsa ho netefatsa |
- ...
- < tr class = "katleho" >
- <td> 1 < /td>
- <td>TB - Khoeli le Khoeli</ td >
- <td> 01 / 04 / 2012 < /td>
- <td>E amohetswe</ td >
- </ tr >
- ...
Lethathamo la likarolo tsa HTML tse tšehetsoeng le hore na li lokela ho sebelisoa joang.
Tag | Tlhaloso |
---|---|
<table> |
Karolo ea ho phuthela bakeng sa ho hlahisa data ka mokhoa oa tabular |
<thead> |
Karolo ea setshelo bakeng sa mela ea lihlooho tsa tafole ( <tr> ) ho tšoaea litšiea tsa tafole |
<tbody> |
Karolo ea setshelo bakeng sa mela ea tafole ( <tr> ) 'meleng oa tafole |
<tr> |
Karolo ea nkho bakeng sa sete ea lisele tsa tafole ( <td> kapa <th> ) tse hlahang moleng o le mong |
<td> |
Tafole ea kamehla |
<th> |
Tafole e khethehileng ea sele bakeng sa kholomo (kapa mola, ho ipapisitsoe le boholo le sebaka) lileibole |
<caption> |
Tlhaloso kapa kakaretso ea seo tafole e se tšoereng, haholo-holo ho babali ba skrineng |
- <tafole>
- <caption> ... </caption>
- <hlooho>
- <tr>
- <th> ... </th>
- <th> ... </th>
- </tr>
- </ hlooho>
- <botho>
- <tr>
- <td> ... </td>
- <td> ... </td>
- </tr>
- </tbody>
- </tafole>
Litaolo tsa liforomo tsa motho ka mong li fumana setaele, empa ntle le maemo a hlokahalang ho <form>
li-markup kapa liphetoho tse kholo. Liphetho ka li-labels tse behiloeng ka ho le letšehali holim'a litaelo tsa foromo.
- <foromo>
- <setsi sa masimo>
- <tšōmo> Tšōmo < /legend>
- <label> Lebitso la label </label>
- <input type = "text" placeholder = "Ngola ntho e itseng..." >
- <span class = "help-block" > Mohlala oa mongolo oa thuso oa boemo ba block mona. </span>
- <label class = "checkbox" >
- < mofuta oa ho kenya = "checkbox" > Nchebe
- </ label>
- < mofuta oa konopo = "submit" class = "btn" > Kenya </button>
- </ fieldset>
- </ form>
E kenyellelitsoe le Bootstrap ho na le mefuta e meraro ea boikhethelo bakeng sa linyeoe tsa tšebeliso e tloaelehileng.
Eketsa .form-search
foromong le .search-query
ho <input>
bakeng sa ho kenya mongolo ka botlalo.
- <form class = "form-search" >
- <input type = "text" class = "input-medium search-query" >
- <button type = "submit" class = "btn" > Batla </button>
- </ form>
Eketsa .form-inline
bakeng sa lileibole tse tsepameng le lets'ehali le li-control tsa inline-block bakeng sa sebopeho se kopaneng.
- <form class = "form-inline" >
- <input type = "text" class = "input-small" placeholder = "Imeile" >
- <input type = "password" class = "input-small" placeholder = "Password" >
- <label class = "checkbox" >
- <input type = "checkbox" > Nkgopole
- </ label>
- < mofuta oa konopo = "submit" class = "btn" > Kena </button>
- </ form>
Hlophisa li-label ka ho le letona 'me u li phaphamele ka ho le letšehali ho etsa hore li hlahe moleng o tšoanang le oa li-control. E hloka liphetoho tse ngata ho tsoa ho foromo ea kamehla:
.form-horizontal
ka foromo.control-group
.control-label
ho label.controls
bakeng sa tlhophiso e nepahetseng
- <form class = "form-horizontal" >
- <div class = "control-group" >
- <label class = "control-label" bakeng sa = "inputEmail" > Imeile </label>
- <div class = "taolo" >
- <input type = "text" id = "inputEmail" placeholder = " Imeile" >
- </ div>
- </ div>
- <div class = "control-group" >
- <label class = "control-label" bakeng sa = "inputPassword" > Password </label>
- <div class = "taolo" >
- <input type = "password" id = "inputPassword" placeholder = " Password" >
- </ div>
- </ div>
- <div class = "control-group" >
- <div class = "taolo" >
- <label class = "checkbox" >
- <input type = "checkbox" > Nkgopole
- </ label>
- < mofuta oa konopo = "submit" class = "btn" > Kena </button>
- </ div>
- </ div>
- </ form>
Mehlala ea li-control tse tloaelehileng tsa liforomo tse tšehetsoeng ka sebopeho sa sebopeho sa mohlala.
Taolo ea liforomo tse atileng haholo, likarolo tsa mongolo tse thehiloeng ho mongolo. E kenyelletsa ts'ehetso ea mefuta eohle ea HTML5: mongolo, password, nako, nako ea lehae, letsatsi, khoeli, nako, beke, nomoro, lengolo-tsoibila, url, batla, mohala le mmala.
E hloka ho sebelisa sesebelisoa se khethehileng type
ka linako tsohle.
- <input type = "text" placeholder = "Mongolo oa mongolo" >
Taolo ea foromo e ts'ehetsang mela e mengata ea mongolo. Fetola rows
tšobotsi ha ho hlokahala.
- <textarea rows = " 3" ></textarea>
Mabokose ke a ho khetha khetho e le 'ngoe kapa tse' maloa lethathamong ha liea-le-moea e le tsa ho khetha khetho e le 'ngoe ho tse ngata.
- <label class = "checkbox" >
- <input type = "checkbox" value = "" >
- Khetho ea pele ke ena le eane-etsa bonnete ba hore o kenyelletsa hore na hobaneng e le ntle
- </ label>
- <label class = "radio" >
- <input type = "radio" name = "optionsRadios" id = "optionsRadios1" value = "option1" e hlahlobilwe >
- Khetho ea pele ke ena le eane-etsa bonnete ba hore o kenyelletsa hore na hobaneng e le ntle
- </ label>
- <label class = "radio" >
- <input type = "radio" name = "optionsRadios" id = "optionsRadios2" value = "option2" >
- Khetho ea bobeli e ka ba ntho e 'ngoe' me ho e khetha ho tla tlosa khetho ea pele
- </ label>
Eketsa .inline
sehlopha ho letoto la li-checkbox kapa liea-le-moea bakeng sa li-control tse hlahang moleng o le mong.
- <label class = "checkbox inline" >
- <input type = "checkbox" id = "inlineCheckbox1" value = "option1" > 1
- </ label>
- <label class = "checkbox inline" >
- <input type = "checkbox" id = "inlineCheckbox2" value = "option2" > 2
- </ label>
- <label class = "checkbox inline" >
- <input type = "checkbox" id = "inlineCheckbox3" value = "option3" > 3
- </ label>
Sebelisa khetho ea kamehla kapa u hlalose a multiple="multiple"
ho bontša likhetho tse ngata ka nako e le 'ngoe.
- <khetha>
- <khetho> 1 </ kgetho>
- <khetho> 2 </ kgetho>
- <khetho> 3 </ kgetho>
- <khetho> 4 </ kgetho>
- < kgetho> 5 </ kgetho>
- </ khetha>
- <khetha multiple = "multiple" >
- <khetho> 1 </ kgetho>
- <khetho> 2 </ kgetho>
- <khetho> 3 </ kgetho>
- <khetho> 4 </ kgetho>
- < kgetho> 5 </ kgetho>
- </ khetha>
E eketsa ka holim'a li-control tse teng tsa sebatli, Bootstrap e kenyelletsa likarolo tse ling tsa bohlokoa tsa foromo.
Kenya mongolo kapa likonopo pele kapa ka mor'a tlhahiso efe kapa efe e thehiloeng ho mongolo. Hlokomela hore select
likarolo ha li tšehetsoe mona.
Qetella ka .add-on
le e input
'ngoe ea lihlopha tse peli ho lokisetsa kapa ho hlomathisa mongolo ho kenyeletso.
- <div class = "input-prepend" >
- <span class = "eketsa-on" > @ </span>
- <input class = "span2" id = "prependedInput" type = "text" setshwari sa sebaka = "Username" >
- </ div>
- <div class = "input-append" >
- <input class = "span2" id = "appendedInput" type = "text" >
- <span class = "eketsa-on" > .00 </span>
- </ div>
Sebelisa litlelase ka bobeli le mehlala e 'meli ea .add-on
ho lokisetsa le ho eketsa tlhahiso.
- <div class = "input-prepend input-append" >
- <span class = "eketsa-on" > $ </span>
- <input class = "span2" id = "appendedPrependedInput" type = "text" >
- <span class = "eketsa-on" > .00 </span>
- </ div>
Sebakeng sa a <span>
nang le mongolo, sebelisa a .btn
ho hokela konopo (kapa tse peli) ho kenyeletso.
- <div class = "input-append" >
- <input class = "span2" id = "appendedInputButton" type = "text" >
- < sehlopha sa konopo = "btn" type = "button" > Eya! </ konopo>
- </ div>
- <div class = "input-append" >
- <input class = "span2" id = "appendedInputButtons" type = "text" >
- <button class = "btn" type = "button" > Batla </button>
- < sehlopha sa konopo = "btn" type = "button" > Dikgetho </button>
- </ div>
- <div class = "input-append" >
- <input class = "span2" id = "appendedDropdownButton" type = "text" >
- <div class = "btn-group" >
- <button class = "btn dropdown-toggle" data-toggle = "dropdown" >
- Ketso
- <span class = "caret" > </span>
- </ konopo>
- <ul class = "dropdown-menu" >
- ...
- </ul>
- </ div>
- </ div>
- <div class = "input-prepend" >
- <div class = "btn-group" >
- <button class = "btn dropdown-toggle" data-toggle = "dropdown" >
- Ketso
- <span class = "caret" > </span>
- </ konopo>
- <ul class = "dropdown-menu" >
- ...
- </ul>
- </ div>
- <input class = "span2" id = "prependedDropdownButton" type = "text" >
- </ div>
- <div class = "input-prepend input-append" >
- <div class = "btn-group" >
- <button class = "btn dropdown-toggle" data-toggle = "dropdown" >
- Ketso
- <span class = "caret" > </span>
- </ konopo>
- <ul class = "dropdown-menu" >
- ...
- </ul>
- </ div>
- <input class = "span2" id = "appendedPrependedDropdownButton" type = "text" >
- <div class = "btn-group" >
- <button class = "btn dropdown-toggle" data-toggle = "dropdown" >
- Ketso
- <span class = "caret" > </span>
- </ konopo>
- <ul class = "dropdown-menu" >
- ...
- </ul>
- </ div>
- </ div>
- <foromo>
- <div class = "input-prepend" >
- <div class = "btn-group" > ... </div>
- <input type = "text" >
- </ div>
- <div class = "input-append" >
- <input type = "text" >
- <div class = "btn-group" > ... </div>
- </ div>
- </ form>
- <form class = "form-search" >
- <div class = "input-append" >
- <input type = "text" class = "span2 search-query" >
- <button type = "submit" class = "btn" > Batla </button>
- </ div>
- <div class = "input-prepend" >
- <button type = "submit" class = "btn" > Batla </button>
- <input type = "text" class = "span2 search-query" >
- </ div>
- </ form>
Sebelisa lihlopha tsa boholo bo lekanyelitsoeng joaloka .input-large
kapa u bapise lintho tseo u li kentseng le boholo ba kholomo ea grid u sebelisa .span*
lihlopha.
Etsa hore ntho efe <input>
kapa efe <textarea>
e itšoare joalo ka karolo ea block level.
- <input class = "input-block-level" type = "text" placeholder = ".input-block-level" >
- <input class = "input-mini" type = "text" placeholder = ".input-mini" >
- <input class = "input-small" type = "text" placeholder = ".input-small" >
- <input class = "input-medium" type = "text" placeholder = ".input-medium" >
- <input class = "input-large" type = "text" placeholder = ".input-large" >
- <input class = "input-xlarge" type = "text" placeholder = ".input-xlarge" >
- <input class = "input-xxlarge" type = "text" placeholder = ".input-xxlarge" >
Hlokomela!Liphetolelong tse tlang, re tla be re fetola ts'ebeliso ea litlelase tsena tse amanang ho tsamaisana le boholo ba likonopo tsa rona. Ka mohlala, .input-large
e tla eketsa palo le boholo ba fonte ea ho kenya.
Sebelisa .span1
ho .span12
bakeng sa lintho tse kenang tse tsamaellanang le likholomo tsa grid.
- <input class = "span1" type = "text" placeholder = ".span1" >
- <input class = "span2" type = "text" setshwari sa sebaka = ".span2" >
- <input class = "span3" type = "text" setshwari sa sebaka = ".span3" >
- <khetha sehlopha = "span1" >
- ...
- </ khetha>
- <khetha sehlopha = "span2" >
- ...
- </ khetha>
- <khetha sehlopha = "span3" >
- ...
- </ khetha>
Bakeng sa lisebelisoa tse ngata tsa grid moleng o mong le o mong, sebelisa .controls-row
sehlopha sa mofetoleli bakeng sa sebaka se nepahetseng . E phaphametsa lintho tse kenang ho putlamisa sebaka se sesoeu, e beha mecheng e nepahetseng, 'me e hlakola phaphametse.
- <div class = "taolo" >
- <input class = "span5" type = "text" placeholder = ".span5" >
- </ div>
- <div class = "controls-rows-row" >
- <input class = "span4" type = "text" setshwari sa sebaka = ".span4" >
- <input class = "span1" type = "text" placeholder = ".span1" >
- </ div>
- ...
Hlahisa lintlha ka mokhoa o ke keng oa lokisoa ntle le ho sebelisa markup ea 'nete.
- <span class = "input-xlarge e ke keng ea hlophisoa" > Boleng bo itseng mona </span>
Qetella foromo ka sehlopha sa liketso (likonopo). Ha e behiloe ka har'a .form-actions
, likonopo li tla ikemela ka bo eona ho tsamaisana le li-control tsa foromo.
- <div class = "liketso tsa sebopeho" >
- < mofuta oa konopo = "submit" class = "btn btn-primary" > Boloka liphetoho </button>
- < mofuta oa konopo = "button" class = "btn" > Hlakola </button>
- </ div>
Ts'ehetso ea boemo ba inline le block bakeng sa mongolo oa thuso o hlahang haufi le taolo ea liforomo.
- <input type = "text" ><span class = "help-inline" > Mongolo wa thuso ka hara </span>
- <input type = "text" ><span class = "help-block" > Sengoloa se selelele sa thuso se phunyeletsang moleng o mocha mme se ka fetela ka nģ'ane ho mola o le mong. </span>
Fana ka maikutlo ho basebelisi kapa baeti ka maikutlo a mantlha mabapi le taolo ea liforomo le lileibole.
Re tlosa outline
litaele tsa kamehla litaolong tsa mefuta e meng ebe re sebelisa a box-shadow
sebakeng sa eona bakeng sa :focus
.
- <input class = "input-xlarge" id = "focusedInput" type = "text" value = "Sena se tsepamisitswe..." >
Litlhahiso tsa setaele ka tšebetso ea sebatli sa kamehla ka :invalid
. Hlalosa a type
, eketsa required
tšobotsi haeba tšimo e se khetho, 'me (haeba ho hlokahala) hlalosa pattern
.
Sena ha se fumanehe liphetolelong tsa Internet Explorer 7-9 ka lebaka la khaello ea tšehetso ea CSS pseudo selectors.
- <input class = "span3" type = "imeile" e hlokahalang >
Kenya disabled
tšobotsi ho kenyelletso ho thibela tlhahiso ea mosebelisi le ho tsosa chebahalo e fapaneng hanyane.
- <input class = "input-xlarge" id = "disabledInput" type = "text" setshwari sa sebaka = "Kentswe e holofetseng mona..." e koalehile >
Bootstrap e kenyelletsa mekhoa ea ho netefatsa liphoso, temoso, lintlha le melaetsa ea katleho. Ho sebelisa, eketsa sehlopha se loketseng ho tse potolohileng .control-group
.
- <div class = "temoso ea sehlopha sa taolo" >
- <label class = "control-label" for = "inputWarning" > Kena ka temoso </label>
- <div class = "taolo" >
- <input type = "text" id = "inputWarning" >
- <span class = "help-inline" > Ho ka etsahala hore ebe ho na le phoso </span>
- </ div>
- </ div>
- <div class = "phoso ea sehlopha sa taolo" >
- <label class = "control-label" for = "inputError" > Kena ka phoso </label>
- <div class = "taolo" >
- <input type = "text" id = "inputError" >
- <span class = "help-inline" > Ka kopo, lokisa phoso </span>
- </ div>
- </ div>
- <div class = "control-group info" >
- <label class = "control-label" for = "inputInfo" > Kena ka lintlha </label>
- <div class = "taolo" >
- <input type = "text" id = "inputInfo" >
- <span class = "help-inline" > Username e se e nkiloe </span>
- </ div>
- </ div>
- <div class = "katleho ea sehlopha sa taolo" >
- <label class = "control-label" for = "inputSuccess" > Kenyo ka katleho </label>
- <div class = "taolo" >
- <input type = "text" id = "inputSuccess" >
- <span class = "help-inline" > Woohoo! </span>
- </ div>
- </ div>
Kenya litlelase ho <img>
element ho seta litšoantšo habonolo morerong ofe kapa ofe.
- <img src = "..." sehlopha = "img-rounded" >
- <img src = "..." sehlopha = "img-circle" >
- <img src = "..." sehlopha = "img-polaroid" >
Hlokomela! .img-rounded
'me .img-circle
u se ke ua sebetsa ho IE7-8 ka lebaka la ho hloka border-radius
tšehetso.
Litšoantšo tse 140 ka sebopeho sa sprite, tse fumanehang ka bohlooho bo lefifi (kamehla) le bosoeu, bo fanoeng ke Glyphicons .
Li-Glyphicons Halflings hangata ha li fumanehe mahala, empa tlhophiso lipakeng tsa Bootstrap le baetsi ba Glyphicons e entse hore sena se khonehe ntle ho tefo ho uena joalo ka bahlahisi. Rea leboha, re u kopa ho kenyelletsa sehokelo sa boikhethelo ho khutlela ho Glyphicons neng kapa neng ha ho khoneha.
Litšoantšo tsohle li hloka <i>
tag e nang le sehlopha se ikhethileng, se kentsoeng pele ka icon-
. Ho e sebelisa, beha khoutu e latelang hoo e ka bang kae kapa kae:
- <i class = "icon-search" > </i>
Ho boetse ho na le mefuta e fumanehang bakeng sa litšoantšo tse inverted (tse tšoeu), tse lokiselitsoeng ka sehlopha se le seng. Re tla qobella sehlopha sena ka ho khetheha ho hover le linaha tse sebetsang bakeng sa lihokelo tsa nav le dropdown.
- <i class = "icon-search icon-white" ></i>
Hlokomela!Ha u sebelisa ka thoko ho likhoele tsa mongolo, joalo ka likonopo kapa lihokelo tsa nav, etsa bonnete ba hore u siea sebaka ka mor'a <i>
tag bakeng sa sebaka se nepahetseng.
Li sebelise ka likonopo, lihlopha tsa likonopo bakeng sa toolbar, navigation, kapa ho kenya liforomo tse reriloeng esale pele.
- <div class = "btn-toolbar" >
- <div class = "btn-group" >
- <a class = "btn" href = "#" ><i class = "icon-align-left" ></i></a>
- <a class = "btn" href = "#" ><i class = "icon-align-center" ></i></a>
- <a class = "btn" href = "#" ><i class = "icon-align-right" ></i></a>
- <a class = "btn" href = "#" ><i class = "icon-align-justify" ></i></a>
- </ div>
- </ div>
- <div class = "btn-group" >
- <a class = "btn btn-primary" href = "#" ><i class = "icon-user icon-white" ></i> User </a>
- <a class = "btn btn-primary dropdown-toggle" data-toggle = "dropdown" href = "#" ><span class = "caret" ></span></a>
- <ul class = "dropdown-menu" >
- <li><a href = "#" ><i class = "icon-pencil" ></i> Fetola </a></li>
- <li><a href = "#" ><i class = "icon-trash" ></i> Hlakola </a></li>
- <li><a href = "#" ><i class = "icon-ban-circle" ></i> Thibela </a></li>
- <li class = "divider" > </li>
- <li><a href = "#" ><i class = "i" ></i> Etsa admin </a></li>
- </ul>
- </ div>
- <a class = "btn btn-large" href = "#" ><i class = "icon-star" ></i> Naledi </a>
- <a class = "btn btn-small" href = "#" ><i class = "icon-star" ></i> Star </a>
- <a class = "btn btn-mini" href = "#" ><i class = "icon-star" ></i> Naledi </a>
- <ul class = "nav nav-list" >
- <li class = "active" ><a href = "#" ><i class = "icon-leecon-white icon" ></i> Lehae </a></li>
- <li><a href = "#" ><i class = "icon-book" ></i> Library </a></li>
- <li><a href = "#" ><i class = "icon-pencil" ></i> Lisebelisoa </a></li>
- <li><a href = "#" ><i class = "i" ></i> Misc </a></li>
- </ul>
- <div class = "control-group" >
- <label class = "control-label" bakeng sa = "inputIcon" > Aterese ea lengolo-tsoibila </label>
- <div class = "taolo" >
- <div class = "input-prepend" >
- <span class = "eketsa-on" ><i class = "icon-enfelopo" ></i></span>
- <input class = "span2" id = "inputIcon" type = "text" >
- </ div>
- </ div>
- </ div>