Gyina CSS so

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.

Ti a ɛwɔ soro! Saa docs yi yɛ ma v2.3.2, a ɛnyɛ aban mmoa bio. Hwɛ Bootstrap no fã a aba foforo no!

Nsɛmti ahorow

HTML asɛmti nyinaa, <h1>through <h6>wɔ hɔ.

h1. Asɛmti 1

h2. Asɛmti 2

h3. Asɛmti 3

h4. Asɛmti 4

h5. Asɛmti 5
h6. Asɛmti 6

Nipadua no ho mfonini

Bootstrap no wiase nyinaa default font-size14px , 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

Lead nipadua no mfonini

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>

Wɔde Less na esii

Typographic scale no gyina LESS nsakraeɛ mmienu so wɔ nsakraeɛ mu.less : @baseFontSizene @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.


Nnyinasoɔ

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

Akokoɔduro

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>

Nkyerɛwee a wɔde nkyerɛwde a ɛyɛ mmerɛw ayɛ

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.

Alignment adesua ahorow

Ɛ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.

  1. <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
  2. <p class = "nkyerɛwee-mfinimfini" > Nkyerɛwee a wɔahyɛ no mfinimfini . </p> no
  3. <p class = "text-right" > Nsɛm a wɔahyehyɛ no nifa so. </p> no

Adesua ahorow a wosi so dua

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.

  1. <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
  2. <p class = "nkyerɛwee-kɔkɔbɔ" > Etiam porta sem malesuada magna mollis euismod. </p> no
  3. <p class = "nkyerɛwee-mfomso" > Donec ullamcorper nulla a ɛnyɛ metus auctor fringilla. </p> no
  4. <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
  5. <p class = "nsɛm-a-nkonimdi" > Duis mollis, est a ɛnyɛ commodo luctus, nisi erat porttitor ligula. </p> no

Nsɛmfua a wɔatwa no tiaa

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ɔ titlesu 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 titleattribute 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 .initialismasɛ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> 

Address ahorow

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>.

795
Folsom Ave, Suite 600
San Francisco, CA 94107 Kr
: (123)
Edin mũ no nyinaa
[email protected]
  1. <address>
  2. <strong> Twitter, Inc. </strong><br> Nsɛm a wɔka kyerɛ
  3. 795 Folsom Ave, Ɔdan 600 <br>
  4. San Francisco, CA 94107 <br> . Ɔde ne nsa kyerɛɛ ne so
  5. <abbr asɛmti = "Telefon" > P: </abbr> (123) 456-7890. Ɔde ne nsa kyerɛɛ ne so, na ɔde ne nsa kyerɛɛ ne so bio
  6. </address> no ho
  7. <address>
  8. <strong> Edin mũ no nyinaa </strong><br>
  9. <a href = "mailto:#" > nea edi kan.a etwa to@nhwɛso.com </a>
  10. </address> no ho

Nsɛm a wɔde siw ano

Sɛ wopɛ sɛ wofa nsɛm a wɔabɔ no mua a efi baabi foforo a ɛwɔ wo krataa no mu a.

Default a wɔde ahyɛ mu

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.

  1. <asɛm a wɔde siw ano>
  2. | _ Nkyekyɛm a edi mũ posuere erat a ante. </p> no
  3. </blockquote> a wɔde kyerɛw nsɛm

Blockquote a wobɛpaw no

Style ne emu nsɛm sesa ma nsakrae a ɛnyɛ den wɔ standard blockquote so.

Fibea bi din a wɔbɛbɔ

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
  1. <asɛm a wɔde siw ano>
  2. | _ Nkyekyɛm a edi mũ posuere erat a ante. </p> no
  3. <small> Obi a wagye din <cite title = "Fibea Asɛmti" > Fibea Asɛmti </cite></small>
  4. </blockquote> a wɔde kyerɛw nsɛm

Nneɛma foforo a wɔde kyerɛ

Fa di dwuma .pull-rightma blockquote a ɛsensɛn nsu so, a ɛwɔ nifa so.

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
  1. <blockquote class="twe-nifa"> class = "twe-nifa" >
  2. ...
  3. </blockquote> a wɔde kyerɛw nsɛm

Nsɛm a wɔahyehyɛ

Wɔnhyɛ da

Nneɛma a wɔahyehyɛ a nhyehyɛe no ho nhia pefee.

  • Lorem ipsum dolor tena ase amet
  • Consectetur adipiscing a ɛyɛ fɛ yiye
  • Integer molestie lorem wɔ massa no mu
  • Facilisis a ɛwɔ pretium nisl aliquet mu
  • Nulla volutpat a ɛyɛ aduru a wɔde yɛ aduru
    • Phasellus iaculis a ɛwɔ nipadua no mu
    • Purus sodales a ɛyɛ aduru a ɛma obi ho yɛ hyew
    • Vestibulum laoreet hyɛn gyinabea sem
    • Ac tristique libero a ɔyɛ ɔbarima a ɔpɛ sɛ ɔyɛ biribiara
  • Faucibus porta lacus a ɛyɛ fɛ a ɛyɛ fɛ
  • Aenean tena ase amet erat nunc
  • Eget porttitor a ɔyɛ ɔkyerɛkyerɛfo
  1. <ul> no
  2. <li> ... </li> na ɛwɔ hɔ
  3. </ul>

Wɔahyɛ sɛ

Nneɛma a wɔahyehyɛ a nhyehyɛe no ho hia pefee wom.

  1. Lorem ipsum dolor tena ase amet
  2. Consectetur adipiscing a ɛyɛ fɛ yiye
  3. Integer molestie lorem wɔ massa no mu
  4. Facilisis a ɛwɔ pretium nisl aliquet mu
  5. Nulla volutpat a ɛyɛ aduru a wɔde yɛ aduru
  6. Faucibus porta lacus a ɛyɛ fɛ a ɛyɛ fɛ
  7. Aenean tena ase amet erat nunc
  8. Eget porttitor a ɔyɛ ɔkyerɛkyerɛfo
  1. <ol> no
  2. <li> ... </li> na ɛwɔ hɔ
  3. </ol>

Wɔannwene no

