HTML nneɛma a ɛho hia a wɔayɛ no sɛnea wɔpɛ na wɔde adesua ahorow a wotumi trɛw mu ayɛ no yiye.
HTML asɛmti nyinaa, <h1>
through <h6>
wɔ hɔ.
Bootstrap no wiase nyinaa default font-size
yɛ 14px , a a line-height
ɛyɛ 20px . Wɔde eyi di dwuma wɔ <body>
nkyekyem ahorow no ne ne nyinaa ho. Bio nso, <p>
(nkyekyɛm ahorow) nya ase margin a ɛyɛ wɔn line-height fã (10px default).
Nullam quis risus eget urna mollis a ɛyɛ fɛ a ɛyɛ fɛ a ɛyɛ fɛ. Cum sociis natoque penatibus ne magnis awo montes, nascetur fɛwdi mus. Nullam id dolor id nibh ultricies kar a wɔde di dwuma.
Cum sociis natoque penatibus ne magnis awo montes, nascetur fɛwdi mus. Donec ullamcorper nulla a ɛnyɛ nea ɛyɛ adetɔnfo fringilla. Duis mollis, est a ɛnyɛ commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla a ɛnyɛ nea ɛyɛ adetɔnfo fringilla.
Maecenas sed diam eget risus varius blandit tena ase a ɛnyɛ magna. Donec id elit a ɛnyɛ mi porta gravida wɔ eget metus. Duis mollis, est a ɛnyɛ commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.
<p> ... </p> na ɛwɔ hɔ
Ma nkyekyem bi da nsow denam .lead
.
Vivamus sagittis lacus vel augue laoreet a ɛyɛ mmerɛw sɛ wobɛtɔ no. Duis mollis, est a ɛnyɛ ade a wɔde yɛ nneɛma.
<p adesuakuw = "di anim" > ... </p>
Typographic scale no gyina LESS nsakraeɛ mmienu so wɔ nsakraeɛ mu.less : @baseFontSize
ne @baseLineHeight
. Nea edi kan ne base font-size a wɔde di dwuma wɔ ne nyinaa mu na nea ɛto so abien ne base line-height. Yɛde saa variables no ne akontabuo a ɛnyɛ den bi di dwuma de yɛ margins, paddings, ne line-heights a ɛwɔ yɛn type no nyinaa ne nea ɛkeka ho. Yɛ wɔn sɛnea wopɛ na Bootstrap no dannan wɔn ho.
Fa HTML no default emphasis tags a ɛwɔ styles a emu yɛ hare no di dwuma.
<small>
Sɛ wopɛ sɛ woyi nsɛm a ɛwɔ mu anaa nsɛm a wɔabɔ no mu den so dua a, fa tag ketewa no di dwuma.
Wɔayɛ sɛ wɔbɛfa saa nsɛm a wɔakyerɛw no sɛ nkyerɛwde a ɛyɛ fɛ.
<p> <small> Wɔayɛ sɛ wɔbɛfa saa nsɛm a wɔakyerɛw no sɛ nkyerɛwde a ɛyɛ fɛ. </small> </p> no yɛ nea ɛwɔ hɔ
Sɛ́ wusi nsɛm a wɔakyerɛw no fã bi so dua a ɛho hia
Wɔakyerɛ nsɛm a edidi so yi ase sɛ nsɛm a ɛyɛ tuntum .
<strong> wɔakyerɛ ase sɛ nsɛm a ɛyɛ tuntum </strong>
Sɛ́ wode adwennwen si nsɛm a wɔakyerɛw no fã bi so dua no
Wɔakyerɛ nsɛm no fã bi a edidi so yi ase sɛ nsɛm a wɔakyerɛw no italic .
<em> a wɔakyerɛ ase sɛ nsɛm a wɔakyerɛw no italic </em>
Ti a ɛwɔ soro! Te nka sɛ wowɔ ahofadi sɛ wode bedi dwuma <b>
na wode adi dwuma <i>
wɔ HTML5 mu. <b>
no kyerɛ sɛ ɛbɛtwe adwene asi nsɛmfua anaa nsɛmfua so a ɛrenkyerɛ hia foforo a ɛho hia bere a <i>
ɛyɛ nea ɛfa nne, mfiridwuma mu nsɛmfua, ne nea ɛkeka ho ho titiriw.
Da ntease adi denam kɔla so denam nsa kakraa bi a wosi so dua mfaso adesua ahorow so.
Fusce dapibus, tellus ac nnome commodo, tortor mauris nibh.
Etiam porta sem ɔbarima a ɔyɛ ɔbarima a ɔyɛ ɔbarima.
Donec ullamcorper nulla a ɛnyɛ nea ɛyɛ adetɔnfo fringilla.
Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis a ɛyɛ fɛ no yɛ nea ɛyɛ fɛ yiye.
Duis mollis, est a ɛnyɛ commodo luctus, nisi erat porttitor ligula.
- <p adesuakuw = "wɔayɛ mum" > Fusce dapibus, tellus ac nnome commodo, tortor mauris nibh. </p> no
- <p class = "nkyerɛwee-kɔkɔbɔ" > Etiam porta sem malesuada magna mollis euismod. </p> no
- <p class = "nkyerɛwee-mfomso" > Donec ullamcorper nulla a ɛnyɛ metus auctor fringilla. </p> no
- <p class = "nsɛm-nsɛm" > Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis a ɛyɛ fɛ no yɛ nea ɛyɛ fɛ yiye. </p> no
- <p class = "nsɛm-a-nkonimdi" > Duis mollis, est a ɛnyɛ commodo luctus, nisi erat porttitor ligula. </p> no
Stylized implementation of HTML's <abbr>
element ma abbreviations ne acronyms de kyerɛ nkyerɛase a wɔatrɛw mu no wɔ hover so. Nsɛmfua a wɔatwa no tiaa a ɛwɔ title
su bi wɔ ase hye a ɛwɔ nsensanee a ɛyɛ hann ne mmoa cursor wɔ hover so, a ɛma nsɛm a ɛfa ho foforo wɔ hover so.
<abbr>
Sɛ wopɛ nsɛm a wɔatrɛw mu a ɛfa long hover of an abbreviation ho a, fa title
attribute no ka ho.
Asɛmfua su no a wɔatwa no tiaa ne attr .
<abbr asɛmti = "su" > attr </abbr>
<abbr class="initialism">
Fa ka .initialism
asɛmfua tiawa bi ho ma font-size a ɛyɛ ketewaa bi.
HTML yɛ ade a eye sen biara fi bere a wɔatwitwa paanoo no.
<abbr title = "HyperText Markup Kasa" class = "mfiase" > HTML </abbr>
Fa nana a ɔbɛn no anaa adwuma no nyinaa nkitahodi ho nsɛm kyerɛ.
<address>
Kora formatting so denam nkyerɛwde nyinaa a wode bɛhyɛ awiei no so <br>
.
- <address>
- <strong> Twitter, Inc. </strong><br> Nsɛm a wɔka kyerɛ
- 795 Folsom Ave, Ɔdan 600 <br>
- San Francisco, CA 94107 <br> . Ɔde ne nsa kyerɛɛ ne so
- <abbr asɛmti = "Telefon" > P: </abbr> (123) 456-7890. Ɔde ne nsa kyerɛɛ ne so, na ɔde ne nsa kyerɛɛ ne so bio
- </address> no ho
- <address>
- <strong> Edin mũ no nyinaa </strong><br>
- <a href = "mailto:#" > nea edi kan.a etwa [email protected] </a>
- </address> no ho
Sɛ wopɛ sɛ wofa nsɛm a wɔabɔ no mua a efi baabi foforo a ɛwɔ wo krataa no mu a.
Fa HTML<blockquote>
biara kyekyere ho sɛ nea wɔafa aka no. Sɛ wopɛ nsɛm a wɔafa aka tẽẽ a yɛkamfo kyerɛ sɛ .<p>
Lorem ipsum dolor tena amet, consectetur adipiscing a ɛyɛ fɛ a ɛyɛ fɛ. Nkyekyɛm a edi mũ posuere erat a ante.
- <asɛm a wɔde siw ano>
- | _ Nkyekyɛm a edi mũ posuere erat a ante. </p> no
- </blockquote> a wɔde kyerɛw nsɛm
Style ne emu nsɛm sesa ma nsakrae a ɛnyɛ den wɔ standard blockquote so.
Fa <small>
tag ka ho na ama woahu baabi a wonya fi. Fa fibea adwuma no din kyekyere <cite>
.
Lorem ipsum dolor tena amet, consectetur adipiscing a ɛyɛ fɛ a ɛyɛ fɛ. Nkyekyɛm a edi mũ posuere erat a ante.
Obi a wagye din wɔ Source Title mu
- <asɛm a wɔde siw ano>
- | _ Nkyekyɛm a edi mũ posuere erat a ante. </p> no
- <small> Obi a wagye din <cite title = "Fibea Asɛmti" > Fibea Asɛmti </cite></small>
- </blockquote> a wɔde kyerɛw nsɛm
Fa di dwuma .pull-right
ma blockquote a ɛsensɛn nsu so, a ɛwɔ nifa so.
- <blockquote adesuakuw = "twe-nifa" >
- ...
- </blockquote> a wɔde kyerɛw nsɛm
Nneɛma a wɔahyehyɛ a nhyehyɛe no ho nhia pefee.
- <ul> no
- <li> ... </li> na ɛwɔ hɔ
- </ul>
Nneɛma a wɔahyehyɛ a nhyehyɛe no ho hia pefee wom.
- <ol> no
- <li> ... </li> na ɛwɔ hɔ
- </ol>
Nneɛma a wɔahyehyɛ a list-style
benkum so padding biara nni mu anaasɛ ɛka ho.
- <ul class = "wɔnnwene" >
- <li> ... </li> na ɛwɔ hɔ
- </ul>
Nsɛmfua a wɔahyehyɛ a nkyerɛkyerɛmu ahorow a ɛbata ho.
- <dl> na ɛwɔ hɔ
- <dt> ... </dt> na ɛwɔ hɔ
- <dd> ... </dd> na ɛwɔ hɔ
- </dl> no
Yɛ nsɛmfua ne nkyerɛkyerɛmu ahorow a <dl>
wɔahyehyɛ no nnidiso nnidiso wɔ nkyɛnkyɛn.
- <dl adesuakuw = "dl-a ɛkɔ soro" >
- <dt> ... </dt> na ɛwɔ hɔ
- <dd> ... </dd> na ɛwɔ hɔ
- </dl> no
Ti a ɛwɔ soro! Horizontal description lists bɛtwa nsɛmfua a ɛware dodo sɛ ɛbɛhyɛ benkum column fix text-overflow
no mu . Wɔ viewports teateaa mu no, wɔbɛsesa akɔ default stacked layout no so.
Fa inline snippets a ɛwɔ code no mu no kyekyere <code>
.
<section>
ɛsɛ sɛ wɔkyekyere no sɛ inline.
- Sɛ nhwɛso no , ɛsɛ sɛ wɔkyekyere <code><section> </ code > sɛ inline .
Fa di dwuma <pre>
ma koodu nkyerɛwde ahorow pii. Hwɛ hu sɛ wubeguan afi angle brackets biara a ɛwɔ code no mu no mu na ama woatumi akyerɛ ase yiye.
<p>Nsɛm a wɔakyerɛw no nhwɛso wɔ ha...</p>
- <pre> no
- <p>Nsɛm a wɔakyerɛw no nhwɛso wɔ ha...</p>
- </pre> no
Ti a ɛwɔ soro! Hwɛ hu sɛ wode code bɛto <pre>
tags no mu a ɛbɛn benkum sɛnea wubetumi; ɛbɛkyerɛ tab ahorow no nyinaa ase.
Wubetumi apaw de .pre-scrollable
adesuakuw a ɛbɛhyehyɛ max-height a ɛyɛ 350px na ama y-axis scrollbar no aka ho.
Sɛ wopɛ sɛ woyɛ nneɛma titiriw a wɔde yɛ nneɛma—a wɔde hyɛ mu a ɛyɛ hare ne nneɛma a wɔde kyekyɛ nneɛma mu a ɛkɔ soro nkutoo a—fa nnyinaso adesuakuw .table
no ka biara <table>
ho .
# . | Fie din | Abusuadin | Edin a wɔde di dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry na ɔkyerɛwee | Anomaa no | @twitter so |
- <pon adesua = "pon" >
- ...
- </table> no
Fa adesua ahorow a edidi so yi mu biara ka adesua a ɛwɔ .table
nnyinaso no ho.
.table-striped
Ɔde zebra-striping ka table row biara a ɛwɔ <tbody>
via :nth-child
CSS selector no mu (ɛnyɛ wɔ IE7-IE8 mu).
# . | Fie din | Abusuadin | Edin a wɔde di dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry na ɔkyerɛwee | Anomaa no | @twitter so |
- <pon adesua = "pon pon-striped" >
- ...
- </table> no
.table-bordered
Fa ahye ne ntwea a ɛyɛ kurukuruwa ka pon no ho.
# . | Fie din | Abusuadin | Edin a wɔde di dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
Marko | Otto na ɔkyerɛwee | @getbootstrap na ɛyɛ | |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry Anomaa no | @twitter so |
- <table class = "pon a ɛwɔ pon so" >
- ...
- </table> no
.table-hover
Ma hover tebea nyɛ adwuma wɔ table rows a ɛwɔ a <tbody>
.
# . | Fie din | Abusuadin | Edin a wɔde di dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry Anomaa no | @twitter so |
- <pon adesua = "pon pon-hover" >
- ...
- </table> no
.table-condensed
Ɛma pon ahorow no yɛ ketewaa kɛse denam cell padding a etwitwa mu abien no so.
# . | Fie din | Abusuadin | Edin a wɔde di dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry Anomaa no | @twitter so |
- <table class = "pon pon-a wɔatwa no tiaa" >
- ...
- </table> no
Fa nsɛm a ɛfa ho adesua ahorow di dwuma de kɔla pon row ahorow.
Klaase | Nkyerɛmu |
---|---|
.success |
Ɛkyerɛ adeyɛ a edi mu anaasɛ ɛyɛ papa. |
.error |
Ɛkyerɛ adeyɛ a asiane wom anaasɛ ebetumi ayɛ bɔne. |
.warning |
Kyerɛ kɔkɔbɔ bi a ebia ebehia sɛ wɔde wɔn adwene si so. |
.info |
Wɔde di dwuma sɛ ɔkwan foforo a wɔfa so si default styles no ananmu. |
# . | Adwadeɛ | Wɔagye Katua | Gyinabea |
---|---|---|---|
1. 1. | TB - Bosome biara | 01/04/2012 na ɛyɛ | Agye atom |
2. 2. | TB - Bosome biara | 02/04/2012 na ɛyɛ | Wɔpowee |
3. 3 | TB - Bosome biara | 03/04/2012 na ɛyɛ | Retwɛn |
4. 4. | TB - Bosome biara | 04/04/2012 na ɛyɛ | Frɛ mu na si so dua |
- ...
- < tr class = "nkonimdi" >
- <td> 1 < /td> na ɛwɔ hɔ
- <td>TB - Ɔsram biara</ td >
- <td> 01 / 04 / 2012 < /td>. Ɔde ne nsa kyerɛɛ ne so
- <td>Wɔapene so</ td >
- </ tr > no
- ...
Kyerɛw table HTML elements a wɔboa ne sɛnea ɛsɛ sɛ wɔde di dwuma.
Ahyɛnsoɔ | Nkyerɛmu |
---|---|
<table> |
Wrapping element a wɔde kyerɛ data wɔ tabular format mu |
<thead> |
Container element ma table header rows ( <tr> ) de hyɛ table columns agyirae |
<tbody> |
Container element ma table rows ( <tr> ) wɔ table no nipadua mu |
<tr> |
Container element ma table cells ( <td> anaa <th> ) a epue wɔ row biako so |
<td> |
Default table cell a wɔde ahyɛ mu |
<th> |
Table cell soronko ma column (anaasɛ row, a egyina scope ne placement so) labels Ɛsɛ sɛ wɔde di dwuma wɔ a <thead> |
<caption> |
Nea pon no kura ho nkyerɛkyerɛmu anaa nsɛm a wɔaboaboa ano, titiriw a ɛho wɔ mfaso ma screen akenkanfo |
- <pon>
- <nsɛmfua> ... </nsɛmfua>
- <ti>
- <tr>
- <th> ... </th> no ho asɛm
- <th> ... </th> no ho asɛm
- </tr>a ɛwɔ hɔ
- </thead> no ho
- <nipadua>
- <tr>
- <td> ... </td> na ɛwɔ hɔ
- <td> ... </td> na ɛwɔ hɔ
- </tr>a ɛwɔ hɔ
- </tbody> no ho
- </table> no
Ankorankoro fom controls nya styling, nanso enni biribiara a wɔhwehwɛ base class wɔ <form>
anaa nsakrae kɛse wɔ markup mu. Ɛde nkyerɛwde ahorow a wɔaboaboa ano, a wɔahyehyɛ no benkum so ba wɔ fom no sohwɛ ahorow no atifi.
- <fom>
- <anansesɛm> Atetesɛm </anansesɛm>
- <label> Label din </label>
- <input type = "text" placeholder = "Twerɛ biribi..." >
- <span class = "help-block" > Nhwɛsoɔ block-level mmoa nkyerɛwee wɔ ha. </span> no
- <label adesuakuw = "nhyɛnsode adaka" >
- <input type = "checkbox" > Hwɛ me
- </label> a wɔde kyerɛw nsɛm
- <button type = "fa kɔ" class = "btn" > Fa kɔ </button>
- </form>
Nea ɛka Bootstrap ho ne nkyerɛwde nhyehyɛe abiɛsa a wobetumi apaw ama nsɛm a wɔtaa de di dwuma.
Fa ka .form-search
kratasin no ho na .search-query
fa ka ho <input>
ma nsɛm a wɔde hyɛ mu a ɛyɛ kurukuruwa kɛse.
- <form class = "kwan-hwehwɛ" >
- <input type = "text" class = "input-medium hwehwɛ-asɛmmisa" >
- <button type = "submit" class = "btn" > Hwehwɛ </bɔtn>
- </form>
Fa ka ho .form-inline
ma benkum-aligned labels ne inline-block controls ma compact nhyehyɛe.
- <fom adesuakuw = "fom-inline" >
- <nhyɛaseɛ su = "nkyerɛwee" adesuakuw = "nhyɛaseɛ-ketewa" beaeɛ = "Email" >
- <input type = "password" class = "input-ketewa" beae = "Asɛmfua" >
- <label adesuakuw = "nhyɛnsode adaka" >
- <input type = "checkbox" > Kae me
- </label> a wɔde kyerɛw nsɛm
- <button type = "submit" class = "btn" > Fa wo ho hyɛ mu </button>
- </form>
Fa label ahorow no hyia nifa na fa hyɛ benkum so na ama ada adi wɔ line koro no ara so sɛ controls no. Ɛhwehwɛ sɛ wɔyɛ nsakrae kɛse wɔ markup mu fi default form so:
.form-horizontal
kratasin no ho.control-group
.control-label
label no ho.controls
ma ɛne no hyia yiye
- <fom adesuakuw = "fom-horizontal" >
- <div class = "ahyɛnsodeɛ-kuo" >
- <label class = "ahyɛnsodeɛ-ahyɛnsodeɛ" ma = "inputEmail" > Email </label>
- <div adesuakuw = "ahyɛnsode" >
- <nhyɛaseɛ type = "nkyerɛwee" id = "nhyɛaseɛEmail" beaeɛ = "Email" >
- </div> no
- </div> no
- <div class = "ahyɛnsodeɛ-kuo" >
- <label class = "control-label" ma = "asɛmfua a wɔde hyɛ mu" > Asɛmfua </label>
- <div adesuakuw = "ahyɛnsode" >
- <nhyɛaseɛ type = "asɛmfua" id = "nhyɛaseɛAsɛmfua" beaeɛ = "Asɛmfua" >
- </div> no
- </div> no
- <div class = "ahyɛnsodeɛ-kuo" >
- <div adesuakuw = "ahyɛnsode" >
- <label adesuakuw = "nhyɛnsode adaka" >
- <input type = "checkbox" > Kae me
- </label> a wɔde kyerɛw nsɛm
- <button type = "submit" class = "btn" > Fa wo ho hyɛ mu </button>
- </div> no
- </div> no
- </form>
Nhwɛsoɔ a ɛfa standard form controls a wɔboa wɔ nhwɛsoɔ form layout mu.
Fom sohwɛ a wɔtaa de di dwuma, nsɛm a wɔde hyɛ mu a egyina nsɛm so. Nea ɛka ho ne mmoa a wɔde ma HTML5 ahorow nyinaa: nsɛm, asɛmfua, datetime, datetime-local, date, ɔsram, bere, dapɛn, nɔma, email, url, hwehwɛ, tel, ne kɔla.
Ɛhwehwɛ sɛ wɔde a wɔakyerɛ di dwuma type
bere nyinaa.
- <input type = "nkyerɛwee" beae = "Nsɛm a wɔde hyɛ mu" >
Form control a ɛboa nkyerɛwee ahorow pii. Sesa rows
su no sɛnea ɛho hia.
- <nkyerɛweebea rows = "3" ></nkyerɛweebea>
Checkboxes yɛ nea wɔde paw ɔkwan biako anaa pii wɔ list bi mu bere a radio ahorow yɛ nea wɔde paw ɔkwan biako fi pii mu.
- <label adesuakuw = "nhyɛnsode adaka" >
- <input type = "nhyɛaseɛ adaka" botae = "" >
- Ɔkwan a edi kan ne eyi ne ɛno —hwɛ hu sɛ wode nea enti a ɛyɛ kɛse no bɛka ho
- </label> a wɔde kyerɛw nsɛm
- <label adesuakuw = "radio" >
- <input type = "radio" din = "optionsRadios" id = "optionsRadios1" botae = "option1" a wɔahyɛ >
- Ɔkwan a edi kan ne eyi ne ɛno —hwɛ hu sɛ wode nea enti a ɛyɛ kɛse no bɛka ho
- </label> a wɔde kyerɛw nsɛm
- <label adesuakuw = "radio" >
- <input type = "radio" din = "optionsRadios" id = "optionsRadios2" botae = "ɔpaw2" >
- Option two betumi ayɛ biribi foforo na sɛ wopaw no a, ɛbɛyi option one no afi hɔ
- </label> a wɔde kyerɛw nsɛm
Fa .inline
adesuakuw no ka checkboxes anaa radio ahorow a ɛtoatoa so ho ma controls no pue wɔ line koro no ara so.
- <label class = "nhyɛnsodeɛ adaka no mu" >
- <input type = "nhyɛaseɛ adaka" id = "inlineCheckbox1" botae = "ɔpaw1" > 1
- </label> a wɔde kyerɛw nsɛm
- <label class = "nhyɛnsodeɛ adaka no mu" >
- <input type = "nhyɛaseɛ adaka" id = "inlineCheckbox2" botae = "ɔpaw2" > 2
- </label> a wɔde kyerɛw nsɛm
- <label class = "nhyɛnsodeɛ adaka no mu" >
- <input type = "nhyɛaseɛ adaka" id = "inlineCheckbox3" botae = "ɔpaw3" > 3
- </label> a wɔde kyerɛw nsɛm
Fa default option no di dwuma anaa kyerɛ a multiple="multiple"
na kyerɛ option ahorow pii prɛko pɛ.
- <paw>
- <apaw> 1 </apaw>
- <apaw> 2 </apaw>
- <apaw> 3 </apaw>
- <apaw> 4 </apaw>
- <apaw> 5 </apaw>
- </paw>
- <paw dodow = "dodow" >
- <apaw> 1 </apaw>
- <apaw> 2 </apaw>
- <apaw> 3 </apaw>
- <apaw> 4 </apaw>
- <apaw> 5 </apaw>
- </paw>
Sɛ wode ka ho wɔ browser controls a ɛwɔ hɔ dedaw no so a, Bootstrap de fom no afã afoforo a mfaso wɔ so ka ho.
Fa nsɛm anaa bɔtn ahorow ka ho ansa na wode nsɛm biara a egyina nsɛm so ahyɛ mu anaasɛ akyi. Hyɛ no nsow sɛ select
wɔmfa element ahorow nhyɛ ha.
Fa adesuakuw abien no mu biako kyekyere an .add-on
ne an input
ho de prepend anaa fa nsɛm ka input bi ho.
- <div adesuakuw = "nhyɛase-prepend" >
- <span class = "add-on" > @ </span><input class = "span2" id = "prependedInput" kɛse = "16" type = "nkyerɛwee" beae = "Ɔdefo din" >
- </div> no
- <div class = "nhyɛase-a wɔde ka ho" >
- < nhyɛaseɛ adesuakuw = "span2" id = "a wɔde aka hoInput" kɛseɛ = "16" type = "nkyerɛwee" ><span adesuakuw = "add-on" > .00 </span>
- </div> no
Fa adesua abien no nyinaa ne nhwɛso abien a ɛwɔ mu no .add-on
di dwuma de prepend na fa input bi ka ho.
- <div class = "nhyɛase-prepend nhyɛase-fa" >
- <span class = "add-on" > $ </span><input class = "span2" id = "appendedPrependedInput" kɛseɛ = "16" type = "nsɛm" ><span adesua = "add-on" > .00 </span> no
- </div> no
Sɛ́ anka <span>
wode nsɛm bɛka ho no, fa a .btn
fa bɔtn (anaa abien) bata nsɛm a wode bɛhyɛ mu ho.
- <div class = "nhyɛase-a wɔde ka ho" >
- <input class = "span2" id = "appendedInputButton" kɛse = "16" type = "nkyerɛwee" ><button adesuakuw = "btn" type = "button" > Kɔ! </button> no ho
- </div> no
- <div class = "nhyɛase-a wɔde ka ho" >
- <input class = "span2" id = "appendedInputButtons" size = "16" type = "nkyerɛwee" ><button adesuakuw = "btn" type = "button" > Hwehwɛ </button><button adesuakuw = "btn" type = "button" > Nneɛma a wobɛpaw </button>
- </div> no
- <form class = "kwan-hwehwɛ" >
- <div class = "nhyɛase-a wɔde ka ho" >
- <input type = "nkyerɛwee" adesuakuw = "span2 hwehwɛ-asɛmmisa" >
- <button type = "submit" class = "btn" > Hwehwɛ </bɔtn>
- </div> no
- <div adesuakuw = "nhyɛase-prepend" >
- <button type = "submit" class = "btn" > Hwehwɛ </bɔtn>
- <input type = "nkyerɛwee" adesuakuw = "span2 hwehwɛ-asɛmmisa" >
- </div> no
- </form>
Fa relative sizing classes te sɛ .input-large
anaa ɛne wo inputs no hyia grid column sizes a wode .span*
classes di dwuma no hyia.
- <input class = "input-mini" type = "nkyerɛwee" beae a wɔde hyɛ = ".input-mini" >
- <input class = "input-ketewa" type = "nkyerɛwee" beae = ".input-ketewa" >
- <input class = "input-medium" type = "nkyerɛwee" beae a wɔde hyɛ = ".input-medium" >
- <input class = "input-kɛse" type = "nkyerɛwee" beae = ".input-kɛse" >
- <input class = "input-xlarge" type = "nkyerɛwee" beae a wɔde hyɛ = ".input-xlarge" >
- <input class = "input-xxlarge" type = "nkyerɛwee" beae a wɔde hyɛ = ".input-xxlarge" >
Ti a ɛwɔ soro! Wɔ daakye nkyerɛase ahorow mu no, yɛbɛsesa sɛnea wɔde saa relative input class ahorow yi di dwuma no ma ɛne yɛn button akɛse no ahyia. Sɛ nhwɛso no, .input-large
ɛbɛma padding ne font-size a ɛwɔ input bi mu no ayɛ kɛse.
Fa .span1
to di dwuma .span12
ma nsɛm a wɔde hyɛ mu a ɛne grid columns no akɛse koro no ara hyia.
- <input class = "span1" type = "nkyerɛwee" beae = ".span1" >
- <input class = "span2" type = "nkyerɛwee" beae = ".span2" >
- <input class = "span3" type = "nkyerɛwee" beae = ".span3" >
- <paw adesuakuw = "span1" >
- ...
- </paw>
- <paw adesuakuw = "span2" >
- ...
- </paw>
- <paw adesuakuw = "span3" >
- ...
- </paw>
Sɛ wopɛ grid inputs pii wɔ line biara mu a, fa .controls-row
modifier class no di dwuma ma spacing a ɛfata . Ɛ floats inputs no ma collapse white-space, hyehyɛ margins a ɛfata, na clears float no.
- <div adesuakuw = "ahyɛnsode" >
- <input class="span5" type="text" placeholder=".span5">
- </div>
- <div class="controls controls-row">
- <input class="span4" type="text" placeholder=".span4">
- <input class="span1" type="text" placeholder=".span1">
- </div>
- ...
Present data in a form that's not editable without using actual form markup.
- <span class="input-xlarge uneditable-input">Some value here</span>
End a form with a group of actions (buttons). When placed within a .form-horizontal
, the buttons will automatically indent to line up with the form controls.
- <div class="form-actions">
- <button type="submit" class="btn btn-primary">Save changes</button>
- <button type="button" class="btn">Cancel</button>
- </div>
Inline and block level support for help text that appears around form controls.
- <input type="text"><span class="help-inline">Inline help text</span>
- <input type="text"><span class="help-block">A longer block of help text that breaks onto a new line and may extend beyond one line.</span>
Provide feedback to users or visitors with basic feedback states on form controls and labels.
We remove the default outline
styles on some form controls and apply a box-shadow
in its place for :focus
.
- <input class="input-xlarge" id="focusedInput" type="text" value="This is focused...">
Add the disabled
attribute on an input to prevent user input and trigger a slightly different look.
- <input class="input-xlarge" id="disabledInput" type="text" placeholder="Disabled input here..." disabled>
Bootstrap includes validation styles for error, warning, info, and success messages. To use, add the appropriate class to the surrounding .control-group
.
- <div class="control-group warning">
- <label class="control-label" for="inputWarning">Input with warning</label>
- <div class="controls">
- <input type="text" id="inputWarning">
- <span class="help-inline">Something may have gone wrong</span>
- </div>
- </div>
- <div class="control-group error">
- <label class="control-label" for="inputError">Input with error</label>
- <div class="controls">
- <input type="text" id="inputError">
- <span class="help-inline">Please correct the error</span>
- </div>
- </div>
- <div class="control-group success">
- <label class="control-label" for="inputSuccess">Input with success</label>
- <div class="controls">
- <input type="text" id="inputSuccess">
- <span class="help-inline">Woohoo!</span>
- </div>
- </div>
Add classes to an <img>
element to easily style images in any project.
- <img src="..." class="img-rounded">
- <img src="..." class="img-circle">
- <img src="..." class="img-polaroid">
Heads up! .img-rounded
and .img-circle
do not work in IE7-8 due to lack of border-radius
support.
140 icons in sprite form, available in dark gray (default) and white, provided by Glyphicons.
Glyphicons Halflings are normally not available for free, but an arrangement between Bootstrap and the Glyphicons creators have made this possible at no cost to you as developers. As a thank you, we ask you to include an optional link back to Glyphicons whenever practical.
All icons require an <i>
tag with a unique class, prefixed with icon-
. To use, place the following code just about anywhere:
- <i class="icon-search"></i>
There are also styles available for inverted (white) icons, made ready with one extra class. We will specifically enforce this class on hover and active states for nav and dropdown links.
- <i class="icon-search icon-white"></i>
Heads up! When using beside strings of text, as in buttons or nav links, be sure to leave a space after the <i>
tag for proper spacing.
Use them in buttons, button groups for a toolbar, navigation, or prepended form inputs.
- <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> Edit</a></li>
- <li><a href="#"><i class="icon-trash"></i> Delete</a></li>
- <li><a href="#"><i class="icon-ban-circle"></i> Ban</a></li>
- <li class="divider"></li>
- <li><a href="#"><i class="i"></i> Make admin</a></li>
- </ul>
- </div>
- <a class="btn btn-small" href="#"><i class="icon-star"></i></a>
- <ul class="nav nav-list">
- <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> Applications</a></li>
- <li><a href="#"><i class="i"></i> Misc</a></li>
- </ul>
- <div class="control-group">
- <label class="control-label" for="inputIcon">Email address</label>
- <div class="controls">
- <div class="input-prepend">
- <span class="add-on"><i class="icon-envelope"></i></span>
- <input class="span2" id="inputIcon" type="text">
- </div>
- </div>
- </div>