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ɔ... </p> no
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> class = "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> na ɛwɔ hɔ <small>Wɔayɛ saa nkyerɛwde yi sɛ wɔbɛfa no sɛ nkyerɛwee a ɛyɛ fɛ.</small><small> Wɔayɛ sɛ wɔbɛfa saa nsɛm a wɔakyerɛw no sɛ nkyerɛwde a ɛyɛ fɛ. </small> a ɛyɛ ketewaa bi </p> no</p> no
Sɛ wode font-weight a emu yɛ duru si nsɛm a wɔakyerɛw no fã bi so dua.
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>wɔakyerɛ ase sɛ nkyerɛwee a ɛyɛ tuntum </strong>
Sɛ́ wubesi nsɛm a wɔakyerɛw no fã bi so dua a wɔde italics ahyɛ mu no.
Wɔakyerɛ nsɛm no fã bi a edidi so yi ase sɛ nsɛm a wɔakyerɛw no italic .
<em>wɔakyerɛ ase sɛ nsɛm a wɔakyerɛw no italic</em>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.
Ɛnyɛ den sɛ wobɛsan asiesie nsɛm no akɔ afã horow a ɛwɔ nsɛm a wɔde hyɛ adesua ahorow mu.
Nkyerɛwee a wɔahyehyɛ no benkum so.
Nsɛm a wɔahyehyɛ no mfinimfini.
Nsɛm a wɔahyehyɛ no nifa so.
- <p class="text-left">Nkyerɛwee a wɔahyehyɛ no benkum so.</p> class = "text-left" > Nkyerɛwee a wɔahyehyɛ no benkum so. </p> no
- <p class = "nkyerɛwee-mfinimfini" > Nkyerɛwee a wɔahyɛ no mfinimfini . </p> no
- <p class = "text-right" > Nsɛm a wɔahyehyɛ no nifa so. </p> no
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 class="muted">Fusce dapibus, tellus ac nnome commodo, tortor mauris nibh.</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 title="ahyɛnsodeɛ">ahyɛnsodeɛ</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 Kasa a Wɔde Kyerɛw Nsɛm" class="initialism">HTML</abbr> title = "HyperText Markup Kasa" adesuakuw = "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 to@nhwɛso.com </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 class="twe-nifa"> class = "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>
Yi default list-style
ne benkum padding wɔ list nneɛma (mmofra ntɛm ara nkutoo).
- <ul class="wɔnhyɛ no sɛnea wɔyɛ no"> class = "wɔnnyɛ style" >
- <li> ... </li> na ɛwɔ hɔ
- </ul>
Fa list nneɛma nyinaa gu line biako so a inline-block
ne padding bi a ɛyɛ hare wom.
- <ul adesuakuw="inline"> adesuakuw = "inline" >
- <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 class="dl-a ɛkɔ soro"> class = "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><ɔfã></code> sɛ inline. nhwɛso , <kode> & lt ; ɛsɛ sɛ wɔkyekyere ɔfã & gt ;</ code > no 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 adesuakuw="pon"> adesuakuw = "pon" >
- ...
- </table> no
Fa adesua a edidi so yi mu biara ka adesua a edidi so yi ho .table
.
.table-striped
Ɔde zebra-striping ka table row biara a ɛwɔ <tbody>
via :nth-child
CSS selector no mu (ɛnyɛ wɔ IE7-8 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 |
- <table class="pon pon-nkyerɛwee"> class = "pon pon-nkyerɛwee" >
- ...
- </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 no pon-hye so"> 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 |
- <table class="pon pon-hover"> class = "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 tiawa"> class = "pon pon-a wɔabɔ no mua" >
- ...
- </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 |
<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>
- <afuw mu nhyehyɛe>
- <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>
- </afuw mu nhyehyɛe>
- </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ɛ"> 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 class="fom-inline"> class = "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
- <form class="kwan-a ɛkɔ soro"> class = "ɔkwan-a ɛkɔ soro" >
- <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="text" placeholder="Nkyerɛwee a wɔde hyɛ mu"> type = "nkyerɛwee" beae = "Nkyerɛwee 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> rows = "3" ></nkyerɛwee beae>
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 class="nhyɛaseɛ adaka"> class = "nhyɛaseɛ 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ɛaseɛ adaka no mu"> class = "nhyɛaseɛ adaka inline" >
- <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 class="nhyɛase-prepend"> class = "nhyɛase-prepend" >
- <span adesuakuw = "a wɔde ka ho" > @ </span>
- <input class = "span2" id = "prependedInput" type = "nkyerɛwee" beae = "Ɔdefo din" >
- </div> no
- <div class = "nhyɛase-a wɔde ka ho" >
- <input class = "span2" id = "a wɔde ahyɛ muInput" type = "nkyerɛwee" >
- <span adesuakuw = "a wɔde ka ho" > .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="input-prepend nsɛm a wɔde hyɛ mu-ka ho"> class = "nhyɛase-prepend nhyɛase-fa" >
- <span adesuakuw = "a wɔde ka ho" > $ </span>
- <input class = "span2" id = "a wɔde ahyɛ muPrependedInput" type = "nkyerɛwee" >
- <span adesuakuw = "a wɔde ka ho" > .00 </span>
- </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-fa-ka ho"> class = "nhyɛase-a wɔde ka ho" >
- <input class = "span2" id = "a wɔde ahyɛ muInputButton" type = "nkyerɛwee" >
- <button class = "btn" type = "bɔn " > Kɔ! </button> no ho
- </div> no
- <div class="nhyɛase-fa-ka ho"> class = "nhyɛase-a wɔde ka ho" >
- <input class = "span2" id = "a wɔde ahyɛ muInputButtons" type = "nkyerɛwee" >
- <button class = "btn" type = "button" > Hwehwɛ </bɔtn>
- <button class = "btn" type = "button" > Nneɛma a wobetumi apaw </button>
- </div> no
- <div class="nhyɛase-fa-ka ho"> class = "nhyɛase-a wɔde ka ho" >
- <input class = "span2" id = "a wɔde aka hoDropdownButton" type = "nkyerɛwee" >
- <div adesuakuw = "btn-kuw" >
- <button class = "btn a ɛkɔ fam-toggle" data-toggle = "a ɛba fam" >
- Anamɔntuo
- <span adesuakuw = "caret" ></span>
- </button> no ho
- <ul class = "nsɛm a ɛwɔ ase hɔ" >
- ...
- </ul>
- </div> no
- </div> no
- <div class="nhyɛase-prepend"> class = "nhyɛase-prepend" >
- <div adesuakuw = "btn-kuw" >
- <button class = "btn a ɛkɔ fam-toggle" data-toggle = "a ɛba fam" >
- Anamɔntuo
- <span adesuakuw = "caret" ></span>
- </button> no ho
- <ul class = "nsɛm a ɛwɔ ase hɔ" >
- ...
- </ul>
- </div> no
- <input class = "span2" id = "prependedDropdownButton" type = "nkyerɛwee" >
- </div> no
- <div class="input-prepend nsɛm a wɔde hyɛ mu-ka ho"> class = "nhyɛase-prepend nhyɛase-fa" >
- <div adesuakuw = "btn-kuw" >
- <button class = "btn a ɛkɔ fam-toggle" data-toggle = "a ɛba fam" >
- Anamɔntuo
- <span adesuakuw = "caret" ></span>
- </button> no ho
- <ul class = "nsɛm a ɛwɔ ase hɔ" >
- ...
- </ul>
- </div> no
- <input class = "span2" id = "a wɔde aka hoPrependedDropdownButton" type = "nkyerɛwee" >
- <div adesuakuw = "btn-kuw" >
- <button class = "btn a ɛkɔ fam-toggle" data-toggle = "a ɛba fam" >
- Anamɔntuo
- <span adesuakuw = "caret" ></span>
- </button> no ho
- <ul class = "nsɛm a ɛwɔ ase hɔ" >
- ...
- </ul>
- </div> no
- </div> no
- <fom>
- <div adesuakuw = "nhyɛase-prepend" >
- <div adesuakuw = "btn-kuw" > ... </div>
- <input type = "nkyerɛwee" >
- </div> no
- <div class = "nhyɛase-a wɔde ka ho" >
- <input type = "nkyerɛwee" >
- <div adesuakuw = "btn-kuw" > ... </div>
- </div> no
- </form>
- <form class="kwan-hwehwɛ"> 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.
Ma biribiara <input>
anaa <textarea>
element biara nyɛ n’ade te sɛ block level element.
- <input class="input-block-level" type="nsɛm" beaeɛ=".nhyɛaseɛ-block-level"> class = "nhyɛase-block-level" type = "nkyerɛwee" beae = ".input-block-level" >
- <input class="input-mini" type="nsɛm" beaeɛ=".nhyɛaseɛ-mini"> class = "nhyɛase-mini" type = "nkyerɛwee" beae = ".nhyɛase-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="nsɛm" beaeɛ=".span1"> 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 . Ɛfa nsuo a wɔde ahyɛ mu no ma ɛbubu white-space, ɛde margins a ɛfata si hɔ, na ɛpopa float no.
- <div class="ahyɛnsodeɛ"> class = "ahyɛnsodeɛ" >
- <input class = "span5" type = "nkyerɛwee" beae = ".span5" >
- </div> no
- <div class = "ahyɛnsodeɛ-row" >
- <input class = "span4" type = "nkyerɛwee" beae = ".span4" >
- <input class = "span1" type = "nkyerɛwee" beae = ".span1" >
- </div> no
- ...
Fa data kyer�� wɔ ɔkwan a ɛnyɛ nea wotumi sesa so a wɔmfa fom agyiraehyɛde ankasa nni dwuma.
- <span class="input-xlarge uneditable-input">Nsonsonoe bi wɔ ha</span> class = "input-xlarge uneditable-input" > Nneɛma bi a ɛsom bo wɔ ha </span>
Fa nneyɛe kuw (buttons) ba awiei kratasin bi. Sɛ wode si a , mu a .form-actions
, bɔtɔn ahorow no bɛkɔ mu ara kwa ma ɛne kratasin no sohwɛ ahorow no ahyia.
- <div class="ɔkwan-nneɛma"> class = "ɔkwan-nneɛma" >
- <button type = "submit" class = "btn btn-primary" > Fa nsakraeɛ sie </button>
- <button type = "button" adesuakuw = "btn" > Twa mu </button>
- </div> no
Inline ne block level mmoa ma mmoa nsɛm a epue wɔ fom controls ho.
- <input type="text"><span class="help-inline">Mmoa nsɛm a ɛwɔ intanɛt so</span> type = "nkyerɛwee" ><span class = "mmoa-inline" > Inline mmoa nsɛm </span>
- <input type="text"><span class="help-block">Mmoa nkyerɛwee a ɛware a ɛpaapae kɔ nkyerɛwde foforo so na ebetumi atrɛw asen nkyerɛwde biako.</span> type = "text" ><span class = "help-block" > Mmoa nkyerɛwee a ɛware a ɛpaapae kɔ nkyerɛwde foforo so na ebetumi atrɛw asen nkyerɛwde biako. </span> no
Fa nsɛm a wɔka kyerɛ wɔn a wɔde di dwuma anaa nsrahwɛfo a wɔde nsɛm a wɔka kyerɛ titiriw a ɛfa kratasin sohwɛ ne nkyerɛwde ahorow ho ma.
Yɛyi default outline
styles a ɛwɔ form controls binom so no na yɛde a box-shadow
si n’ananmu ma :focus
.
- <input class="input-xlarge" id="focusedInput" type="text" value="Eyi yɛ nea wɔde wɔn adwene si so..."> class = "input-xlarge" id = "focusedInput" type = "nkyerɛwee" botae = "Eyi yɛ nea wɔde wɔn adwene si so..." >
Style inputs via default browser dwumadie a ɛwɔ :invalid
. Kyerɛ a type
, fa required
su no ka ho sɛ afuw no nyɛ nea wopɛ a, na (sɛ ɛfata a) kyerɛ a pattern
.
Eyi nni hɔ wɔ Internet Explorer 7-9 nkyerɛase ahorow mu esiane sɛ wonnya mmoa mma CSS pseudo selectors nti.
- <input class="span3" type="email" a ɛho hia> class = "span3" type = "email" a ɛho hia >
Fa disabled
attribute no ka ho wɔ input bi so na asiw ɔdefo no input ano na woakanyan hwɛ soronko kakra.
- <input class="input-xlarge" id="disabledInput" type="text" placeholder="Wɔagyae nsɛm a wɔde hyɛ mu wɔ ha..." wɔagyae> class = "input-xlarge" id = "disabledInput" type = "text" beaeɛ = "Wɔagyae nsɛm a wɔde hyɛ mu wɔ ha..." wɔagyae >
Bootstrap no de validation styles ma mfomso, kɔkɔbɔ, info, ne nkonimdi nkrasɛm ka ho. Sɛ wode bedi dwuma a, fa adesuakuw a ɛfata no ka nea atwa ho ahyia no ho .control-group
.
- <div class="ahyɛnsodeɛ-kuo kɔkɔbɔ"> class = "ahyɛnsodeɛ-kuo kɔkɔbɔ" >
- <label class = "control-label" for = "inputWarning" > Nsɛm a wɔde hyɛ mu a kɔkɔbɔ wom </label>
- <div adesuakuw = "ahyɛnsode" >
- <nhyɛaseɛ type = "nkyerɛwee" id = "nhyɛaseɛKɔkɔbɔ" >
- <span class = "help-inline" > Ebia biribi anyɛ yiye </span>
- </div> no
- </div> no
- <div class = "ahyɛnsodeɛ-kuo mfomsoɔ" >
- <label class = "control-label" for = "inputError" > Nsɛm a wɔde hyɛ mu a mfomso wom </label>
- <div adesuakuw = "ahyɛnsode" >
- <nsɛm a wɔde hyɛ mu no su = "nkyerɛwee" id = "nsɛm a wɔde hyɛ mu Mfomso" >
- <span class = "help-inline" > Yɛsrɛ wo siesie mfomso no </span>
- </div> no
- </div> no
- <div class = "ahyɛnsodeɛ-kuo ho nsɛm" >
- <label class = "control-label" for = "nsɛm a wɔde hyɛ mu" > Nsɛm a wɔde hyɛ mu </label>
- <div adesuakuw = "ahyɛnsode" >
- <nsɛm a wɔde hyɛ mu no su = "nkyerɛwee" id = "nsɛm a wɔde hyɛ mu" >
- <span class = "help-inline" > Wɔafa dwumadie din dedaw </span>
- </div> no
- </div> no
- <div class = "ahyɛnsodeɛ-kuo nkonimdie" >
- <label class = "control-label" for = "inputSuccess" > Nsɛm a wɔde hyɛ mu a ɛyɛ nkonimdi </label>
- <div adesuakuw = "ahyɛnsode" >
- <nhyɛaseɛ type = "nkyerɛwee" id = "nhyɛaseɛNkonimdie" >
- <span adesuakuw = "mmoa-inline" > Woohoo! </span> no
- </div> no
- </div> no
Fa adesua ahorow ka <img>
element bi ho na ama ayɛ mmerɛw sɛ wobɛhyehyɛ mfonini ahorow wɔ adwuma biara mu.
- <img src="..." adesuakuw="img-a ɛyɛ kurukuruwa"> src = "..." adesuakuw = "img-a wɔabɔ no kurukuruwa" >
- <img src = "..." adesuakuw = "img-kuruwa" >
- <img src = "..." adesuakuw = "img-polaroid" >
Ti a ɛwɔ soro! .img-rounded
na .img-circle
ɛnyɛ adwuma wɔ IE7-8 mu esiane border-radius
mmoa a wonnya nti.
140 ahyɛnsodeɛ wɔ sprite kwan so, ɛwɔ hɔ wɔ tuntum grey (default) ne fitaa, Glyphicons na ɛde ama .
Glyphicons Halflings taa nyɛ nea wontua hwee, nanso nhyehyɛe bi a ɛda Bootstrap ne Glyphicons abɔfo ntam no ama eyi ayɛ yiye a wontua hwee mma wo sɛ wɔn a wɔyɛ no. Sɛ́ aseda no, yɛsrɛ wo sɛ fa link a wopɛ a ɛsan kɔ Glyphicons no ka ho bere biara a ɛbɛyɛ yiye.
Ahyɛnsode ahorow nyinaa hwehwɛ <i>
tag a ɛwɔ adesuakuw soronko bi, a wɔde icon-
. Sɛ wode bedi dwuma a, ɛkame ayɛ sɛ fa koodu a edidi so yi to baabiara:
- <i adesuakuw = "ahyɛnsode-hwehwɛ" ></i>
Afei nso, nneɛma ahorow bi wɔ hɔ a wɔde yɛ ahyɛnsode ahorow a wɔadan no (fitaa), a wɔayɛ no krado a wɔde adesuakuw biako aka ho. Yɛbɛhyɛ saa adesuakuw yi mu den titiriw wɔ hover ne active states so ama nav ne dropdown links.
- <i class = "ahyɛnsode-hwehwɛ ahyɛnsode-fitaa" ></i>
Ti a ɛwɔ soro!Sɛ wode nsɛm a ɛwɔ nhama ho redi dwuma, te sɛ nea ɛwɔ bɔtn anaa nav link ahorow mu no a, hwɛ hu sɛ wubegyaw baabi wɔ <i>
tag no akyi ama ntam kwan a ɛfata.
Fa di dwuma wɔ bɔtn, bɔtn akuw ma adwinnade pon, akwantu, anaa kratasin a wɔde ahyɛ mu a wɔadi kan ahyɛ mu.
- <div adesuakuw = "btn-adwinnade" >
- <div adesuakuw = "btn-kuw" >
- <a adesuakuw = "btn" href = "#" ><i adesuakuw = "ahyɛnsode-hyehyɛ-benkum" ></i></a>
- <a adesuakuw = "btn" href = "#" ><i adesuakuw = "ahyɛnsode-ahyɛnsode-mfinimfini" ></i></a>
- <a adesuakuw = "btn" href = "#" ><i adesuakuw = "ahyɛnsode-hyehyɛ-nifa" ></i></a>
- <a adesuakuw = "btn" href = "#" ><i adesuakuw = "ahyɛnsode-hyehyɛ-fata" ></i></a>
- </div> no
- </div> no
- <div adesuakuw = "btn-kuw" >
- <a class = "btn btn-primary" href = "#" ><i class = "ahyɛnsode-ɔdefo ahyɛnsode-fitaa" ></i> Ɔdefo </a>
- <a adesuakuw = "btn btn-mfitiaseɛ a ɛwɔ ase-toggle" data-toggle = "afiri a ɛba fam" href = "#" ><span adesuakuw = "caret" ></span></a>
- <ul class = "nsɛm a ɛwɔ ase hɔ" >
- <li><a href = "#" ><i adesuakuw = "ahyɛnsode-pɛnsere" ></i> Sesa </a></li>
- <li><a href = "#" ><i adesuakuw = "ahyɛnsode-nwura" ></i> Popa </a></li>
- <li><a href = "#" ><i adesuakuw = "ahyɛnsode-ban-kyinhyia" ></i> Bara </a></li>
- <li adesuakuw = "nkyekyɛmu" ></li>
- <li><a href = "#" ><i class = "me" ></i> Yɛ admin </a></li>
- </ul>
- </div> no
- <a adesuakuw = "btn btn-kɛse" href = "#" ><i adesuakuw = "ahyɛnsode-nsoromma" ></i> Nsoromma </a>
- <a adesuakuw = "btn btn-ketewa" href = "#" ><i adesuakuw = "ahyɛnsode-nsoromma" ></i> Nsoromma </a>
- <a adesuakuw = "btn btn-mini" href = "#" ><i adesuakuw = "ahyɛnsode-nsoromma" ></i> Nsoromma </a>
- <ul adesuakuw = "nav nav-nkyerɛwee" >
- <li class = "active" ><a href = "#" ><i class = "ahyɛnsodeɛ-fie ahyɛnsodeɛ-fitaa" </i> Fie </a></li>
- <li><a href = "#" ><i adesuakuw = "ahyɛnsode-nhoma" ></i> Nhomakorabea </a></li>
- <li><a href = "#" ><i adesuakuw = "ahyɛnsode-pencil" ></i> Nnwuma </a></li>
- <li><a href = "#" ><i adesuakuw = "me" ></i> Nneɛma ahorow </a> </li>
- </ul>
- <div class = "ahyɛnsodeɛ-kuo" >
- <label adesuakuw = "control-label" ma = "inputIcon" > Email address </label>
- <div adesuakuw = "ahyɛnsode" >
- <div adesuakuw = "nhyɛase-prepend" >
- <span adesuakuw = "add-on" ><i adesuakuw = "ahyɛnsode-envelope" ></i></span>
- <nhyɛase adesuakuw = "span2" id = "nhyɛaseIcon" type = "nkyerɛwee" >
- </div> no
- </div> no
- </div> no