Yi default list-stylene benkum padding wɔ list nneɛma (mmofra ntɛm ara nkutoo).

  • Lorem ipsum dolor tena ase amet
  • Consectetur adipiscing a ɛyɛ fɛ yiye
  • Integer molestie lorem wɔ massa no mu
  • Facilisis a ɛwɔ pretium nisl aliquet mu
  • Nulla volutpat a ɛyɛ aduru a wɔde yɛ aduru
    • Phasellus iaculis a ɛwɔ nipadua no mu
    • Purus sodales a ɛyɛ aduru a ɛma obi ho yɛ hyew
    • Vestibulum laoreet hyɛn gyinabea sem
    • Ac tristique libero a ɔyɛ ɔbarima a ɔpɛ sɛ ɔyɛ biribiara
  • Faucibus porta lacus a ɛyɛ fɛ a ɛyɛ fɛ
  • Aenean tena ase amet erat nunc
  • Eget porttitor a ɔyɛ ɔkyerɛkyerɛfo
  1. <ul class="wɔnhyɛ no sɛnea wɔyɛ no"> class = "wɔnnyɛ style" >
  2. <li> ... </li> na ɛwɔ hɔ
  3. </ul>

Inline no mu

Fa list nneɛma nyinaa gu line biako so a inline-blockne padding bi a ɛyɛ hare wom.

  • Lorem ipsum a ɔyɛ ɔbarima
  • Phasellus a wɔfrɛ no iaculis a wɔfrɛ no iaculis
  • Nulla a ɔyɛ ɔkwasea
  1. <ul adesuakuw="inline"> adesuakuw = "inline" >
  2. <li> ... </li> na ɛwɔ hɔ
  3. </ul>

Nkyerɛmu

Nsɛmfua a wɔahyehyɛ a nkyerɛkyerɛmu ahorow a ɛbata ho.

Nkyerɛkyerɛmu a wɔahyehyɛ
Nkyerɛkyerɛmu a wɔahyehyɛ no yɛ pɛpɛɛpɛ ma nsɛmfua nkyerɛase.
Euismod ho asɛm
Vestibulum id ligula porta felis euismod awotwaa mu nsuo a ɛwɔ akyi berɛmo mu.
Donec id elit a ɛnyɛ mi porta gravida wɔ eget metus.
Malesuada a ɛwɔ porta
Etiam porta sem ɔbarima a ɔyɛ ɔbarima a ɔyɛ ɔbarima.
  1. <dl> na ɛwɔ hɔ
  2. <dt> ... </dt> na ɛwɔ hɔ
  3. <dd> ... </dd> na ɛwɔ hɔ
  4. </dl> no

Horizontal nkyerɛkyerɛmu

Yɛ nsɛmfua ne nkyerɛkyerɛmu ahorow a <dl>wɔahyehyɛ no nnidiso nnidiso wɔ nkyɛnkyɛn.

Nkyerɛkyerɛmu a wɔahyehyɛ
Nkyerɛkyerɛmu a wɔahyehyɛ no yɛ pɛpɛɛpɛ ma nsɛmfua nkyerɛase.
Euismod ho asɛm
Vestibulum id ligula porta felis euismod awotwaa mu nsuo a ɛwɔ akyi berɛmo mu.
Donec id elit a ɛnyɛ mi porta gravida wɔ eget metus.
Malesuada a ɛwɔ porta
Etiam porta sem ɔbarima a ɔyɛ ɔbarima a ɔyɛ ɔbarima.
Felis euismod semper a ɛma obi nya lacinia
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut aduru a wɔde yɛ aduru a ɛma ɛyɛ mmerɛw sɛ wobɛtra ase amet risus.
  1. <dl class="dl-a ɛkɔ soro"> class = "dl-a ɛkɔ soro" >
  2. <dt> ... </dt> na ɛwɔ hɔ
  3. <dd> ... </dd> na ɛwɔ hɔ
  4. </dl> no

Ti a ɛwɔ soro!Horizontal description lists bɛtwa nsɛmfua a ɛware dodo sɛ ɛbɛhyɛ benkum column fix text-overflowno mu . Wɔ viewports teateaa mu no, wɔbɛsesa akɔ default stacked layout no so.

Inline no mu

Fa inline snippets a ɛwɔ code no mu no kyekyere <code>.

Sɛ nhwɛso no, <section>ɛsɛ sɛ wɔkyekyere no sɛ inline.
  1. 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 inline .

Mfitiaseɛ block

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>
  1. <pre> no
  2. <p>Nsɛm a wɔakyerɛw no nhwɛso wɔ ha...</p>
  3. </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-scrollableadesuakuw a ɛbɛhyehyɛ max-height a ɛyɛ 350px na ama y-axis scrollbar no aka ho.

Default ahorow a wɔde yɛ nneɛma

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 .tableno 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
  1. <pon adesuakuw="pon"> adesuakuw = "pon" >
  2. ...
  3. </table> no

Adesua ahorow a wobetumi apaw

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-childCSS 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
  1. <table class="pon pon-nkyerɛwee"> class = "pon pon-nkyerɛwee" >
  2. ...
  3. </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
  1. <table class="pon no pon-hye so"> class = "pon a ɛwɔ pon so" >
  2. ...
  3. </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
  1. <table class="pon pon-hover"> class = "pon pon-hover" >
  2. ...
  3. </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
  1. <table class="pon pon-a wɔatwa no tiawa"> class = "pon pon-a wɔabɔ no mua" >
  2. ...
  3. </table> no

row adesua ahorow a wobetumi apaw

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
  1. ...
  2. < tr class = "nkonimdi" >
  3. <td> 1 < /td> na ɛwɔ hɔ
  4. <td>TB - Ɔsram biara</ td >
  5. <td> 01 / 04 / 2012 < /td>. Ɔde ne nsa kyerɛɛ ne so
  6. <td>Wɔapene so</ td >
  7. </ tr > no
  8. ...

Wɔboa pon agyiraehyɛde

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
  1. <pon>
  2. <nsɛmfua> ... </nsɛmfua>
  3. <ti>
  4. <tr>
  5. <th> ... </th> no ho asɛm
  6. <th> ... </th> no ho asɛm
  7. </tr>a ɛwɔ hɔ
  8. </thead> no ho
  9. <nipadua>
  10. <tr>
  11. <td> ... </td> na ɛwɔ hɔ
  12. <td> ... </td> na ɛwɔ hɔ
  13. </tr>a ɛwɔ hɔ
  14. </tbody> no ho
  15. </table> no

Default ahorow a wɔde yɛ nneɛma

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.

