Mahimman abubuwan HTML da aka tsara kuma an inganta su tare da azuzuwan da za a iya ƙarawa.
Duk taken HTML, <h1>
ta hanyar <h6>
akwai su.
Tsohuwar Bootstrap ta duniya font-size
shine 14px , tare da line-height
na 20px . Ana amfani da wannan a cikin <body>
da kuma duk sakin layi. Bugu da kari, <p>
(sakin layi) suna karɓar gefen ƙasa na rabin tsayin layinsu (10px ta tsohuwa).
Nullam quis risus eget urna mollis ornare vel eu leo. Duk da haka, muna magana ne game da abin ban mamaki da kuma ban mamaki. Nullam id dolor id nibh ultricies vehicula.
Duk da haka, muna magana ne game da abin ban mamaki da kuma ban mamaki. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.
Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id un mi porta gravida a eget metus. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.
<p> ... </p>
Sanya sakin layi ya fice ta ƙara .lead
.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est ba commodo luctus.
<p class = "lead" > ... </p>
Ma'aunin rubutu ya dogara ne akan ma'auni guda biyu KARANCIN a cikin masu canji . kasa : @baseFontSize
da @baseLineHeight
. Na farko shine girman font-girman da aka yi amfani da shi duka kuma na biyu shine tsayin layin tushe. Muna amfani da waɗancan sauye-sauyen da wasu sassauƙan lissafi don ƙirƙira margins, paddings, da tsayin layi na kowane nau'in mu da ƙari. Keɓance su kuma Bootstrap ya daidaita.
Yi amfani da tsoffin alamun girmamawa na HTML tare da salo marasa nauyi.
<small>
Don rage jaddada layin layi ko tubalan rubutu, yi amfani da ƙaramin alamar.
Wannan layin rubutun ana nufin a kula dashi azaman bugu mai kyau.
<p> <ƙaramin> Wannan layin rubutun ana nufin a ɗauke shi azaman bugu mai kyau. </small> </p>
Don jaddada guntun rubutu tare da nauyin rubutu mai nauyi.
Ana fassara gunkin rubutu mai zuwa azaman rubutu mai ƙarfi .
An fassara shi azaman rubutu mai ƙarfi < /strong>
Don jaddada guntun rubutu tare da rubutun.
Ana fassara gunkin rubutu mai zuwa azaman rubutun rubutun .
An fassara <em> azaman rubutu mai rubutun </em>
A kula!Jin kyauta don amfani <b>
kuma <i>
a cikin HTML5. <b>
ana nufin haskaka kalmomi ko jimloli ba tare da isar da ƙarin mahimmanci ba yayin <i>
da galibin murya ne, kalmomin fasaha, da sauransu.
Sauƙaƙe daidaita rubutu zuwa sassa tare da azuzuwan daidaita rubutu.
Rubutun hagu masu layi.
Rubutun da aka daidaita a tsakiya.
Rubutun daidaitacce.
- <p class = "rubutu-hagu" > Rubutun hagu masu layi. </p>
- <p class = "text-center" > Rubutun da aka daidaita a tsakiya. </p>
- <p class = "rubutu-dama" > Rubutun da aka daidaita daidai. </p>
Isar da ma'ana ta launi tare da ɗimbin girmamawa azuzuwan amfani.
Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh.
Ka yi la'akari da abin da ake kira euismod.
Donec ullamcorper nulla non metus auctor fringilla.
Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis.
Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
- <p class = "muted" > Fusce dapibus, tellus ac cursus commodo, tortor mauris nibh. </p>
- <p class = "gargadin rubutu" > Etiam porta sem malesuada magna mollis euismod. </p>
- <p class = "kuskuren rubutu" > Donec ullamcorper nulla non metus auctor fringilla. </p>
- <p class = "rubutu-info" > Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis. </p>
- <p class = "rubutu-nasara" > Duis mollis, est non commodo luctus, nisi erat porttitor ligula. </p>
Salon aiwatar da abubuwan HTML <abbr>
don gajartawa da gajarta don nuna faɗaɗɗen sigar akan hover. Gajartawa tare da title
sifa suna da iyakar haske mai dige-dige na ƙasa da kuma siginan taimako akan shawagi, yana ba da ƙarin mahallin akan shawagi.
<abbr>
Don faɗaɗa rubutu akan dogon buɗawar gajarta, haɗa da title
sifa.
Gajartawar kalmar sifa ita ce attr .
<abbr title = "siffa" > attr </abbr>
<abbr class="initialism">
Ƙara .initialism
zuwa ga taƙaitaccen girman girman rubutu kaɗan.
HTML shine abu mafi kyau tun yankakken gurasa.
<abbr title = "HyperText Markup Language" class = "initialism" > HTML </abbr>
Gabatar da bayanin tuntuɓar kakanni mafi kusa ko duka aikin.
<address>
Ajiye tsarawa ta ƙare duk layi da <br>
.
- <adireshi>
- <strong> Twitter, Inc. </strong><br>
- 795 Folsom Ave, Suite 600 <br>
- San Francisco, CA 94107
- <abbr title = "Waya" > P: </abbr> (123) 456-7890
- </address>
- <adireshi>
- <strong> Cikakken Suna </strong><br>
- <a href = "mailto:#" > [email protected] </a>
- </address>
Don faɗar tubalan abun ciki daga wani tushe a cikin takaddar ku.
Kunna <blockquote>
kowane HTML a matsayin zance. Don madaidaiciyar magana muna ba da shawarar a <p>
.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ƙididdigar ƙididdiga ta ƙididdigewa.
- <blockquote>
- <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ƙididdigar ƙididdiga ta ƙididdigewa. </p>
- </blockquote>
Salo da abun ciki suna canzawa don sauƙaƙan bambance-bambance akan daidaitaccen blockquote.
Ƙara <small>
alamar don gano tushen. Kunna sunan tushen aikin a cikin <cite>
.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ƙididdigar ƙididdiga ta ƙididdigewa.
Wani sananne a Tushen Tushen
- <blockquote>
- <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ƙididdigar ƙididdiga ta ƙididdigewa. </p>
- <small> Wani sanannen <cite title = "Tsarin Tushen" > Taken Tushen </cite></small>
- </blockquote>
Yi amfani .pull-right
da madaidaicin blockquote mai iyo, daidaitacce.
- <blockquote class = "ja-dama" >
- ...
- </blockquote>
Jerin abubuwan da odar ba ta da mahimmanci a bayyane.
- <ul>
- <li> ... </li>
- </ul>
Jerin abubuwan da odar ke da mahimmanci a bayyane.
- <ol>
- <li> ... </li>
- </ol>
Cire tsoho list-style
da madaidaicin hagu akan abubuwan jeri (yara nan take kawai).
- <ul class = "marasa salo" >
- <li> ... </li>
- </ul>
Sanya duk abubuwan jeri akan layi guda tare inline-block
da wasu fakitin haske.
- <ul class = "inline" >
- <li> ... </li>
- </ul>
Jerin sharuɗɗan tare da kwatancensu masu alaƙa.
- <dl>
- <dt> ... </dt>
- <dd> ... </dd>
- </dl> ba
Yi sharuddan da kwatance a <dl>
layi gefe-gefe.
- <dl class = "dl-horizontal" >
- <dt> ... </dt>
- <dd> ... </dd>
- </dl> ba
A kula!Lissafin bayanin a kwance za su yanke sharuddan da suka yi tsayi da yawa don dacewa da ginshiƙi na hagu text-overflow
. A cikin kunkuntar wuraren kallo, za su canza zuwa tsayayyen shimfidar wuri.
Kunna snippets na layi tare da <code>
.
<section>
ya kamata a nannade shi azaman layi.
- Misali , < code> & lt ; sashe & gt ;</ code > yakamata a nade shi azaman layi .
Yi amfani <pre>
da layukan lamba da yawa. Tabbatar da kubuta daga kowane maƙallan kusurwa a cikin lambar don yin daidai.
<p>Sample rubutu a nan...</p>
- <pre>
- <p>Sample rubutu a nan...</p>
- </pre>
A kula!Tabbatar kiyaye lamba a cikin <pre>
alamun kusa da hagu kamar yadda zai yiwu; zai sanya duk shafuka.
Kuna iya ƙara .pre-scrollable
ajin da zaɓin wanda zai saita max-tsawo na 350px kuma ya ba da madaidaicin madaidaicin y-axis.
Don salo na asali — padding haske da masu rarraba a kwance kawai - ƙara ajin tushe .table
zuwa kowane <table>
.
# | Sunan rana | Sunan mahaifa | Sunan mai amfani |
---|---|---|---|
1 | Alama | Otto | @mdo |
2 | Yakubu | Thornton | @mai |
3 | Larry | Tsuntsu |
- < class class = "tebur" >
- …
- </text>
Ƙara kowane ɗayan waɗannan azuzuwan zuwa .table
ajin tushe.
.table-striped
Yana ƙara zaren zebra zuwa kowane jere na tebur a cikin <tbody>
ta mai :nth-child
zaɓin CSS (babu a cikin IE7-8).
# | Sunan rana | Sunan mahaifa | Sunan mai amfani |
---|---|---|---|
1 | Alama | Otto | @mdo |
2 | Yakubu | Thornton | @mai |
3 | Larry | Tsuntsu |
- < class class = "Table-stripped" >
- …
- </text>
.table-bordered
Ƙara iyakoki da sasanninta masu zagaye zuwa teburin.
# | Sunan rana | Sunan mahaifa | Sunan mai amfani |
---|---|---|---|
1 | Alama | Otto | @mdo |
Alama | Otto | @getbootstrap | |
2 | Yakubu | Thornton | @mai |
3 | Larry the Bird |
- < class class = "tebur mai iyaka" >
- …
- </text>
.table-hover
Kunna yanayin jujjuyawa akan layuka na tebur a cikin <tbody>
.
# | Sunan rana | Sunan mahaifa | Sunan mai amfani |
---|---|---|---|
1 | Alama | Otto | @mdo |
2 | Yakubu | Thornton | @mai |
3 | Larry the Bird |
- < class class = "tebur-hover" >
- …
- </text>
.table-condensed
Yana sanya allunan ƙarami ta hanyar yankan tantanin halitta a rabi.
# | Sunan rana | Sunan mahaifa | Sunan mai amfani |
---|---|---|---|
1 | Alama | Otto | @mdo |
2 | Yakubu | Thornton | @mai |
3 | Larry the Bird |
- < class class = "Table-condensed" >
- …
- </text>
Yi amfani da azuzuwan mahallin don canza launi na layuka.
Class | Bayani |
---|---|
.success |
Yana nuna aiki mai nasara ko tabbatacce. |
.error |
Yana nuna wani aiki mai haɗari ko mai yuwuwa mara kyau. |
.warning |
Yana nuna gargaɗin da zai buƙaci kulawa. |
.info |
Ana amfani dashi azaman madadin sifofin tsoho. |
# | Samfura | Biyan Da Aka Ci | Matsayi |
---|---|---|---|
1 | TB - kowane wata | 01/04/2012 | An amince |
2 | TB - kowane wata | 02/04/2012 | An ƙi |
3 | TB - kowane wata | 03/04/2012 | Ana jiran |
4 | TB - kowane wata | 04/04/2012 | Kira shiga don tabbatarwa |
- ...
- < tr class = "nasara" >
- <td> 1 < /td>
- <td>TB - kowane wata</ td >
- <td> 01 / 04 / 2012 < /td>
- <td>An amince</ td >
- </ tr >
- ...
Jerin abubuwan HTML na tebur masu goyan bayan da yadda yakamata a yi amfani da su.
Tag | Bayani |
---|---|
<table> |
Nade kashi don nuna bayanai a cikin tsari na tabular |
<thead> |
Kayan kwantena don layuka na kan tebur ( <tr> ) don yiwa ginshiƙan tebur lakabi |
<tbody> |
Kayan kwantena don layuka na tebur ( <tr> ) a jikin teburin |
<tr> |
Kayan kwantena don saitin sel na tebur ( <td> ko <th> ) wanda ke bayyana akan layi ɗaya |
<td> |
Tantanin halitta na asali |
<th> |
Tantanin tebur na musamman don ginshiƙi (ko jere, dangane da iyawa da jeri) alamomin |
<caption> |
Bayani ko taƙaita abin da tebur ya ƙunsa, musamman masu amfani ga masu karanta allo |
- <tebur>
- <taken magana> ... </caption>
- <fito>
- <tr>
- <th> ... </th>
- <th> ... </th>
- </tr>
- </fadi>
- <tbody>
- <tr>
- <td> ... </td>
- <td> ... </td>
- </tr>
- </tbody>
- </text>
Sarrafa nau'ikan nau'ikan mutum ɗaya suna karɓar salo, amma ba tare da kowane ajin tushe da ake buƙata akan <form>
ko manyan canje-canje a alamar ba. Sakamako a cikin jigogi, alamun hagu a saman sarrafa nau'i.
- <form>
- <filaye>
- <labarin> labari </legend>
- <label> Lakabin suna </label>
- < nau'in shigarwa = "rubutu" mai sanya wuri = "Buga wani abu..." >
- <span class = "help-block" > Misalin rubutun taimako na matakin toshe anan. </span>
- < class class = "checkbox" >
- < nau'in shigarwa = "akwatin ajiya" > Duba ni
- </labarai>
- <button type = "submit" class = "btn" > Aika < /button>
- </fieldset>
- </form>
Haɗe tare da Bootstrap akwai shimfidu na zaɓi uku na zaɓi don lokuta na yau da kullun.
Ƙara .form-search
zuwa fom da .search-query
zuwa <input>
don ƙarin shigarwar rubutu mai zagaye.
- < class class = "form-search" >
- < nau'in shigarwa = "rubutu" aji = "tambayoyin bincike-matsakaici" >
- <button type = "submit" class = "btn" > Bincika </button>
- </form>
Ƙara .form-inline
don alamun hagu-hagu da sarrafa toshe-layi don ƙaƙƙarfan shimfidar wuri.
- < class class = "form-inline" >
- < nau'in shigarwa = "rubutu" aji = "input-small" mai sanya wuri = "Imel" >
- < nau'in shigarwa = "Password " aji = "shigar-small" mai sanya wuri = "Kalmar shiga" >
- < class class = "checkbox" >
- < nau'in shigarwa = "akwatin ajiya" > Ka tuna da ni
- </labarai>
- <button type = "submit" class = "btn" > Shiga </button>
- </form>
Daidaita lakabin dama kuma ka shawagi su zuwa hagu don sa su bayyana akan layi ɗaya da masu sarrafawa. Yana buƙatar mafi yawan sauye-sauyen alama daga sigar tsoho:
.form-horizontal
zuwa fom.control-group
.control-label
zuwa lakabin.controls
don daidaitawa daidai
- < class class = "form-horizontal" >
- <div class = "control-group" >
- <label class = "control-label" don = "inputEmail" > Imel </label>
- <div class = "controls" >
- < nau'in shigarwa = "rubutu" id = "inputEmail" mai sanya wuri = "Imel" >
- </div>
- </div>
- <div class = "control-group" >
- <label class = "control-label" don = "inputPassword" > Kalmar wucewa </label>
- <div class = "controls" >
- < nau'in shigarwa = "Password " id = "inputPassword" mai riƙewa = " Password" >
- </div>
- </div>
- <div class = "control-group" >
- <div class = "controls" >
- < class class = "checkbox" >
- < nau'in shigarwa = "akwatin ajiya" > Ka tuna da ni
- </labarai>
- <button type = "submit" class = "btn" > Shiga </button>
- </div>
- </div>
- </form>
Misalai na daidaitattun sarrafa nau'i masu goyan baya a cikin shimfidar tsari na misali.
Mafi yawan sarrafa nau'i na gama gari, filayen shigarwa na tushen rubutu. Ya haɗa da goyan baya ga duk nau'ikan HTML5: rubutu, kalmar sirri, kwanan kwanan wata, lokacin kwanan wata-na gida, kwanan wata, wata, lokaci, sati, lamba, imel, url, bincike, tel, da launi.
Yana buƙatar amfani da ƙayyadaddun ƙayyadaddun type
lokaci.
- < nau'in shigarwa = "rubutu" mai sanya wuri = "Shigar da rubutu" >
Ikon tsari wanda ke goyan bayan layukan rubutu da yawa. Canja rows
sifa kamar yadda ya cancanta.
- <textarea layuka = "3" > </textarea>
Akwatunan rajista don zaɓar ɗaya ko zaɓuɓɓuka da yawa a cikin jeri yayin da rediyo ke zaɓar zaɓi ɗaya daga mutane da yawa.
- < class class = "checkbox" >
- < nau'in shigarwa = "checkbox" darajar = "" >
- Zaɓin ɗaya shine wannan da wancan — tabbas kun haɗa da dalilin da yasa yake da kyau
- </labarai>
- < class class = "rediyo" >
- < nau'in shigarwa = "rediyo" suna = "optionsRadios" id = "optionsRadios1" darajar = "zabi1" an duba >
- Zaɓin ɗaya shine wannan da wancan — tabbas kun haɗa da dalilin da yasa yake da kyau
- </labarai>
- < class class = "rediyo" >
- < nau'in shigarwa = "rediyo" suna = "optionsRadios" id = "optionsRadios2" darajar = "zabi2" >
- Zabi na biyu na iya zama wani abu dabam kuma zaɓin shi zai yanke zaɓi na ɗaya
- </labarai>
Ƙara .inline
ajin zuwa jerin akwati ko radiyo don sarrafawa suna bayyana akan layi ɗaya.
- < class class = "labaran akwatin layi" >
- < nau'in shigarwa = "akwatin akwati" id = "inlineCheckbox1" darajar = "zaɓi1" > 1
- </labarai>
- < class class = "labaran akwatin layi" >
- < nau'in shigarwa = "akwatin akwati" id = "inlineCheckbox2" darajar = "zaɓi2" > 2
- </labarai>
- < class class = "labaran akwatin layi" >
- < nau'in shigarwa = "akwatin rajista" id = "inlineCheckbox3" darajar = "zaɓi3" > 3
- </labarai>
Yi amfani da zaɓin tsoho ko saka a multiple="multiple"
don nuna zaɓuɓɓuka da yawa a lokaci ɗaya.
- <zaɓi>
- <zaɓi> 1 </ zaɓi>
- <zaɓi> 2 </ zaɓi>
- <zaɓi> 3 </ zaɓi>
- <zaɓi> 4 </ zaɓi>
- <zaɓi> 5 </ zaɓi>
- </select>
- <zaɓi mahara = "yawan" >
- <zaɓi> 1 </ zaɓi>
- <zaɓi> 2 </ zaɓi>
- <zaɓi> 3 </ zaɓi>
- <zaɓi> 4 </ zaɓi>
- <zaɓi> 5 </ zaɓi>
- </select>
Ƙara a saman abubuwan sarrafa burauzar da ake da su, Bootstrap ya haɗa da sauran kayan aikin tsari masu amfani.
Ƙara rubutu ko maɓalli kafin ko bayan kowane shigarwa na tushen rubutu. Lura cewa select
abubuwa ba su da tallafi a nan.
Kunna wani .add-on
da input
ɗaya tare da ɗayan aji biyu don tsarawa ko saka rubutu zuwa shigarwa.
- <div class = "input-prepend" >
- <span class = "ad-on" > @ </span>
- < class shigar = "span2" id = "prependedInput" nau'in = "rubutu" mai sanya wuri = "Sunan mai amfani" >
- </div>
- <div class = "input-append" >
- < class input = "span2" id = "appendedInput" nau'in = "rubutu" >
- <span class = "ƙara-kan" > .00 </span>
- </div>
Yi amfani da duka ajujuwa biyu da misalai biyu .add-on
don tsarawa da ƙara shigarwa.
- <div class = "input-prepend input-append" >
- <span class = "ad-on" > $ </span>
- < class input = "span2" id = "appendedPrependedInput" nau'in = "rubutu" >
- <span class = "ƙara-kan" > .00 </span>
- </div>
Maimakon rubutu mai <span>
rubutu, yi amfani da a .btn
don haɗa maɓalli (ko biyu) zuwa shigarwa.
- <div class = "input-append" >
- < class input = "span2" id = "appendedInputButton" nau'in = "rubutu" >
- < class class = "btn" type = "button" > Tafi! </button>
- </div>
- <div class = "input-append" >
- < class input = "span2" id = "appendedInputButtons" nau'in = "rubutu" >
- <button class = "btn" type = "button" > Bincika </button>
- <button class = "btn" type = "button" > Zabuka </button>
- </div>
- <div class = "input-append" >
- < class shigar = "span2" id = "appendedDropdownButton" nau'in = "rubutu" >
- <div class = "btn-group" >
- < class class = "btn dropdown-toggle" data-toggle = "saukarwa" >
- Aiki
- <span class = "kulawa" > </span>
- </button>
- <ul class = "zazzage-menu" >
- ...
- </ul>
- </div>
- </div>
- <div class = "input-prepend" >
- <div class = "btn-group" >
- < class class = "btn dropdown-toggle" data-toggle = "saukarwa" >
- Aiki
- <span class = "kulawa" > </span>
- </button>
- <ul class = "zazzage-menu" >
- ...
- </ul>
- </div>
- < class shigar = "span2" id = "prependedDropdownButton" nau'in = "rubutu" >
- </div>
- <div class = "input-prepend input-append" >
- <div class = "btn-group" >
- < class class = "btn dropdown-toggle" data-toggle = "saukarwa" >
- Aiki
- <span class = "kulawa" > </span>
- </button>
- <ul class = "zazzage-menu" >
- ...
- </ul>
- </div>
- < class shigar = "span2" id = "appendedPrependedDropdownButton" nau'in = "rubutu" >
- <div class = "btn-group" >
- < class class = "btn dropdown-toggle" data-toggle = "saukarwa" >
- Aiki
- <span class = "kulawa" > </span>
- </button>
- <ul class = "zazzage-menu" >
- ...
- </ul>
- </div>
- </div>
- <form>
- <div class = "input-prepend" >
- <div class = "btn-group" > ... </div>
- < nau'in shigarwa = "rubutu" >
- </div>
- <div class = "input-append" >
- < nau'in shigarwa = "rubutu" >
- <div class = "btn-group" > ... </div>
- </div>
- </form>
- < class class = "form-search" >
- <div class = "input-append" >
- < nau'in shigarwa = "rubutu" aji = "span2 search-query" >
- <button type = "submit" class = "btn" > Bincika </button>
- </div>
- <div class = "input-prepend" >
- <button type = "submit" class = "btn" > Bincika </button>
- < nau'in shigarwa = "rubutu" aji = "span2 search-query" >
- </div>
- </form>
Yi amfani da azuzuwan girman dangi kamar .input-large
ko daidaita abubuwan shigar ku zuwa girman ginshiƙi ta amfani .span*
da azuzuwan.
Yi kowane <input>
ko <textarea>
kashi yayi kama da matakin matakin toshe.
- < class input = "input-block-level" nau'in = "rubutu" mai sanya wuri = ".input-block-level" >
- < class input = "input-mini" nau'in = "rubutu" mai sanya wuri = ".input-mini" >
- < class class = "input-small" nau'in = "rubutu" mai sanya wuri = ".input-small" >
- < class input = "input-medium" nau'in = "rubutu" mai sanya wuri = ".input-medium" >
- < class input = "input-large" nau'in = "rubutu" mai sanya wuri = ".input-large" >
- < class input = "input-xlarge" nau'in = "rubutu" mai sanya wuri = ".input-xlarge" >
- < class input = "input-xxlarge" nau'in = "rubutu" mai sanya wuri = ".input-xxlarge" >
A kula!A cikin sigogin gaba, za mu canza amfani da waɗannan azuzuwan shigarwar dangi don dacewa da girman maɓallin mu. Misali, .input-large
zai ƙara mannewa da girman-girman shigarwar.
Yi amfani .span1
da .span12
don abubuwan shigar da suka dace da girman ginshiƙan grid.
- < class shigar = "span1" nau'in = "rubutu" mai sanya wuri = ".span1" >
- < class shigar = "span2" nau'in = "rubutu" mai sanya wuri = ".span2" >
- < class shigar = "span3" nau'in = "rubutu" mai sanya wuri = ".span3" >
- < class class = "span1" >
- ...
- </select>
- < class class = "span2" >
- ...
- </select>
- < class class = "span3" >
- ...
- </select>
Don abubuwan shigar da grid da yawa a kowane layi, yi amfani da .controls-row
ajin gyara don tazarar da ta dace . Yana yawo abubuwan da aka shigar don rugujewa farar sararin samaniya, yana saita iyakar da ya dace, kuma yana share mai iyo.
- <div class = "controls" >
- < class shigar = "span5" nau'in = "rubutu" mai sanya wuri = ".span5" >
- </div>
- <div class = "controls controls-jere" >
- < class shigar = "span4" nau'in = "rubutu" mai sanya wuri = ".span4" >
- < class shigar = "span1" nau'in = "rubutu" mai sanya wuri = ".span1" >
- </div>
- ...
Gabatar da bayanai a cikin sigar da ba za a iya gyarawa ba tare da yin amfani da ainihin ma'auni ba.
- <span class = "input-xlarge uneditable-input" > Wasu ƙima a nan </span>
Ƙare wani tsari tare da ƙungiyar ayyuka (maɓallai). Lokacin da aka sanya shi a cikin .form-actions
, maɓallan za su shiga ta atomatik don yin layi tare da sarrafa nau'i.
- <div class = "form-actions" >
- <button type = "submit" class = "btn btn-primary" > Ajiye canje-canje </button>
- <button type = "button" class = "btn" > Soke </button>
- </div>
Lissafin layi da toshe goyon bayan matakin don rubutun taimako wanda ya bayyana a kusa da sarrafa tsari.
- <input type = "text" ><span class = "help-inline" > Rubutun taimako na cikin layi </span>
- <input type = "text" ><span class = "help-block" > Tsawon toshe na rubutu na taimako wanda ke karya sabon layi kuma yana iya wuce layi daya. </span>
Bayar da ra'ayi ga masu amfani ko baƙi tare da jahohin martani na asali akan sarrafa nau'i da lakabi.
Muna cire tsoffin outline
sifofi akan wasu nau'ikan sarrafawa kuma muna amfani da box-shadow
a wurin sa don :focus
.
- < class input = "input-xlarge" id = "focusedInput" nau'in = "rubutu" darajar = "Wannan an mayar da hankali ne..." >
Abubuwan shigar da salo ta hanyar aikin tsoho mai bincike tare da :invalid
. Ƙayyade a type
, ƙara required
sifa idan filin ba na zaɓi ba ne, kuma (idan an zartar) saka a pattern
.
Babu wannan a cikin nau'ikan Internet Explorer 7-9 saboda rashin goyan bayan masu zaɓe na CSS.
- < class input = "span3" type = "email" da ake bukata >
Ƙara disabled
sifa a kan shigarwa don hana shigar da mai amfani da kuma haifar da kamanni daban-daban.
- < class input = "input-xlarge" id = "disabledInput" nau'in = "rubutu" mai sanya wuri = "An kashe shigarwa a nan ... "
Bootstrap ya haɗa da salon tabbatarwa don kuskure, faɗakarwa, bayanai, da saƙonnin nasara. Don amfani, ƙara ajin da ya dace zuwa kewaye .control-group
.
- <div class = "gargadin rukuni-rukuni" >
- <label class = "control-label" don = "inputWarning" > Shiga tare da gargadi </label>
- <div class = "controls" >
- < nau'in shigarwa = "rubutu" id = "inputWarning" >
- <span class = "help-inline" > Wataƙila wani abu ya ɓace </span>
- </div>
- </div>
- <div class = "kuskuren rukuni-rukuni" >
- <label class = "control-label" don = "inputError" > Shiga tare da kuskure </label>
- <div class = "controls" >
- < nau'in shigarwa = "rubutu" id = "inputError" >
- <span class = "help-inline" > Da fatan za a gyara kuskuren </span>
- </div>
- </div>
- <div class = "bayanan rukuni-rukuni" >
- <label class = "control-label" don = "inputInfo" > Shiga tare da bayani </label>
- <div class = "controls" >
- < nau'in shigarwa = "rubutu" id = "inputInfo" >
- <span class = "help-inline" > An riga an ɗauki sunan mai amfani </span>
- </div>
- </div>
- <div class = "nasara-rukuni" >
- <label class = "control-label" don = "inputSuccess" > Shiga tare da nasara </label>
- <div class = "controls" >
- < nau'in shigarwa = "rubutu" id = "inputSuccess" >
- <span class = "help-inline" > Woohoo! </span>
- </div>
- </div>
Ƙara azuzuwan zuwa <img>
kashi don sauƙin salo a kowane aiki.
- <img src = "..." class = "img-rounded" >
- <img src = "..." class = "img-circle" >
- <img src = "..." class = "img-polaroid" >
A kula! .img-rounded
kuma .img-circle
ba sa aiki a cikin IE7-8 saboda rashin border-radius
tallafi.
Gumaka 140 a cikin nau'in sprite, ana samun su cikin launin toka mai duhu (tsoho) da fari, wanda Glyphicons ya bayar .
Glyphicons Halflings yawanci ba a samun kyauta, amma tsari tsakanin Bootstrap da masu ƙirƙirar Glyphicons sun sa hakan ya yiwu ba tare da tsada ba a matsayin masu haɓakawa. A matsayin godiya, muna rokonka da ka haɗa hanyar haɗin yanar gizo na zaɓi zuwa Glyphicons a duk lokacin da ya dace.
Duk gumaka suna buƙatar <i>
alama tare da nau'i na musamman, wanda aka riga aka sanya shi tare da icon-
. Don amfani, sanya lambar mai zuwa kusan ko'ina:
- <i class = "icon-search" >>
Hakanan akwai nau'ikan nau'ikan gumaka masu jujjuya (fararen), waɗanda aka shirya tare da ƙarin aji ɗaya. Za mu aiwatar da wannan ajin musamman kan shawagi da jahohi masu aiki don hanyoyin haɗin ruwa da saukarwa.
- <i class = "icon-search icon-white" >>
A kula!Lokacin amfani da gefen igiyoyin rubutu, kamar a cikin maɓallai ko mahaɗin mahaɗa, tabbatar da barin sarari bayan <i>
alamar don tazarar da ta dace.
Yi amfani da su a cikin maɓallai, ƙungiyoyin maɓalli don kayan aiki, kewayawa, ko abubuwan da aka riga aka tsara.
- <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> Mai amfani </a>
- <a class = "btn btn-primary dropdown-toggle" data-toggle = "dropdown" href = "#" ><span class = "caret" ></span></a>
- <ul class = "zazzage-menu" >
- <li><a href = "#" ><i class = "icon-pencil" ></i> Gyara </a></li>
- <li><a href = "#" ><i class = "icon-trash" ></i> Share </a></li>
- <li><a href = "#" ><i class = "icon-ban-circle" ></i> Ban </a></li>
- <li class = "mai rarrabawa" </li>
- <li><a href = "#" ><i class = "i" ></i> Make admin </a></li>
- </ul>
- </div>
- <a class = "btn btn-large" href = "#" ><i class = "icon-star" ></i> Tauraro </a>
- <a class = "btn btn-small" href = "#" ><i class = "icon-star" ></i> Tauraro </a>
- <a class = "btn btn-mini" href = "#" ><i class = "icon-star" ></i> Tauraro </a>
- <ul class = "nav-list" >
- <li class = "active" ><a href = "#" ><i class = "icon-home icon-white" ></i> Gida </a></li>
- <li><a href = "#" ><i class = "icon-book" ></i> Laburare </a></li>
- <li><a href = "#" ><i class = "icon-pencil" ></i> Aikace-aikace </a></li>
- <li><a href = "#" ><i class = "i" ></i> Misc </a></li>
- </ul>
- <div class = "control-group" >
- <label class = "control-label" don = "inputIcon" > Adireshin imel </label>
- <div class = "controls" >
- <div class = "input-prepend" >
- <span class = "add-on" ><i class = "ambulan icon" </i></span>
- < class shigar = "span2" id = "inputIcon" nau'in = "rubutu" >
- </div>
- </div>
- </div>