Hoʻopili ʻia nā mea HTML kumu a hoʻonui ʻia me nā papa hoʻonui.
Loaʻa nā poʻomanaʻo HTML <h1>
a <h6>
pau.
ʻO ka paʻamau honua o Bootstrap font-size
he 14px , me line-height
ka 20px . Hoʻohana ʻia kēia i ka <body>
a me nā paukū āpau. Eia hou, <p>
loaʻa (nā paukū) ka palena lalo o ka hapalua o ko lākou kiʻekiʻe laina (10px ma ka paʻamau).
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. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.
Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida and eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.
<p> ... </p>
E hoʻokaʻawale i kahi paukū ma ka hoʻohui ʻana i .lead
.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
<p papa = "alakaʻi" > ... </p>
Hoʻokumu ʻia ka pālākiō kiʻi ma luna o ʻelua mau ʻokoʻa LESS ma nā variables.less : @baseFontSize
a me @baseLineHeight
. ʻO ka mua, ʻo ia ka nui font-nui i hoʻohana ʻia a puni a ʻo ka lua ke kiʻekiʻe laina kumu. Hoʻohana mākou i kēlā mau mea hoʻololi a me kekahi makemakika maʻalahi e hana i nā palena, nā pale, a me nā kiʻekiʻe laina o kā mākou ʻano āpau a ʻoi aku. Hoʻopilikino iā lākou a hoʻololi ʻo Bootstrap.
E hoʻohana i nā hōʻailona koʻikoʻi o HTML me nā ʻano māmā.
<small>
No ka hoʻokaʻawale ʻana i ka laina a i ʻole nā poloka o ke kikokikona, e hoʻohana i ka lepili liʻiliʻi.
ʻO kēia laina kikokikona i manaʻo ʻia e mālama ʻia ma ke ʻano he paʻi maikaʻi.
<p> <liʻiliʻi> Manaʻo ʻia kēia laina kikokikona ma ke ʻano he paʻi maikaʻi. </liʻiliʻi> </p>
No ka hoʻoikaika ʻana i kahi snippet o ke kikokikona me ke kaumaha o ka font.
Ua unuhi ʻia kēia ʻāpana kikokikona ma ke ʻano he kikokikona wiwo ʻole .
<strong> hāʻawi ʻia ma ke ʻano he kikokikona wiwo ʻole </strong>
No ka hoʻoikaika ʻana i kahi snippet o nā kikokikona me nā kikoʻī.
Ua unuhi ʻia kēia ʻāpana kikokikona ma ke ʻano he kikokikona italicized .
<em> i unuhi ʻia ma ke ʻano he kikokikona italicized </em>
Nā poʻo i luna!E ʻoluʻolu e hoʻohana <b>
a <i>
ma HTML5. <b>
ʻO ka manaʻo e hōʻike i nā huaʻōlelo a i ʻole nā huaʻōlelo me ka ʻole o ka lawe ʻana i nā mea koʻikoʻi aʻo <i>
ka hapa nui no ka leo, nā ʻōlelo loea, etc.
Hoʻololi maʻalahi i ka kikokikona i nā ʻāpana me nā papa hoʻoponopono kikokikona.
He kikokikona laulima hema.
kikokikona kaulike waena.
kikokikona pololei pololei.
- <p class = "text-left" > He kikokikona align hema. </p>
- <p class = "text-center" > kikokikona i hoʻohālikelike ʻia i waena. </p>
- <p class = "text-right" > kikokikona i hoʻopaʻa ʻia ʻākau . </p>
E hōʻike i ka manaʻo ma o ka waihoʻoluʻu me ka lima o nā papa hana koʻikoʻi.
Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.
Etiam porta sem malesuada magna mollis euismod.
Donec 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, tortor mauris nibh. </p>
- <p class = "text-warning" > 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>
Hoʻohana ʻia i ka mea HTML <abbr>
no nā pōkole a me nā acronyms e hōʻike i ka mana i hoʻonui ʻia ma ka hover. ʻO nā pōkole me kahi title
hiʻohiʻona, loaʻa kahi palena lalo kikoʻī māmā a me kahi ʻōkuhi kōkua ma ka hover, e hāʻawi ana i ka pōʻaiapili hou ma ka hover.
<abbr>
No nā kikokikona i hoʻonui ʻia ma ka hoʻopaʻa lōʻihi o kahi pōkole, e hoʻokomo i ka title
ʻano.
ʻO ka pōkole o ka huaʻōlelo attribute ʻo attr .
<abbr title = "ʻano" > attr </abbr>
<abbr class="initialism">
Hoʻohui .initialism
i kahi pōkole no ka liʻiliʻi liʻiliʻi.
ʻO HTML ka mea maikaʻi loa mai ka ʻāpana palaoa.
<abbr title = "HyperText Markup Language" class = "initialism" > HTML </abbr>
E hōʻike i ka ʻike pili no ke kupuna kokoke a i ʻole ke kino holoʻokoʻa o ka hana.
<address>
E mālama i ka hōpili ʻana ma ka hoʻopau ʻana i nā laina āpau me <br>
.
- < helu wahi >
- <strong> Twitter, Inc. </strong><br>
- 795 Folsom Ave, Suite 600 <br>
- Kapalakiko, CA 94107 <br>
- <abbr title = "Phone" > P: </abbr> (123) 456-7890
- </address>
- < helu wahi >
- <strong> Inoa piha </strong><br>
- <a href = "mailto:#" > [email protected] </a>
- </address>
No ka haʻi ʻana i nā poloka maʻiʻo mai kahi kumu ʻē aʻe i loko o kāu palapala.
E <blockquote>
kāʻei i kekahi HTML e like me ka ʻōlelo. No nā huaʻōlelo pololei, paipai mākou i kahi <p>
.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
- <blockquote>
- <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. </p>
- </blockquote>
Hoʻololi ke ʻano a me ka ʻike no nā hoʻololi maʻalahi ma kahi blockquote maʻamau.
Hoʻohui <small>
i ka hōʻailona no ka ʻike ʻana i ke kumu. E kāʻei i ka inoa o ka hana kumu ma <cite>
.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Kekahi mea kaulana ma Source Title
- <blockquote>
- <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante. </p>
- <small> Kekahi mea kaulana <cite title = "Source Title" > Source Title </cite></small>
- </blockquote>
E hoʻohana .pull-right
no kahi ʻōlelo blockquote i lana ʻia.
- <blockquote class = "huki-'ākau" >
- ...
- </blockquote>
He papa inoa o nā mea i pili ʻole i ke kauoha .
- <ul>
- <li> ... </li>
- </ul>
He papa inoa o nā mea i manaʻo nui ʻia ke kauoha .
- <ol>
- <li> ... </li>
- </ol>
Wehe i ka list-style
pale paʻamau a waiho ʻia ma nā mea papa inoa (nā keiki koke wale nō).
- <ul class = "unstyled" >
- <li> ... </li>
- </ul>
E kau i nā mea papa inoa a pau ma ka laina hoʻokahi inline-block
a me kahi pale māmā.
- <ul class = "inline" >
- <li> ... </li>
- </ul>
He papa inoa o nā huaʻōlelo me kā lākou mau wehewehe pili.
- <dl>
- <dt> ... </dt>
- <dd> ... </dd>
- </dl>
E hana i nā huaʻōlelo a me nā wehewehe ʻana ma ka <dl>
laina ʻaoʻao.
- <dl class = "dl-horizontal" >
- <dt> ... </dt>
- <dd> ... </dd>
- </dl>
Nā poʻo i luna!E ʻoki ʻia nā ʻōlelo wehewehe ʻāpae i nā huaʻōlelo lōʻihi loa a hiki ke kūpono i ka hoʻoponopono kolamu hema text-overflow
. Ma nā wahi ʻike haiki, e hoʻololi lākou i ka hoʻonohonoho hoʻonohonoho paʻamau.
E kāʻei i nā ʻāpana code inline me <code>
.
<section>
pono e ʻōwili ʻia e like me ka inline.
- No ka laʻana , <code> & lt ; ʻāpana & gt ;</ code > pono e ʻōwili ʻia e like me ka laina .
Hoʻohana <pre>
no nā laina helu he nui. E hōʻoia e pakele i nā bracket angle i loko o ke code no ka hoʻolilo kūpono.
<p>He laʻana kikokikona ma ʻaneʻi...</p>
- <mua>
- <p>Laʻana kikokikona ma aneʻi...</p>
- </pre>
Nā poʻo i luna!E mālama pono i ke code i loko o <pre>
nā hōʻailona ma kahi kokoke i ka hema; e hāʻawi i nā papa āpau.
Hiki iā ʻoe ke hoʻohui i ka .pre-scrollable
papa e hoʻonoho i kahi kiʻekiʻe kiʻekiʻe o 350px a hāʻawi i kahi scrollbar y-axis.
No ka hoʻolāʻau kumu—hoʻopiʻi māmā a me nā mea hoʻokaʻawale ākea wale nō—e hoʻohui i ka papa kumu .table
i kekahi <table>
.
# | Inoa mua | Inoa hope | inoa hoʻohana |
---|---|---|---|
1 | Maka | Otto | @mdo |
2 | ʻO Iakoba | Thornton | @momona |
3 | Larry | ka Manu |
- <papa papa = "papakaukau" >
- …
- </papa>
E hoʻohui i kekahi o kēia mau papa i ka .table
papa kumu.
.table-striped
Hoʻohui i ka zebra-striping i kēlā me kēia lālani papaʻaina ma <tbody>
o ka :nth-child
mea koho CSS (ʻaʻole i loaʻa ma IE7-8).
# | Inoa mua | Inoa hope | inoa hoʻohana |
---|---|---|---|
1 | Maka | Otto | @mdo |
2 | ʻO Iakoba | Thornton | @momona |
3 | Larry | ka Manu |
- <papa papa = "papa papa-papa" >
- …
- </papa>
.table-bordered
E hoʻohui i nā palena a me nā kihi pōʻai i ka papaʻaina.
# | Inoa mua | Inoa hope | inoa hoʻohana |
---|---|---|---|
1 | Maka | Otto | @mdo |
Maka | Otto | @getbootstrap | |
2 | ʻO Iakoba | Thornton | @momona |
3 | Larry ka Manu |
- <papa papa = "papa papa-palena" >
- …
- </papa>
.table-hover
E ho'ā i kahi kūlana hover ma nā lālani papa i loko o kahi <tbody>
.
# | Inoa mua | Inoa hope | inoa hoʻohana |
---|---|---|---|
1 | Maka | Otto | @mdo |
2 | ʻO Iakoba | Thornton | @momona |
3 | Larry ka Manu |
- <papa papa = "papa papa-hover" >
- …
- </papa>
.table-condensed
Hoʻonui i nā papa ʻaina ma o ka ʻoki ʻana i ka padding cell i ka hapalua.
# | Inoa mua | Inoa hope | inoa hoʻohana |
---|---|---|---|
1 | Maka | Otto | @mdo |
2 | ʻO Iakoba | Thornton | @momona |
3 | Larry ka Manu |
- <papa papa = "table table-condensed" >
- …
- </papa>
E hoʻohana i nā papa pōʻaiapili e kala i nā lālani papaʻaina.
Papa | wehewehe |
---|---|
.success |
Hōʻike i kahi hana holomua a maikaʻi paha. |
.error |
Hōʻike i ka hana pōʻino a i ʻole ka hana ʻino. |
.warning |
Hōʻike i kahi ʻōlelo aʻo e pono ai ka nānā. |
.info |
Hoʻohana ʻia ma ke ʻano he ʻokoʻa i nā ʻano paʻamau. |
# | Huahana | Lawe ʻia ka uku | Kūlana |
---|---|---|---|
1 | TB - Ka mahina | 01/04/2012 | Aponoia |
2 | TB - Ka mahina | 02/04/2012 | Hōʻole |
3 | TB - Ka mahina | 03/04/2012 | Ke kali nei |
4 | TB - Ka mahina | 04/04/2012 | Kāhea e hōʻoia |
- ...
- < tr class = "holomua" >
- <td> 1 < /td>
- <td>TB - Mahina</ td >
- <td> 01 / 04 / 2012 < /td>
- <td>Aponoia</ td >
- </ tr >
- ...
Ka papa inoa o nā mea HTML papa i kākoʻo ʻia a pehea e hoʻohana ʻia ai.
Tag | wehewehe |
---|---|
<table> |
ʻEleʻa kāʻei no ka hōʻike ʻana i ka ʻikepili ma ke ʻano papa |
<thead> |
Mea paʻa no nā lālani poʻomanaʻo papaʻaina ( <tr> ) e lepili i nā kolamu papaʻaina |
<tbody> |
Mea paʻa no nā lālani pākaukau ( <tr> ) ma ke kino o ka pākaukau |
<tr> |
ʻElemu paʻa no kahi pūʻulu papaʻaina ( a i <td> ʻole <th> ) e ʻike ʻia ma ka lālani hoʻokahi |
<td> |
Pūlele papa paʻamau |
<th> |
Keena papaʻaina kūikawā no nā kolamu (a i ʻole lālani, e pili ana i ka laulā a me ke kau ʻana) lepili |
<caption> |
ʻO ka wehewehe ʻana a i ʻole ka hōʻuluʻulu manaʻo o ka mea i paʻa i ka papaʻaina, pono loa no ka poʻe heluhelu pale |
- <papa>
- <caption> ... </caption>
- <poo>
- <tr>
- <th> ... </th>
- <th> ... </th>
- </tr>
- </head>
- <ke kino>
- <tr>
- <td> ... </td>
- <td> ... </td>
- </tr>
- </tbody>
- </papa>
Loaʻa i nā mana o kēlā me kēia ʻano ke ʻano, akā me ka ʻole o kahi papa kumu i koi ʻia ma <form>
nā hoʻololi nui a i ʻole ka markup. Nā hualoaʻa ma nā lepili i hoʻopaʻa ʻia, i hoʻopaʻa ʻia ma ka hema ma luna o nā kaohi puka.
- <ʻano>
- <fieldset>
- <kaao> kaao < /kaao>
- <label> inoa lepili </label>
- <input type = "text" placeholder = "E kikokiko i kekahi mea..." >
- <span class = "help-block" > He laʻana kikokikona kōkua pae-poka ma ʻaneʻi. </span>
- <label class = "pahu helu" >
- <input type = "checkbox" > E nānā mai iaʻu
- </label>
- <button type = "submit" class = "btn" > Hoʻouna </button>
- </fieldset>
- </form>
Hoʻohui pū ʻia me Bootstrap ʻekolu mau papa hana koho no nā hihia maʻamau.
Hoʻohui .form-search
i ke ʻano a .search-query
me ka <input>
no ka hoʻokomo kikokikona ʻokoʻa.
- <form class = "form-search" >
- <input type = "text" class = "input-medium search-query" >
- <button type = "submit" class = "btn" > Huli </ pihi>
- </form>
Hoʻohui .form-inline
no nā lepili hema a me nā kaohi-poloka laina no kahi hoʻolālā paʻa.
- <form class = "form-inline" >
- <input type = "text" class = "input-small" placeholder = "Email" >
- <input type = "password" class = "input-small" placeholder = "Password" >
- <label class = "pahu helu" >
- <input type = "checkbox" > E hoʻomanaʻo mai iaʻu
- </label>
- <button type = "submit" class = "btn" > Sign in </button>
- </form>
Hoʻopololei i nā lepili a lana i ka hema e hōʻike ʻia ma ka laina like me nā mana. Pono nā hoʻololi ʻoi loa mai kahi palapala paʻamau:
.form-horizontal
i ke ʻano.control-group
.control-label
i ka lepili.controls
no ka hoʻopololei kūpono
- <form class = "form-horizontal" >
- <div class = "hui mana" >
- <label class = "control-label" for = "inputEmail" > Email </label>
- <div class = "nā mana" >
- <input type = "text" id = "inputEmail" placeholder = "Email" >
- </div>
- </div>
- <div class = "hui mana" >
- <label class = "control-label" for = "inputPassword" > Hua'ōlelo </label>
- <div class = "nā mana" >
- <input type = "password" id = "inputPassword" placeholder = "Password" >
- </div>
- </div>
- <div class = "hui mana" >
- <div class = "nā mana" >
- <label class = "pahu helu" >
- <input type = "checkbox" > E hoʻomanaʻo mai iaʻu
- </label>
- <button type = "submit" class = "btn" > Sign in </button>
- </div>
- </div>
- </form>
Kākoʻo ʻia nā hiʻohiʻona o nā mana ʻano maʻamau i kahi hoʻolālā puka laʻana.
ʻO ka mana maʻamau, nā kahua hoʻokomo kikokikona. Hoʻokomo pū ʻia ke kākoʻo no nā ʻano HTML5 āpau: kikokikona, ʻōlelo huna, ka lā, ka manawa-local, ka lā, ka mahina, ka manawa, ka pule, ka helu, ka leka uila, ka url, ka huli, ke kelepona, a me ka waihoʻoluʻu.
Pono i ka hoʻohana ʻana i kahi kikoʻī type
i nā manawa a pau.
- <input type = "text" placeholder = "Text input" >
Kākoʻo i nā laina kikokikona he nui. E hoʻololi rows
i ke ʻano e like me ka pono.
- <textarea rows = " 3" ></textarea>
ʻO nā pahu pahu no ke koho ʻana i hoʻokahi a i ʻole kekahi mau koho i kahi papa inoa a ʻo nā radios no ke koho ʻana i hoʻokahi koho mai nā mea he nui.
- <label class = "pahu helu" >
- < ʻano komo = "pahu helu" waiwai = "" >
- ʻO ke koho hoʻokahi kēia a me kēlā - e hoʻokomo pono i ke kumu o ka maikaʻi
- </label>
- <label class = "radio" >
- <input type = "radio" name = "optionsRadios" id = "optionsRadios1" waiwai = "option1" nānā >
- ʻO ke koho hoʻokahi kēia a me kēlā - e hoʻokomo pono i ke kumu o ka maikaʻi
- </label>
- <label class = "radio" >
- <input type = "radio" name = "optionsRadios" id = "optionsRadios2" waiwai = "option2" >
- Hiki ke koho ʻelua i kahi mea ʻē aʻe a ʻo ke koho ʻana iā ia e kāpae i ke koho hoʻokahi
- </label>
E hoʻohui i ka .inline
papa i nā pahu pahu a i ʻole nā lekiō no nā mana e ʻike ʻia ma ka laina like.
- <label class = "pahu helu ma ka laina" >
- <input type = "checkbox" id = "inlineCheckbox1" waiwai = "koho1" > 1
- </label>
- <label class = "pahu helu ma ka laina" >
- <input type = "checkbox" id = "inlineCheckbox2" waiwai = "koho2" > 2
- </label>
- <label class = "pahu helu ma ka laina" >
- <input type = "checkbox" id = "inlineCheckbox3" waiwai = "koho3" > 3
- </label>
E hoʻohana i ka koho paʻamau a i ʻole multiple="multiple"
e hōʻike i nā koho he nui i ka manawa hoʻokahi.
- <koho>
- <koho> 1 </koho>
- <koho> 2 </koho>
- <koho> 3 </koho>
- <koho> 4 </koho>
- <koho> 5 </koho>
- </koho>
- <koho lehulehu = "nui" >
- <koho> 1 </koho>
- <koho> 2 </koho>
- <koho> 3 </koho>
- <koho> 4 </koho>
- <koho> 5 </koho>
- </koho>
Hoʻohui ʻia ma luna o nā kaohi o ka polokalamu kele pūnaewele, loaʻa ʻo Bootstrap i nā mea pono ʻē aʻe.
Hoʻohui i nā kikokikona a i ʻole nā pihi ma mua a ma hope paha o kekahi hoʻokomo kikokikona. E hoʻomanaʻo select
ʻaʻole kākoʻo ʻia nā mea ma aneʻi.
E kāʻei i ka .add-on
a me ka input
me kekahi o nā papa ʻelua e hoʻomākaukau a hoʻopili i ke kikokikona i kahi hoʻokomo.
- <div class = "input-prepend" >
- <span class = "add-on" > @ </span>
- <input class = "span2" id = "prependedInput" type = "text" placeholder = "Username" >
- </div>
- <div class = "input-append" >
- <input class = "span2" id = "appendedInput" type = "text" >
- <span class = "add-on" > .00 </span>
- </div>
E hoʻohana i nā papa ʻelua a me ʻelua mau manawa o .add-on
ka hoʻomākaukau ʻana a hoʻohui i kahi hoʻokomo.
- <div class = "input-prepend input-append" >
- <span class = "add-on" > $ </span>
- <input class = "span2" id = "appendedPrependedInput" type = "text" >
- <span class = "add-on" > .00 </span>
- </div>
Ma kahi o kahi <span>
kikokikona, e hoʻohana i ka .btn
a e hoʻopili i kahi pihi (a ʻelua paha) i kahi hoʻokomo.
- <div class = "input-append" >
- <input class = "span2" id = "appendedInputButton" type = "text" >
- <pāpā pihi = " btn" type = "button" > Hele! </ pihi>
- </div>
- <div class = "input-append" >
- <input class = "span2" id = "appendedInputButtons" type = "text" >
- <button class = "btn" type = "button" > Huli </button>
- <button class = "btn" type = "button" > Koho </button>
- </div>
- <div class = "input-append" >
- <input class = "span2" id = "appendedDropdownButton" type = "text" >
- <div class = "btn-hui" >
- <button class = "btn dropdown-toggle" data- toggle = "dropdown" >
- Hana
- <span class = "caret" ></span>
- </ pihi>
- <ul class = "dropdown-menu" >
- ...
- </ul>
- </div>
- </div>
- <div class = "input-prepend" >
- <div class = "btn-hui" >
- <button class = "btn dropdown-toggle" data- toggle = "dropdown" >
- Hana
- <span class = "caret" ></span>
- </ pihi>
- <ul class = "dropdown-menu" >
- ...
- </ul>
- </div>
- <input class = "span2" id = "prependedDropdownButton" type = "text" >
- </div>
- <div class = "input-prepend input-append" >
- <div class = "btn-hui" >
- <button class = "btn dropdown-toggle" data- toggle = "dropdown" >
- Hana
- <span class = "caret" ></span>
- </ pihi>
- <ul class = "dropdown-menu" >
- ...
- </ul>
- </div>
- <input class = "span2" id = "appendedPrependedDropdownButton" type = "text" >
- <div class = "btn-hui" >
- <button class = "btn dropdown-toggle" data- toggle = "dropdown" >
- Hana
- <span class = "caret" ></span>
- </ pihi>
- <ul class = "dropdown-menu" >
- ...
- </ul>
- </div>
- </div>
- <ʻano>
- <div class = "input-prepend" >
- <div class = "btn-group" > ... </div>
- < ʻano komo = "kikokikona" >
- </div>
- <div class = "input-append" >
- < ʻano komo = "kikokikona" >
- <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" > Huli </ pihi>
- </div>
- <div class = "input-prepend" >
- <button type = "submit" class = "btn" > Huli </ pihi>
- <input type = "text" class = "span2 search-query" >
- </div>
- </form>
E hoʻohana i nā papa nui pili e like .input-large
me kāu mau mea hoʻokomo i ka nui kolamu kolamu me ka hoʻohana ʻana i .span*
nā papa.
E hana i kekahi mea <input>
a i ʻole <textarea>
mea e like me ka mea pae poloka.
- <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" >
Nā poʻo i luna!I nā mana e hiki mai ana, e hoʻololi mākou i ka hoʻohana ʻana i kēia mau papa hoʻokomo pili e hoʻohālikelike i kā mākou nui pihi. No ka laʻana, .input-large
e hoʻonui i ka padding a me ka nui font o kahi hoʻokomo.
E hoʻohana .span1
i ka .span12
no nā mea hoʻokomo i kūlike i ka nui like o nā kolamu mānoanoa.
- <input class = "span1" type = "text" placeholder = ".span1" >
- <input class = "span2" type = "text" placeholder = ".span2" >
- <input class = "span3" type = "text" placeholder = ".span3" >
- <koho papa = "span1" >
- ...
- </koho>
- <koho papa = "span2" >
- ...
- </koho>
- <koho papa = "span3" >
- ...
- </koho>
No nā hoʻokomo mākia he nui i kēlā me kēia laina, e hoʻohana i ka .controls-row
papa hoʻololi no ke kaʻawale kūpono . E lana ana ia i na mea hookomo e hoohiolo i ka hakahaka keokeo, e hoonoho i na palena kupono, a e holoi i ka lana.
- <div class = "nā mana" >
- <input class = "span5" type = "text" placeholder = ".span5" >
- </div>
- <div class = "nā mana mana-laina" >
- <input class = "span4" type = "text" placeholder = ".span4" >
- <input class = "span1" type = "text" placeholder = ".span1" >
- </div>
- ...
Hōʻike i ka ʻikepili ma kahi ʻano hiki ʻole ke hoʻoponopono me ka hoʻohana ʻole ʻana i ka markup form maoli.
- <span class = "input-xlarge uneditable-input" > Kekahi waiwai maanei </span>
E hoʻopau i kahi palapala me kahi hui o nā hana (nā pihi). Ke hoʻokomo ʻia i loko o kahi .form-actions
, e hoʻokomo ʻokoʻa nā pihi i ka laina me nā mana palapala.
- <div class = "form-actions" >
- <button type = "submit" class = "btn btn-primary" > mālama i nā loli </button>
- <pākuʻi type = "button" class = "btn" > Hoʻopau </ pihi>
- </div>
Kākoʻo pae laina a poloka no nā kikokikona kōkua e ʻike ʻia e pili ana i nā kaohi puka.
- <input type = "text" ><span class = "help-inline" > Inline help text </span>
- <input type = "text" ><span class = "help-block" > He poloka lōʻihi o nā kikokikona kōkua e haki ana i kahi laina hou a hiki ke hoʻonui aku ma mua o hoʻokahi laina. </span>
Hāʻawi i nā manaʻo manaʻo i nā mea hoʻohana a i ʻole nā mea kipa me nā kūlana manaʻo maʻamau e pili ana i nā mana palapala a me nā lepili.
outline
Wehe mākou i nā kaila paʻamau ma kekahi mau mana ʻano a kau i kahi box-shadow
ma kona wahi no :focus
.
- <input class = "input-xlarge" id = "focusedInput" type = "text" value = "Ke nānā nei kēia ..." >
Nā hoʻokomo kāhua ma o ka polokalamu kele pūnaewele paʻamau me :invalid
. E hōʻike i kahi type
, e hoʻohui i ke required
ʻano inā ʻaʻole koho ke kahua, a (inā pili) e kuhikuhi apattern
.
ʻAʻole loaʻa kēia i nā mana o Internet Explorer 7-9 no ka nele o ke kākoʻo no nā mea koho pseudo CSS.
- <input class = "span3" type = "email" pono >
Hoʻohui i ke disabled
ʻano ma kahi hoʻokomo e pale i ka hoʻokomo ʻana o ka mea hoʻohana a hoʻoulu i kahi hiʻohiʻona ʻokoʻa.
- <input class = "input-xlarge" id = "disabledInput" type = "text" placeholder = "Hoʻopaʻa ʻia ka hoʻokomo ʻana ma ʻaneʻi..." hoʻopau ʻia >
Loaʻa i ka Bootstrap nā ʻano hōʻoia no ka hewa, ka ʻōlelo aʻo, ka ʻike, a me nā memo kūleʻa. No ka hoʻohana ʻana, hoʻohui i ka papa kūpono i ka puni .control-group
.
- <div class = "'ōlelo aʻo pūʻulu mana" >
- <label class = "control-label" for = "inputWarning" > Hoʻokomo me ka ʻōlelo aʻo </label>
- <div class = "nā mana" >
- <input type = "text" id = "inputWarning" >
- <span class = "help-inline" > Ua hewa paha kekahi mea </span>
- </div>
- </div>
- <div class = "hewa pūʻulu mana" >
- <label class = "control-label" for = "inputError" > Hoʻokomo me ka hewa </label>
- <div class = "nā mana" >
- <input type = "text" id = "inputError" >
- <span class = "help-inline" > E ʻoluʻolu e hoʻoponopono i ka hewa </span>
- </div>
- </div>
- <div class = "ʻike pūʻulu mana" >
- <label class = "control-label" for = "inputInfo" > Hoʻokomo me ka ʻike </label>
- <div class = "nā mana" >
- <input type = "text" id = "inputInfo" >
- <span class = "help-inline" > Ua lawe ʻia ka inoa mea hoʻohana </span>
- </div>
- </div>
- <div class = "kūpono-hui holomua" >
- <label class = "control-label" for = "inputSuccess" > Hoʻokomo me ka holomua </label>
- <div class = "nā mana" >
- <input type = "text" id = "inputSuccess" >
- <span class = "help-inline" > Woohoo! </span>
- </div>
- </div>
Hoʻohui i nā papa i kahi <img>
mea e hoʻokalakala maʻalahi i nā kiʻi i kekahi papahana.
- <img src = "..." class = "img-rounded" >
- <img src = "..." papa = "img-poʻai" >
- <img src = "..." papa = "img-polaroid" >
Nā poʻo i luna! .img-rounded
a .img-circle
ʻaʻole hana ma IE7-8 no ka nele o border-radius
ke kākoʻo.
140 kiʻi ma ke ʻano sprite, loaʻa i ka hina hina (paʻamau) a me ke keʻokeʻo, hāʻawi ʻia e Glyphicons .
ʻAʻole i loaʻa ka Glyphicons Halflings no ka manuahi, akā ʻo kahi hoʻonohonoho ma waena o Bootstrap a me nā mea hana Glyphicons ua hiki i kēia me ke kumu kūʻai ʻole iā ʻoe ma ke ʻano he mea hoʻomohala. Ma ke ʻano he mahalo, ke noi aku nei mākou iā ʻoe e hoʻokomo i kahi loulou koho e hoʻi i Glyphicons i kēlā me kēia manawa.
Pono nā kiʻi āpau i kahi <i>
hōʻailona me kahi papa kūʻokoʻa, prefixed me icon-
. No ka hoʻohana ʻana, e kau i kēia code ma nā wahi āpau:
- <i papa = "icon-search" ></i>
Loaʻa nā kaila no nā kiʻi hoʻohuli (keʻokeʻo) i mākaukau me ka papa hoʻokahi. E hoʻokō pono mākou i kēia papa ma ka hover a me nā moku'āina no nā loulou nav a me nā loulou.
- <i class = "icon-search icon-white" ></i>
Nā poʻo i luna!I ka hoʻohana ʻana ma ka ʻaoʻao o nā kaula kikokikona, e like me nā pihi a i ʻole nā loulou nav, e waiho i kahi hakahaka ma hope o ka <i>
hōʻailona no ka hoʻokaʻawale kūpono.
E hoʻohana iā lākou i nā pihi, nā pūʻulu pihi no kahi mea hana, hoʻokele, a i ʻole nā mea hoʻokomo puka i hoʻomaka mua ʻia.
- <div class = "btn-toolbar" >
- <div class = "btn-hui" >
- <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-hui" >
- <a class = "btn btn-primary" href = "#" ><i class = "icon-user icon-white" ></i> Mea hoʻohana </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> Hoʻoponopono </a></li>
- <li><a href = "#" ><i class = "icon-trash" ></i> Holoi </a></li>
- <li><a href = "#" ><i class = "icon-ban-circle" ></i> Papa </a> </li>
- <li class = "divider" ></li>
- <li><a href = "#" ><i class = "i" ></i> Hana i luna </a></li>
- </ul>
- </div>
- <a class = "btn btn-large" href = "#" ><i class = "icon-star" ></i> Star </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> Star </a>
- <ul class = "papa inoa nav" >
- <li class = "active" ><a href = "#" ><i class = "icon-home icon-white" ></i> Home </a></li>
- <li><a href = "#" ><i class = "icon-book" ></i> Library </a></li>
- <li><a href = "#" ><i class = "icon-pencil" ></i> Nā noi </a></li>
- <li><a href = "#" ><i class = "i" ></i> Misc </a></li>
- </ul>
- <div class = "hui mana" >
- <label class = "control-label" for = "inputIcon" > Helu leka uila </label>
- <div class = "nā mana" >
- <div class = "input-prepend" >
- <span class = "add-on" ><i class = "icon-envelope" ></i></span>
- <input class = "span2" id = "inputIcon" type = "text" >
- </div>
- </div>
- </div>