Okunini Nhwɛsoɔ block-level mmoa nsɛm wɔ ha.
  1. <fom>
  2. <afuw mu nhyehyɛe>
  3. <anansesɛm> Atetesɛm </anansesɛm>
  4. <label> Label din </label>
  5. <input type = "text" placeholder = "Twerɛ biribi..." >
  6. <span class = "help-block" > Nhwɛsoɔ block-level mmoa nkyerɛwee wɔ ha. </span> no
  7. <label adesuakuw = "nhyɛnsode adaka" >
  8. <input type = "checkbox" > Hwɛ me
  9. </label> a wɔde kyerɛw nsɛm
  10. <button type = "fa kɔ" class = "btn" > Fa kɔ </button>
  11. </afuw mu nhyehyɛe>
  12. </form>

Nhyehyɛe ahorow a wobetumi apaw

Nea ɛka Bootstrap ho ne nkyerɛwde nhyehyɛe abiɛsa a wobetumi apaw ama nsɛm a wɔtaa de di dwuma.

Hwehwɛ kratasin no

Fa ka .form-searchkratasin no ho na .search-queryfa ka ho <input>ma nsɛm a wɔde hyɛ mu a ɛyɛ kurukuruwa kɛse.

  1. <form class="kwan-hwehwɛ"> class = "kwan-hwehwɛ" >
  2. <input type = "text" class = "input-medium hwehwɛ-asɛmmisa" >
  3. <button type = "submit" class = "btn" > Hwehwɛ </bɔtn>
  4. </form>

Inline kratasin no

Fa ka ho .form-inlinema benkum-aligned labels ne inline-block controls ma compact nhyehyɛe.

  1. <fom class="fom-inline"> class = "fom-inline" >
  2. <nhyɛaseɛ su = "nkyerɛwee" adesuakuw = "nhyɛaseɛ-ketewa" beaeɛ = "Email" >
  3. <input type = "password" class = "input-ketewa" beae = "Asɛmfua" >
  4. <label adesuakuw = "nhyɛnsode adaka" >
  5. <input type = "checkbox" > Kae me
  6. </label> a wɔde kyerɛw nsɛm
  7. <button type = "submit" class = "btn" > Fa wo ho hyɛ mu </button>
  8. </form>

Ɔkwan a wɔfa so yɛ ade a ɛkɔ soro

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:

  • Fa ka .form-horizontalkratasin no ho
  • Fa nkyerɛwde ne nneɛma a wɔde di dwuma no kyekyere mu.control-group
  • Fa ka .control-labellabel no ho
  • Fa controls biara a ɛbata ho no kyekyere mu .controlsma ɛne no hyia yiye
  1. <form class="kwan-a ɛkɔ soro"> class = "ɔkwan-a ɛkɔ soro" >
  2. <div class = "ahyɛnsodeɛ-kuo" >
  3. <label class = "ahyɛnsodeɛ-ahyɛnsodeɛ" ma = "inputEmail" > Email </label>
  4. <div adesuakuw = "ahyɛnsode" >
  5. <nhyɛaseɛ type = "nkyerɛwee" id = "nhyɛaseɛEmail" beaeɛ = "Email" >
  6. </div> no
  7. </div> no
  8. <div class = "ahyɛnsodeɛ-kuo" >
  9. <label class = "control-label" ma = "asɛmfua a wɔde hyɛ mu" > Asɛmfua </label>
  10. <div adesuakuw = "ahyɛnsode" >
  11. <nhyɛaseɛ type = "asɛmfua" id = "nhyɛaseɛAsɛmfua" beaeɛ = "Asɛmfua" >
  12. </div> no
  13. </div> no
  14. <div class = "ahyɛnsodeɛ-kuo" >
  15. <div adesuakuw = "ahyɛnsode" >
  16. <label adesuakuw = "nhyɛnsode adaka" >
  17. <input type = "checkbox" > Kae me
  18. </label> a wɔde kyerɛw nsɛm
  19. <button type = "submit" class = "btn" > Fa wo ho hyɛ mu </button>
  20. </div> no
  21. </div> no
  22. </form>

Wɔboa kratasin sohwɛ ahorow

Nhwɛsoɔ a ɛfa standard form controls a wɔboa wɔ nhwɛsoɔ form layout mu.

Nsɛm a wɔde hyɛ 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 typebere nyinaa.

  1. <input type="text" placeholder="Nkyerɛwee a wɔde hyɛ mu"> type = "nkyerɛwee" beae = "Nkyerɛwee a wɔde hyɛ mu" >

Textarea a wɔde kyerɛw nsɛm

Form control a ɛboa nkyerɛwee ahorow pii. Sesa rowssu no sɛnea ɛho hia.

  1. <nkyerɛweebea rows="3"></nkyerɛweebea> rows = "3" ></nkyerɛwee beae>

Nnaka a wɔde hyɛ mu ne radio ahorow

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.

Default (a wɔaboaboa ano) .


  1. <label class="nhyɛaseɛ adaka"> class = "nhyɛaseɛ adaka" >
  2. <input type = "nhyɛaseɛ adaka" botae = "" >
  3. Ɔkwan a edi kan ne eyi ne ɛno —hwɛ hu sɛ wode nea enti a ɛyɛ kɛse no bɛka ho
  4. </label> a wɔde kyerɛw nsɛm
  5. <label adesuakuw = "radio" >
  6. <input type = "radio" din = "optionsRadios" id = "optionsRadios1" botae = "option1" a wɔahyɛ >
  7. Ɔkwan a edi kan ne eyi ne ɛno —hwɛ hu sɛ wode nea enti a ɛyɛ kɛse no bɛka ho
  8. </label> a wɔde kyerɛw nsɛm
  9. <label adesuakuw = "radio" >
  10. <input type = "radio" din = "optionsRadios" id = "optionsRadios2" botae = "ɔpaw2" >
  11. Option two betumi ayɛ biribi foforo na sɛ wopaw no a, ɛbɛyi option one no afi hɔ
  12. </label> a wɔde kyerɛw nsɛm

Nneɛma a wɔde hyɛ mu

Fa .inlineadesuakuw no ka checkboxes anaa radio ahorow a ɛtoatoa so ho ma controls no pue wɔ line koro no ara so.

  1. <label class="nhyɛaseɛ adaka no mu"> class = "nhyɛaseɛ adaka inline" >
  2. <input type = "nhyɛaseɛ adaka" id = "inlineCheckbox1" botae = "ɔpaw1" > 1
  3. </label> a wɔde kyerɛw nsɛm
  4. <label class = "nhyɛnsodeɛ adaka no mu" >
  5. <input type = "nhyɛaseɛ adaka" id = "inlineCheckbox2" botae = "ɔpaw2" > 2
  6. </label> a wɔde kyerɛw nsɛm
  7. <label class = "nhyɛnsodeɛ adaka no mu" >
  8. <input type = "nhyɛaseɛ adaka" id = "inlineCheckbox3" botae = "ɔpaw3" > 3
  9. </label> a wɔde kyerɛw nsɛm

Ɔpaw

Fa default option no di dwuma anaa kyerɛ a multiple="multiple"na kyerɛ option ahorow pii prɛko pɛ.


  1. <paw>
  2. <apaw> 1 </apaw>
  3. <apaw> 2 </apaw>
  4. <apaw> 3 </apaw>
  5. <apaw> 4 </apaw>
  6. <apaw> 5 ​​</apaw>
  7. </paw>
  8. <paw dodow = "dodow" >
  9. <apaw> 1 </apaw>
  10. <apaw> 2 </apaw>
  11. <apaw> 3 </apaw>
  12. <apaw> 4 </apaw>
  13. <apaw> 5 ​​</apaw>
  14. </paw>

Ntrɛwmu a wɔde di dwuma wɔ kratasin so

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.

Nsɛm a wɔde ahyɛ mu ne nea wɔde aka 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ɛ selectwɔmfa element ahorow nhyɛ ha.

Default ahorow a wobetumi apaw

Fa adesuakuw abien no mu biako kyekyere an .add-onne an inputho de prepend anaa fa nsɛm ka input bi ho.

@

.00 na ɛwɔ hɔ
  1. <div class="nhyɛase-prepend"> class = "nhyɛase-prepend" >
  2. <span adesuakuw = "a wɔde ka ho" > @ </span>
  3. <input class = "span2" id = "prependedInput" type = "nkyerɛwee" beae = "Ɔdefo din" >
  4. </div> no
  5. <div class = "nhyɛase-a wɔde ka ho" >
  6. <input class = "span2" id = "a wɔde ahyɛ muInput" type = "nkyerɛwee" >
  7. <span adesuakuw = "a wɔde ka ho" > .00 </span>
  8. </div> no

Wɔaka abom

Fa adesua abien no nyinaa ne nhwɛso abien a ɛwɔ mu no .add-ondi dwuma de prepend na fa input bi ka ho.

$ .00 na ɛwɔ hɔ
  1. <div class="input-prepend nsɛm a wɔde hyɛ mu-ka ho"> class = "nhyɛase-prepend nhyɛase-fa" >
  2. <span adesuakuw = "a wɔde ka ho" > $ </span>
  3. <input class = "span2" id = "a wɔde ahyɛ muPrependedInput" type = "nkyerɛwee" >
  4. <span adesuakuw = "a wɔde ka ho" > .00 </span>
  5. </div> no

Buttons mmom sen sɛ wobɛkyerɛw nsɛm

Sɛ́ anka <span>wode nsɛm bɛka ho no, fa a .btnfa bɔtn (anaa abien) bata nsɛm a wode bɛhyɛ mu ho.

  1. <div class="nhyɛase-fa-ka ho"> class = "nhyɛase-a wɔde ka ho" >
  2. <input class = "span2" id = "a wɔde ahyɛ muInputButton" type = "nkyerɛwee" >
  3. <button class = "btn" type = "bɔn " > Kɔ! </button> no ho
  4. </div> no
  1. <div class="nhyɛase-fa-ka ho"> class = "nhyɛase-a wɔde ka ho" >
  2. <input class = "span2" id = "a wɔde ahyɛ muInputButtons" type = "nkyerɛwee" >
  3. <button class = "btn" type = "button" > Hwehwɛ </bɔtn>
  4. <button class = "btn" type = "button" > Nneɛma a wobetumi apaw </button>
  5. </div> no

Button a ɛwɔ ase hɔ

  1. <div class="nhyɛase-fa-ka ho"> class = "nhyɛase-a wɔde ka ho" >
  2. <input class = "span2" id = "a wɔde aka hoDropdownButton" type = "nkyerɛwee" >
  3. <div adesuakuw = "btn-kuw" >
  4. <button class = "btn a ɛkɔ fam-toggle" data-toggle = "a ɛba fam" >
  5. Anamɔntuo
  6. <span adesuakuw = "caret" ></span>
  7. </button> no ho
  8. <ul class = "nsɛm a ɛwɔ ase hɔ" >
  9. ...
  10. </ul>
  11. </div> no
  12. </div> no
  1. <div class="nhyɛase-prepend"> class = "nhyɛase-prepend" >
  2. <div adesuakuw = "btn-kuw" >
  3. <button class = "btn a ɛkɔ fam-toggle" data-toggle = "a ɛba fam" >
  4. Anamɔntuo
  5. <span adesuakuw = "caret" ></span>
  6. </button> no ho
  7. <ul class = "nsɛm a ɛwɔ ase hɔ" >
  8. ...
  9. </ul>
  10. </div> no
  11. <input class = "span2" id = "prependedDropdownButton" type = "nkyerɛwee" >
  12. </div> no
  1. <div class="input-prepend nsɛm a wɔde hyɛ mu-ka ho"> class = "nhyɛase-prepend nhyɛase-fa" >
  2. <div adesuakuw = "btn-kuw" >
  3. <button class = "btn a ɛkɔ fam-toggle" data-toggle = "a ɛba fam" >
  4. Anamɔntuo
  5. <span adesuakuw = "caret" ></span>
  6. </button> no ho
  7. <ul class = "nsɛm a ɛwɔ ase hɔ" >
  8. ...
  9. </ul>
  10. </div> no
  11. <input class = "span2" id = "a wɔde aka hoPrependedDropdownButton" type = "nkyerɛwee" >
  12. <div adesuakuw = "btn-kuw" >
  13. <button class = "btn a ɛkɔ fam-toggle" data-toggle = "a ɛba fam" >
  14. Anamɔntuo
  15. <span adesuakuw = "caret" ></span>
  16. </button> no ho
  17. <ul class = "nsɛm a ɛwɔ ase hɔ" >
  18. ...
  19. </ul>
  20. </div> no
  21. </div> no

Akuw a wɔde nneɛma gu fam a wɔakyekyɛ mu

  1. <fom>
  2. <div adesuakuw = "nhyɛase-prepend" >
  3. <div adesuakuw = "btn-kuw" > ... </div>
  4. <input type = "nkyerɛwee" >
  5. </div> no
  6. <div class = "nhyɛase-a wɔde ka ho" >
  7. <input type = "nkyerɛwee" >
  8. <div adesuakuw = "btn-kuw" > ... </div>
  9. </div> no
  10. </form>

Hwehwɛ kratasin no

  1. <form class="kwan-hwehwɛ"> class = "kwan-hwehwɛ" >
  2. <div class = "nhyɛase-a wɔde ka ho" >
  3. <input type = "nkyerɛwee" adesuakuw = "span2 hwehwɛ-asɛmmisa" >
  4. <button type = "submit" class = "btn" > Hwehwɛ </bɔtn>
  5. </div> no
  6. <div adesuakuw = "nhyɛase-prepend" >
  7. <button type = "submit" class = "btn" > Hwehwɛ </bɔtn>
  8. <input type = "nkyerɛwee" adesuakuw = "span2 hwehwɛ-asɛmmisa" >
  9. </div> no
  10. </form>

Di sizing so

Fa relative sizing classes te sɛ .input-largeanaa ɛne wo inputs no hyia grid column sizes a wode .span*classes di dwuma no hyia.

Block level nsɛm a wɔde hyɛ mu

Ma biribiara <input>anaa <textarea>element biara nyɛ n’ade te sɛ block level element.

  1. <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" >

Sizing a ɛfa ho

  1. <input class="input-mini" type="nsɛm" beaeɛ=".nhyɛaseɛ-mini"> class = "nhyɛase-mini" type = "nkyerɛwee" beae = ".nhyɛase-mini" >
  2. <input class = "input-ketewa" type = "nkyerɛwee" beae = ".input-ketewa" >
  3. <input class = "input-medium" type = "nkyerɛwee" beae a wɔde hyɛ = ".input-medium" >
  4. <input class = "input-kɛse" type = "nkyerɛwee" beae = ".input-kɛse" >
  5. <input class = "input-xlarge" type = "nkyerɛwee" beae a wɔde hyɛ = ".input-xlarge" >
  6. <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.

Grid no kɛseyɛ

Fa .span1to di dwuma .span12ma nsɛm a wɔde hyɛ mu a ɛne grid columns no akɛse koro no ara hyia.

  1. <input class="span1" type="nsɛm" beaeɛ=".span1"> class = "span1" type = "nkyerɛwee" beae = ".span1" >
  2. <input class = "span2" type = "nkyerɛwee" beae = ".span2" >
  3. <input class = "span3" type = "nkyerɛwee" beae = ".span3" >
  4. <paw adesuakuw = "span1" >
  5. ...
  6. </paw>
  7. <paw adesuakuw = "span2" >
  8. ...
  9. </paw>
  10. <paw adesuakuw = "span3" >
  11. ...
  12. </paw>

Sɛ wopɛ grid inputs pii wɔ line biara mu a, fa .controls-rowmodifier 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.

  1. <div class="ahyɛnsodeɛ"> class = "ahyɛnsodeɛ" >
  2. <input class = "span5" type = "nkyerɛwee" beae = ".span5" >
  3. </div> no
  4. <div class = "ahyɛnsodeɛ-row" >
  5. <input class = "span4" type = "nkyerɛwee" beae = ".span4" >
  6. <input class = "span1" type = "nkyerɛwee" beae = ".span1" >
  7. </div> no
  8. ...

Nsɛm a wɔde hyɛ mu a wontumi nsiesie

Fa data kyer�� wɔ ɔkwan a ɛnyɛ nea wotumi sesa so a wɔmfa fom agyiraehyɛde ankasa nni dwuma.

Ebinom som bo wɔ ha
  1. <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>

Form nneyɛe ahorow

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.

  1. <div class="ɔkwan-nneɛma"> class = "ɔkwan-nneɛma" >
  2. <button type = "submit" class = "btn btn-primary" > Fa nsakraeɛ sie </button>
  3. <button type = "button" adesuakuw = "btn" > Twa mu </button>
  4. </div> no

Mmoa nsɛm

Inline ne block level mmoa ma mmoa nsɛm a epue wɔ fom controls ho.

Mmoa a ɛwɔ intanɛt so

Inline mmoa nsɛm
  1. <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>

Siw mmoa ano

Mmoa nkyerɛwee a ɛware a ɛpaapae kɔ nkyerɛwde foforo so na ebetumi atrɛw akɔ akyiri asen nkyerɛwde biako.
  1. <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

Form control tebea horow

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.

Fa w’adwene si so

Yɛyi default outlinestyles a ɛwɔ form controls binom so no na yɛde a box-shadowsi n’ananmu ma :focus.

  1. <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..." >

Nsɛm a wɔde hyɛ mu a enni mu

Style inputs via default browser dwumadie a ɛwɔ :invalid. Kyerɛ a type, fa requiredsu 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.

  1. <input class="span3" type="email" a ɛho hia> class = "span3" type = "email" a ɛho hia >

Nsɛm a wɔde hyɛ mu a wɔadi dɛm

Fa disabledattribute no ka ho wɔ input bi so na asiw ɔdefo no input ano na woakanyan hwɛ soronko kakra.

  1. <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 >

Validation ka sɛ

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.

Ebia na biribi anyɛ yiye
Yɛsrɛ sɛ siesie mfomso no
Wɔde din a wɔde di dwuma
Woohoo!
  1. <div class="ahyɛnsodeɛ-kuo kɔkɔbɔ"> class = "ahyɛnsodeɛ-kuo kɔkɔbɔ" >
  2. <label class = "control-label" for = "inputWarning" > Nsɛm a wɔde hyɛ mu a kɔkɔbɔ wom </label>
  3. <div adesuakuw = "ahyɛnsode" >
  4. <nhyɛaseɛ type = "nkyerɛwee" id = "nhyɛaseɛKɔkɔbɔ" >
  5. <span class = "help-inline" > Ebia biribi anyɛ yiye </span>
  6. </div> no
  7. </div> no
  8. <div class = "ahyɛnsodeɛ-kuo mfomsoɔ" >
  9. <label class = "control-label" for = "inputError" > Nsɛm a wɔde hyɛ mu a mfomso wom </label>
  10. <div adesuakuw = "ahyɛnsode" >
  11. <nsɛm a wɔde hyɛ mu no su = "nkyerɛwee" id = "nsɛm a wɔde hyɛ mu Mfomso" >
  12. <span class = "help-inline" > Yɛsrɛ wo siesie mfomso no </span>
  13. </div> no
  14. </div> no
  15. <div class = "ahyɛnsodeɛ-kuo ho nsɛm" >
  16. <label class = "control-label" for = "nsɛm a wɔde hyɛ mu" > Nsɛm a wɔde hyɛ mu </label>
  17. <div adesuakuw = "ahyɛnsode" >
  18. <nsɛm a wɔde hyɛ mu no su = "nkyerɛwee" id = "nsɛm a wɔde hyɛ mu" >
  19. <span class = "help-inline" > Wɔafa dwumadie din dedaw </span>
  20. </div> no
  21. </div> no
  22. <div class = "ahyɛnsodeɛ-kuo nkonimdie" >
  23. <label class = "control-label" for = "inputSuccess" > Nsɛm a wɔde hyɛ mu a ɛyɛ nkonimdi </label>
  24. <div adesuakuw = "ahyɛnsode" >
  25. <nhyɛaseɛ type = "nkyerɛwee" id = "nhyɛaseɛNkonimdie" >
  26. <span adesuakuw = "mmoa-inline" > Woohoo! </span> no
  27. </div> no
  28. </div> no

Nneɛma a wɔde ahyɛ mu

Wobetumi de button styles adi dwuma wɔ biribiara ho a wɔde .btnadesuakuw no adi dwuma. Nanso, mpɛn pii no wobɛpɛ sɛ wode eyinom di dwuma wɔ nkutoo <a>ne <button>elements ma nkyerɛase a eye sen biara.

Bɔtom adesuakuw="" Nkyerɛmu
btn Standard grey button a ɛwɔ gradient
btn btn-primary Ɛma aniwa mu duru a ɛboro so na ɛkyerɛ adeyɛ titiriw a ɛwɔ bɔtn ahorow bi mu
btn btn-info Wɔde di dwuma sɛ ɔkwan foforo a wɔfa so si default styles no ananmu
btn btn-success Ɛkyerɛ adeyɛ a edi mu anaasɛ ɛyɛ papa
btn btn-warning Ɛkyerɛ sɛ ɛsɛ sɛ wɔyɛ ahwɛyiye wɔ adeyɛ yi ho
btn btn-danger Ɛkyerɛ adeyɛ a asiane wom anaasɛ ebetumi ayɛ bɔne
btn btn-inverse Fa bɔton a ɛyɛ tuntum a ɛyɛ fitaa no sesa, ɛnyɛ nea wɔde kyekyere nkyerɛase adeyɛ anaa dwumadie bi ho
btn btn-link Si bɔtn bi so dua kɛse denam ma a wobɛma ayɛ sɛ link bere a wokura bɔtn suban mu no so

Cross browser a ɛne ne ho hyia

IE9 ntwitwa akyi gradients wɔ ntwea a ɛyɛ kurukuruwa so, enti yeyi fi hɔ. Nea ɛfa ho no, IE9 jankifies buttonelements a wɔadi dɛm, rendering text gray ne nasty text-shadow a yentumi nsiesie.

Button akɛse a ɛwɔ hɔ

Fancy akɛse anaa nketewa buttons? Fa .btn-large, .btn-small, anaa .btn-minika ho sɛ wopɛ sɛ wunya akɛse afoforo a.

  1. <p> na ɛwɔ hɔ
  2. <button class = "btn btn-kɛseɛ btn-primary" type = "bɔtn" > Bɔtɔn kɛseɛ </button>
  3. <button class = "btn btn-kɛse" type = "bɔtn" > Bɔtɔn kɛse </bɔtn>
  4. </p> no
  5. <p> na ɛwɔ hɔ
  6. <button class = "btn btn-primary" type = "bɔtn" > Nsɛm a wɔahyehyɛ </ button >
  7. <button class = "btn" type = "button" > Nsɛm a wɔahyehyɛ </button>
  8. </p> no
  9. <p> na ɛwɔ hɔ
  10. <button class = "btn btn-ketewa btn-primary" type = "bɔtn" > Bɔtɔn ketewa </button>
  11. <button class = "btn btn-ketewa" type = "button" > Bɔton ketewa </button>
  12. </p> no
  13. <p> na ɛwɔ hɔ
  14. <bɔtn adesuakuw = "btn btn-mini btn-primary" type = "bɔtɔn" > Mini bɔtn </bɔtn>
  15. <bɔtn adesua = "btn btn-mini" type = "bɔtn" > Mini bɔtn </bɔtn>
  16. </p> no

Yɛ block level buttons—nea ɛtrɛw ɔwofo bi ntrɛwmu nyinaa mu—denam .btn-block.

  1. <button class="btn btn-kɛseɛ btn-asiw btn-primary" type="button">Bɔtn level bɔtn</button> class = "btn btn-kɛseɛ btn-block btn-primary" type = "bɔtn" > Block level bɔtn </button>
  2. <button class = "btn btn-kɛseɛ btn-block" type = "button" > Block level bɔtn </button>

Tebea a wɔadi dɛm

Ma buttons no nyɛ sɛ nea wontumi nkliki denam fading a wode bɛsan akyi 50% no so.

Ankora element a ɛwɔ hɔ

Fa .disabledadesuakuw no ka <a>bɔtn ahorow ho.

Nkitahodi titiriw Link

  1. <a href="#" class="btn btn-kɛseɛ btn-mfitiaseɛ a wɔagyae">Mfitiaseɛ link</a> href = "#" class = "btn btn-kɛseɛ btn-mfitiaseɛ no ayɛ adwuma" > Mfitiaseɛ link </a>
  2. <a href = "#" class = "btn btn-kɛse no ayɛ adwuma" > Link </a>

Ti a ɛwɔ soro!Yɛde di dwuma .disabledsɛ utility class wɔ ha, a ɛte sɛ common .activeclass no, enti prefix biara ho nhia. Afei nso, adesuakuw yi yɛ afɛfɛde nkutoo de; ɛsɛ sɛ wode JavaScript a wɔahyɛ da ayɛ no di dwuma na ama link ahorow a ɛwɔ ha no ayɛ adwuma.

Bɔton no mu ade

Fa disabledsu no ka <button>bɔtn ahorow ho.

  1. <button type="button" class="btn btn-kɛse btn-mfitiaseɛ no ayɛ adwuma" disabled="disabled">Mfitiaseɛ bɔtn</button> type = "button" class = "btn btn-kɛse btn-mfitiaseɛ no ayɛ adwuma" disabled = "disabled" > Primary button </button>
  2. <button type = "button" class = "btn btn-kɛse" a wɔagyae > Bɔton </bɔtn>

Adesuakuw biako, tag ahorow pii

Fa .btnadesua no di dwuma wɔ <a>, <button>, anaa <input>element bi so.

Link
  1. <a class="btn" href="">Nkitahodi</a> class = "btn" href = "" > Nkitahodi </a>
  2. <button class = "btn" type = "fa kɔ" > Bɔton </bɔtn>
  3. <input class = "btn" type = "button" botae = "Nsɛm a wɔde hyɛ mu" >
  4. <input class = "btn" type = "fa kɔ" botae = "Fa kɔ" >

Sɛ́ adeyɛ a eye sen biara no, bɔ mmɔden sɛ wobɛma element no ahyia ama wo nsɛm a ɛfa ho no na ama woahwɛ ahu sɛ cross-browser nkyerɛase no bɛyɛ pɛ. Sɛ wowɔ input, fa bi di dwuma <input type="submit">ma wo bɔtn no.

Fa adesua ahorow ka <img>element bi ho na ama ayɛ mmerɛw sɛ wobɛhyehyɛ mfonini ahorow wɔ adwuma biara mu.

140x140 na ɛyɛ 140x140 na ɛyɛ 140x140 na ɛyɛ
  1. <img src="..." adesuakuw="img-a ɛyɛ kurukuruwa"> src = "..." adesuakuw = "img-a wɔabɔ no kurukuruwa" >
  2. <img src = "..." adesuakuw = "img-kuruwa" >
  3. <img src = "..." adesuakuw = "img-polaroid" >

Ti a ɛwɔ soro! .img-roundedna .img-circleɛnyɛ adwuma wɔ IE7-8 mu esiane border-radiusmmoa a wonnya nti.

Ahyɛnsode ahorow a wɔde kyerɛw nsɛm

140 ahyɛnsodeɛ wɔ sprite kwan so, ɛwɔ hɔ wɔ tuntum grey (default) ne fitaa, Glyphicons na ɛde ama .

  • ahyɛnsode-ahwehwɛ
  • icon-nnwom
  • ahyɛnsode-hwehwɛ
  • icon-envelope a wɔde kyerɛw nsɛm
  • ahyɛnsode-koma
  • ahyɛnsode-nsoromma
  • ahyɛnsode-nsoromma-a hwee nni mu
  • ahyɛnsode-ɔdefo
  • ahyɛnsode-sini
  • icon-th-kɛse a ɛto so abien
  • ahyɛnsode-th
  • ahyɛnsode-th-list
  • ahyɛnsode-ok
  • ahyɛnsode-yi fi hɔ
  • ahyɛnsode-a-yɛ-soom-in
  • icon-zoom-a ɛyɛ kɛse
  • ahyɛnsode-off
  • ahyɛnsode-nsɛnkyerɛnne
  • ahyɛnsode-cog
  • ahyɛnsode-nwura
  • ahyɛnsode-fie
  • ahyɛnsode-fael
  • ahyɛnsode-bere
  • ahyɛnsode-kwan
  • ahyɛnsode-twe-alt
  • ahyɛnsode-twe
  • ahyɛnsode-upload
  • ahyɛnsode-inbox
  • ahyɛnsode-agoru-kyinhyia
  • ahyɛnsode-a wɔasan ayɛ
  • ahyɛnsode-a ɛyɛ foforo
  • ahyɛnsode-kyerɛw-alt
  • ahyɛnsode-a wɔde hyɛ mu
  • ahyɛnsode-frankaa
  • ahyɛnsode-asɛm a wɔde bɔ asom
  • icon-volume-a wɔadum
  • icon-volume-a ɛkɔ fam
  • icon-volume-a ɛwɔ soro
  • ahyɛnsodeɛ-qrcode
  • ahyɛnsode-barcode a wɔde di dwuma
  • ahyɛnsode-tag
  • ahyɛnsode-tag ahorow
  • ahyɛnsode-nhoma
  • ahyɛnsode-nkyerɛwee
  • ahyɛnsode-tintim
  • ahyɛnsode-kamera
  • ahyɛnsode-font
  • ahyɛnsode-a ɛyɛ den
  • ahyɛnsode-nkyerɛwee
  • ahyɛnsode-nsɛm-a-korɔn
  • ahyɛnsode-nsɛm-trɛw
  • ahyɛnsode-align-benkum so
  • icon-align-mfinimfini
  • icon-align-nifa so
  • icon-align-bu no bem
  • ahyɛnsode-nkyerɛwee
  • ahyɛnsode-indent-benkum so
  • ahyɛnsode-indent-nifa so
  • ahyɛnsode-animbere-video
  • ahyɛnsode-mfonini
  • ahyɛnsode-pɛnsere
  • icon-map-agyiraehyɛde
  • ahyɛnsode-ayɛ nsakrae
  • ahyɛnsode-tint
  • ahyɛnsode-sesa
  • ahyɛnsode-kyɛ
  • ahyɛnsode-hwɛ
  • ahyɛnsode-a wɔde tu kwan
  • icon-anammɔn-akyi
  • ahyɛnsode-ntɛmntɛm-akyi
  • ahyɛnsode-akyi
  • icon-play a wɔde di agoru
  • ahyɛnsode-gyinabea
  • ahyɛnsode-gyinabea
  • ahyɛnsode-anim
  • icon-fast-forward a wɔde kɔ anim
  • icon-anammɔn-a ɛkɔ anim
  • ahyɛnsode-eject
  • ahyɛnsode-chevron-benkum so
  • ahyɛnsode-chevron-nifa so
  • ahyɛnsode-plus-sɛnkyerɛnne
  • ahyɛnsode-minus-sɛnkyerɛnne
  • ahyɛnsode-yi-nsɛnkyerɛnne
  • ahyɛnsode-ok-sɛnkyerɛnne
  • ahyɛnsode-asɛmmisa-sɛnkyerɛnne
  • ahyɛnsode-nsɛm-sɛnkyerɛnne
  • ahyɛnsode-a ɛwɔ screenshot so
  • ahyɛnsode-yi-kyinhyia
  • ahyɛnsode-ok-kyinhyia
  • ahyɛnsode-ban-kyinhyia
  • ahyɛnsode-agyan-benkum so
  • ahyɛnsode-agyan-nifa so
  • ahyɛnsode-agyan-a-kɔ soro
  • ahyɛnsode-agyan-a ɛkɔ fam
  • ahyɛnsode-kyɛ-alt
  • icon-resize-a ɛyɛ fɛ
  • ahyɛnsode-sesa-ketewa
  • ahyɛnsode-plus
  • ahyɛnsode-a wɔayi afi mu
  • ahyɛnsode-nsoromma
  • icon-exclamation-ahyɛnsode
  • ahyɛnsode-akyɛde
  • ahyɛnsode-ahaban
  • ahyɛnsode-ogya
  • icon-ani-abue
  • icon-ani-a wɔde hyɛ mu
  • ahyɛnsode-kɔkɔbɔ-sɛnkyerɛnne
  • ahyɛnsode-wimhyɛn
  • ahyɛnsode-kalenda so
  • ahyɛnsode-a ɛyɛ random
  • icon-nsɛm a wɔka kyerɛ
  • ahyɛnsode-magnet
  • ahyɛnsode-chevron-a ɛwɔ soro
  • ahyɛnsode-chevron-a ɛwɔ fam
  • ahyɛnsode-retweet
  • icon-adetɔ-teaseɛnam
  • ahyɛnsode-folda-a wɔato mu
  • ahyɛnsode-folda-abue
  • icon-resize-gyina hɔ pintinn
  • ahyɛnsode-sesa-kɛse-a ɛkɔ soro
  • ahyɛnsode-hdd
  • ahyɛnsode-nantwinini abɛn
  • ahyɛnsode-dɔn
  • icon-adansedi krataa
  • ahyɛnsode-nsateaa-a-kɔ soro
  • icon-nsateaa-a ɛwɔ fam
  • icon-nsa-nifa so
  • icon-nsa-benkum so
  • ahyɛnsode-nsa-a-kɔ soro
  • ahyɛnsode-nsa-ase-ase
  • ahyɛnsode-kuruwa-agyan-nifa
  • ahyɛnsode-kuruwa-agyan-benkum so
  • ahyɛnsode-kuruwa-agyan-a-kɔ soro
  • ahyɛnsode-kuruwa-agyan-a ɛkɔ fam
  • ahyɛnsode-wiase nyinaa
  • ahyɛnsode-safoa
  • ahyɛnsode-nnwuma
  • ahyɛnsode-filter
  • icon-briefcase a wɔde kyerɛw nneɛma
  • ahyɛnsode-a ɛwɔ screen no so

Glyphicons a ɛkyerɛ sɛ obi yɛ adwuma

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.


Sɛnea wɔde bedi dwuma

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:

  1. <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.

  1. <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.


Ahyɛnsode ahorow a wɔde yɛ nhwɛso

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.

Nsɛmma nhoma no

Button kuw a ɛwɔ button adwinnade pon bi mu
  1. <div adesuakuw = "btn-adwinnade" >
  2. <div adesuakuw = "btn-kuw" >
  3. <a adesuakuw = "btn" href = "#" ><i adesuakuw = "ahyɛnsode-hyehyɛ-benkum" ></i></a>
  4. <a adesuakuw = "btn" href = "#" ><i adesuakuw = "ahyɛnsode-ahyɛnsode-mfinimfini" ></i></a>
  5. <a adesuakuw = "btn" href = "#" ><i adesuakuw = "ahyɛnsode-hyehyɛ-nifa" ></i></a>
  6. <a adesuakuw = "btn" href = "#" ><i adesuakuw = "ahyɛnsode-hyehyɛ-fata" ></i></a>
  7. </div> no
  8. </div> no
Dropdown wɔ button kuw bi mu
  1. <div adesuakuw = "btn-kuw" >
  2. <a class = "btn btn-primary" href = "#" ><i class = "ahyɛnsode-ɔdefo ahyɛnsode-fitaa" ></i> Ɔdefo </a>
  3. <a adesuakuw = "btn btn-mfitiaseɛ a ɛwɔ ase-toggle" data-toggle = "afiri a ɛba fam" href = "#" ><span adesuakuw = "caret" ></span></a>
  4. <ul class = "nsɛm a ɛwɔ ase hɔ" >
  5. <li><a href = "#" ><i adesuakuw = "ahyɛnsode-pɛnsere" ></i> Sesa </a></li>
  6. <li><a href = "#" ><i adesuakuw = "ahyɛnsode-nwura" ></i> Popa </a></li>
  7. <li><a href = "#" ><i adesuakuw = "ahyɛnsode-ban-kyinhyia" ></i> Bara </a></li>
  8. <li adesuakuw = "nkyekyɛmu" ></li>
  9. <li><a href = "#" ><i class = "me" ></i> Yɛ admin </a></li>
  10. </ul>
  11. </div> no
Button akɛse a ɛwɔ hɔ
  1. <a adesuakuw = "btn btn-kɛse" href = "#" ><i adesuakuw = "ahyɛnsode-nsoromma" ></i> Nsoromma </a>
  2. <a adesuakuw = "btn btn-ketewa" href = "#" ><i adesuakuw = "ahyɛnsode-nsoromma" ></i> Nsoromma </a>
  3. <a adesuakuw = "btn btn-mini" href = "#" ><i adesuakuw = "ahyɛnsode-nsoromma" ></i> Nsoromma </a>

Nsɛm a Wɔka Kyerɛ

  1. <ul adesuakuw = "nav nav-nkyerɛwee" >
  2. <li class = "active" ><a href = "#" ><i class = "ahyɛnsodeɛ-fie ahyɛnsodeɛ-fitaa" </i> Fie </a></li>
  3. <li><a href = "#" ><i adesuakuw = "ahyɛnsode-nhoma" ></i> Nhomakorabea </a></li>
  4. <li><a href = "#" ><i adesuakuw = "ahyɛnsode-pencil" ></i> Nnwuma </a></li>
  5. <li><a href = "#" ><i adesuakuw = "me" ></i> Nneɛma ahorow </a> </li>
  6. </ul>

Fom afuw ahorow

  1. <div class = "ahyɛnsodeɛ-kuo" >
  2. <label adesuakuw = "control-label" ma = "inputIcon" > Email address </label>
  3. <div adesuakuw = "ahyɛnsode" >
  4. <div adesuakuw = "nhyɛase-prepend" >
  5. <span adesuakuw = "add-on" ><i adesuakuw = "ahyɛnsode-envelope" ></i></span>
  6. <nhyɛase adesuakuw = "span2" id = "nhyɛaseIcon" type = "nkyerɛwee" >
  7. </div> no
  8. </div> no
  9. </div> no