Dusha sare ee xoqidda, walxaha HTML ee aasaasiga ah ayaa la qaabeeyey oo lagu xoojiyay fasallo la fidin karo si ay u bixiyaan muuqaal iyo dareen joogto ah.
@baseFontSize
Isku-xidhka qoraalka oo dhan wuxuu ku salaysan yahay laba doorsoomayaal ka yar doorsoomayaalkeenna @baseLineHeight
. Midka koowaad waa cabbirka font-saldhigga ee la isticmaalo oo dhan kan labaadna waa dhererka xarriiqda saldhigga.
Waxaan isticmaalnaa doorsoomayaashaas, iyo xisaabta qaar, si aan u abuurno xad-dhaafka, suufka, iyo dhererka-line ee dhammaan noocyadayada iyo in ka badan.
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus iyo magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies baabuurta.
Ka dhig cutubka mid taagan adiga oo ku daraya .lead
.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor actor. Duis mollis, est non commodo luctus.
Curiyaha | Isticmaalka | Ikhtiyaari |
---|---|---|
<strong> |
Si aad u xoojiso qayb qoraal ah oo muhiim ah | Midna |
<em> |
Si aad xoogga u saarto qayb yar oo qoraal ah oo walaac leh | Midna |
<abbr> |
Wuxuu duubaa soo gaabinta iyo ereyada la soo gaabiyey si uu u muujiyo nooca la ballaariyey ee dul heehaabaya | Ku dar sifada ikhtiyaariga .initialism fasalka soo gaabinta xarfaha waaweyn. |
<address> |
Wixii macluumaad ah ee xiriirka awoowe kuugu dhow ama dhammaan shaqada oo dhan | Ilaali qaabaynta adiga oo ku soo afjaraya dhammaan khadadka<br> |
Fusce dapibus , tellus ac cursus commodo , tortor mauris condimentum nibh , ut fermentum massa justo sit amet risus. Maecenas faucibus mollis interdum. Nulla vitae elit libero, a pharetra augue.
Fiiro gaar ah: Dareen xor u ah isticmaalka <b>
iyo <i>
HTML5, laakiin isticmaalkooda ayaa isbeddelay. <b>
waxaa loola jeedaa in lagu muujiyo ereyada ama odhaahyada iyada oo aan la gudbin muhiimad dheeraad ah halka <i>
ay u badan tahay cod, ereyo farsamo, iwm.
Waa kuwan laba tusaale oo ku saabsan sida <address>
loo isticmaali karo summada:
Soo gaabinta sifada leh title
ayaa leh xudduud hoose oo dhibco khafiif ah iyo calaamad caawimo dul heehaabaysa. Tani waxay siinaysaa isticmaalayaasha tilmaan dheeraad ah oo wax lagu tusi doono dul heehaabeedka.
Ku dar initialism
fasalka soo gaabinta si aad u kordhiso is-waafajinta qoraalka adiga oo siinaya cabbir yar oo qoraal ah.
HTML waa waxa ugu wanaagsan tan iyo rootiga la jarjaray.
Soo gaabinta ereyga sifo waa attr .
Curiyaha | Isticmaalka | Ikhtiyaari |
---|---|---|
<blockquote> |
Cunsurka heerka xannibaadda ee xigashada macluumaadka meel kale | Ku dar .pull-left iyo .pull-right fasallo ikhtiyaarrada sabeynaya |
<small> |
Ikhtiyaarka ikhtiyaarka ah ee lagu daro xigashada u jeedda isticmaale, sida caadiga ah qoraa leh cinwaan shaqo | Dhig <cite> agagaarka ciwaanka ama magaca isha |
Si loogu daro blockquote, ku duub HTML<blockquote>
kasta sida xigashada. Xigashooyinka tooska ah waxaan kugula talineynaa a .<p>
Ku dar shay ikhtiyaari <small>
ah si aad u sheegto ishaada waxaadna ka heli doontaa em dash —
ka hor ujeeddooyin qaabaynta.
- <blockquote>
- <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer-ka ayaa si xun u saameeya ante venenatis. </p>
- <small> Qof caan ah </small>
- </blockquote>
Xigashooyinka caadiga ah waxaa loo qaabeeyey sidan:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer-ka ayaa si xun u saameeya ante venenatis.
Qof caan ku ah Jidhka shaqada
Si aad u sabbayso blockquote dhanka midig, ku dar class="pull-right"
:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer-ka ayaa si xun u saameeya ante venenatis.
Qof caan ku ah Jidhka shaqada
<ul>
<ul class="unstyled">
<ol>
<dl>
<dl class="dl-horizontal">
Madaxa kor u qaad! Liisaska sharraxaadda tooska ah waxay gooyn doonaan ereyada aad u dheer inay ku habboon yihiin hagaajinta tiirka bidix text-overflow
. Goobaha daawashada ee dhuuban, waxay u bedeli doonaan qaabka la isku dhejiyay ee caadiga ah.
Ku duub godadka koodka dhexda ah ee <code>
.
- Tusaale ahaan , <code> qaybta </ code > waa in lagu duuduubaa sidii khadka .
U isticmaal <pre>
khadadka koodka badan. Hubi inaad ka baxsato xagal kasta oo ku jira koodka si sax ah loo sameeyo.
<p> Tusaalaha qoraalka halkan...</p>
- <pre>
- <p> Tusaalaha qoraalka halkan...</p>
- </pre>
Fiiro gaar ah: Hubi inaad ku hayso koodka <pre>
tagsyada sida ugu dhow bidixda intii suurtagal ah; waxay soo saari doontaa dhammaan tabsyada.
Waxaad si ikhtiyaari ah ugu dari kartaa .pre-scrollable
fasalka dejin doona dhererka ugu badan ee 350px oo ku siin doona y-axis duub.
Qaado <pre>
walxo isku mid ah oo ku dar laba fasal oo ikhtiyaari ah si loo wanaajiyo samaynta.
- <p> Tusaalaha qoraalka halkan... </p>
- <pre class = "prettyprint
- linenums" >
- <p> Tusaalaha qoraalka halkan...</p>
- </pre>
Soo deji google-code-prettify oo arag readme sida loo isticmaalo.
Tag | Sharaxaada |
---|---|
<table> |
Cutubka duubista ee muujinta xogta qaab tabo ah |
<thead> |
Cunsurka weelka ee safafka madaxa miiska ( <tr> ) si loo calaamadiyo tiirarka miiska |
<tbody> |
Walxaha weelka ee safafka miiska ( <tr> ) ee jidhka miiska |
<tr> |
Cunsurka weelka ee unugyada miiska ( <td> ama <th> ) ee ka muuqda hal saf |
<td> |
Unugga miiska caadiga ah |
<th> |
Unugga miiska gaarka ah ee tiirka (ama safka, iyadoo ku xidhan baaxadda iyo meelaynta) sumadaha waa in lagu dhex isticmaalo a <thead> |
<caption> |
Sharaxaadda ama soo koobidda waxa miiska u yaal, gaar ahaan faa'iido u leh akhristayaasha shaashadda |
- <miiska>
- <madaxa>
- <tr>
- <th> … </th>
- <th> … </th>
- </tr>
- </text>
- <tbody>
- <tr>
- <td> … </td>
- <td> … </td>
- </tr>
- </tbody>
- </miiska>
Magaca | Fasalka | Sharaxaada |
---|---|---|
Asal ahaan | Midna | No qaab, kaliya tiirar iyo saf |
Aasaaska | .table |
Kaliya xariiq toosan oo u dhexeeya safafka |
Xuduud la leeyahay | .table-bordered |
Wareega geesaha oo ku dara soohdinta dibadda |
Zebra-xariif | .table-striped |
Wuxuu ku daraa midab asal cawl khafiif ah safafka khayaaliga ah (1, 3, 5, iwm) |
Culays | .table-condensed |
Waxay gooysaa suufka tooska ah kala badh, min 8px ilaa 4px, dhammaan td iyo th walxaha |
Miisaska si toos ah ayaa loo qaabeeyey iyada oo leh dhawr xuduudood si loo hubiyo in la akhriyi karo oo loo ilaaliyo qaabdhismeedka. Iyadoo 2.0, .table
fasalka ayaa loo baahan yahay.
- < class class = "miiska" >
- …
- </miiska>
# | Magaca koowaad | Magaca Dambe | Magaca isticmaale |
---|---|---|---|
1 | Calaamadee | Otto | @mdo |
2 | Yacquub | Thornton | @ buuran |
3 | Larry | Shimbirka |
Wax yar ka hel miisaskaada adigoo ku daraya zebra-striping-kaliya ku dar .table-striped
fasalka.
Fiiro gaar ah: Miisaska la jeexay waxay isticmaalaan :nth-child
xulashada CSS oo kuma jiraan IE7-IE8.
- < class class = " miis-xariif ah" >
- …
- </miiska>
# | Magaca koowaad | Magaca Dambe | Magaca isticmaale |
---|---|---|---|
1 | Calaamadee | Otto | @mdo |
2 | Yacquub | Thornton | @ buuran |
3 | Larry | Shimbirka |
Ku dar soohdimaha ku wareegsan miiska oo dhan iyo geesaha wareegsan ee ujeedooyinka qurxoon.
- < class class = "miis xuduudeed" >
- …
- </miiska>
# | Magaca koowaad | Magaca Dambe | Magaca isticmaale |
---|---|---|---|
1 | Calaamadee | Otto | @mdo |
Calaamadee | Otto | @getbootstrap | |
2 | Yacquub | Thornton | @ buuran |
3 | Larry the Bird |
Ka dhig miisaskaga kuwa is haysta adiga oo ku daraya .table-condensed
fasalka si aad u gooyso suufka unugga miiska kala badh (laga bilaabo 8px ilaa 4px).
- < class class = "miiska-koondensed" >
- …
- </miiska>
# | Magaca koowaad | Magaca Dambe | Magaca isticmaale |
---|---|---|---|
1 | Calaamadee | Otto | @mdo |
2 | Yacquub | Thornton | @ buuran |
3 | Larry the Bird |
Dareen xor inaad isku darsato mid kasta oo ka mid ah fasallada miiska si aad u hesho muuqaalo kala duwan adiga oo isticmaalaya mid ka mid ah fasallada la heli karo.
- < class class = "miis-xariif ah oo miis-kooban" >
- ...
- </miiska>
Magaca buuxa | |||
---|---|---|---|
# | Magaca koowaad | Magaca Dambe | Magaca isticmaale |
1 | Calaamadee | Otto | @mdo |
2 | Yacquub | Thornton | @ buuran |
3 | Larry the Bird |
Qaybta ugu fiican ee ku saabsan foomamka Bootstrap waa in dhammaan agabyadaada iyo kontarooladaada ay u muuqdaan kuwo aad u fiican si kasta oo aad ugu dhisto calaamadayntaada. Looma baahna HTML xad dhaaf ah, laakiin waxaan siinaa qaababka kuwa u baahan.
Qaabab aad u adag ayaa la socda fasallo kooban oo la miisaami karo si ay u habeeyaan fudud iyo isku xidhka dhacdada, markaa waxaad daboolaysaa tallaabo kasta.
Bootstrap waxay la timaadaa taageero afar nooc oo qaab qaabayn ah:
Noocyada kala duwan ee qaabka qaabaynta waxay u baahan yihiin isbedelo si loo calaamadiyo, laakiin kontaroolada laftooda ayaa ahaanaya oo u dhaqma sidii hore.
Foomamka Bootstrap waxaa ka mid ah qaabab loogu talagalay dhammaan kontaroolada foomka saldhigga sida gelinta, qoraalka, oo dooro waxaad filan lahayd. Laakin waxa kale oo ay la timaadaa qaybo badan oo caado ah sida agabka lifaaqan iyo kuwa la sii diyaariyay iyo taageerada liisaska sanduuqyada hubinta.
Dawladaha sida khaladka, digniinta, iyo guusha ayaa lagu daraa nooc kasta oo ah xakamaynta foomka. Waxa kale oo ku jira qaababka kontaroolada naafada.
Bootstrap waxay bixisaa calaamadayn fudud iyo qaabab afar nooc oo foomamka shabakada caadiga ah.
Magaca | Fasalka | Sharaxaada |
---|---|---|
Toosan (ugu tala galay) | .form-vertical (looma baahna) |
Summadaha is dulsaaran, ku toosan bidix ee kor ku xusan |
Inline | .form-inline |
Summada bidix ku toosan iyo kontaroolada xannibaadda khadka ee qaabka is haysta |
Raadi | .form-search |
Gelida qoraalka dheeriga ah ee qaabaynta raadinta caadiga ah |
Horizontal | .form-horizontal |
Sabbeyn bidix, sumadaha midig ku toosan ee isla xariiqda kontaroolada |
Khariidad fudud oo fudud oo aan lahayn calaamado dheeraad ah.
- < class form = "wanaagsan" >
- <label> Magaca summada </label>
- <input type = "text" class = "span3" placeholder = " Qor wax..." >
- <span class = "help-block" > Tusaalaha qoraalka caawinta heerka block. </span>
- < class calaamad = "checkbox" >
- <input type = "checkbox" > I hubi
- </label>
- <button type = "gudbi" class = "btn" > Gudbi </button>
- </form>
Ku dar .form-search
foomka .search-query
iyo input
.
- < class form = "si fiican qaab-raadinta" >
- <input type = "text" class = "input-medium search-query" >
- <button type = "submit" class = "btn" > Raadi </button>
- </form>
Ku dar .form-inline
si aad u hagaajiso toosinta toosan iyo kala dheeraynta kontaroolada foomka.
- < class form = "well form-inline" >
- <input type = "text" class = "input-small" placeholder = "Email" >
- <input type = "password" class = "input-small" meeleeyaha = "Password" >
- < class calaamad = "checkbox" >
- <input type = "checkbox" > I xasuuso
- </label>
- <button type = "gudbi" class = "btn" > Soo gal </button>
- </form>
Midigta ayaa lagu muujiyay dhammaan kontaroolada qaabka caadiga ah ee aan taageerno. Waa kuwan liiska la soo saaray:
Marka la eego qaabka qaabka sare ee tusaalaha, waa kan calaamadaynta la xidhiidha galinta iyo kooxda koontaroolka koowaad. The .control-group
, .control-label
, iyo .controls
fasalada dhamaantood waxa looga baahan yahay habaynta.
- < class form = "form-horizontal" >
- <fieldset>
- <legend> Qoraalka halyeyga ah </legend>
- <div class = "koontarool-koox" >
- <label class = "control-label" ee = "input01" > Gelin qoraal ah </label>
- <div class = "koontaroolada" >
- <input type = "text" class = "input-xlarge" id = "input01" >
- <p class = "help-block" > Taageerada qoraalka </p>
- </div>
- </div>
- </fieldset>
- </form>
Bootstrap wuxuu leeyahay qaabab loogu talagalay biraawsarka taageerto diiradda iyo disabled
gobolada. Waxaan meesha ka saarna Webkit-ka caadiga ah outline
oo aan ka codsanaa box-shadow
meesheeda :focus
.
Waxa kale oo ku jira qaababka ansaxinta khaladaadka, digniinaha, iyo guusha. Si aad u isticmaasho, ku dar fasalka khaladka agagaarka .control-group
.
- <fieldset
- class = "khalad-koox-kooxeed" >
- …
- </fieldset>
Kooxaha wax gelinta-oo wata qoraal ku lifaaqan ama horay loo sii diyaariyay-waxay ku siinayaan hab fudud oo lagu bixin karo macnaha guud Tusaalooyinka waaweyn waxaa ka mid ah calaamadda @ ee magacyada isticmaaleyaasha Twitter ama $ dhaqaalaha.
Ilaa v1.4, Bootstrap wuxuu u baahday calaamadayn dheeri ah oo ku wareegsan sanduuqyada hubinta iyo raadiyaha si loo raro. Hadda, waa arrin fudud in lagu celiyo kii soo <label class="checkbox">
duuduubay <input type="checkbox">
.
Sanduuqyada jeeg-garaynta iyo raadiyaha ayaa sidoo kale la taageeraa. Kaliya ku dar .inline
mid kasta .checkbox
ama .radio
waad dhammaysay.
Si aad u isticmaasho prepend ama lifaaq galinta qaab khad toosan, hubi inaad dhigto .add-on
isla input
xariiqda, bilaa boos
Si aad ugu darto qoraalka caawinta ee foomkaaga gelinta, ku dar qoraalka caawinta khadka tooska ah leh <span class="help-inline">
ama xidhid qoraal ah <p class="help-block">
ka dib curiyaha galinta.
Halkii aan ka samayn lahayn calaamad kasta codsi dheeri ah, waxaanu ku soo ururinay sprite— farabadan oo sawirro ah oo ku jira hal fayl oo isticmaala CSS si uu u dhigo sawirada background-position
. Kani waa isla habka aan ku isticmaalno Twitter.com si fiican ayuu nooga shaqeeyay.
Dhammaan fasallada summada waxa lagu .icon-
horgaleyey magac-u-yeelid habboon, si la mid ah qaybahayada kale. Tani waxay kaa caawin doontaa inaad iska ilaaliso isku dhacyada qalabka kale.
Glyphicons waxa ay na siisay isticmaalka Halflings-ka lagu dejiyay agabkayaga isha furan ilaa inta aanu ku bixinayno isku xidhka iyo credit halkan dukumeentiyada. Fadlan tixgeli inaad sidaas oo kale ku sameyso mashaariicdaada.
Bootstrap waxay u isticmaashaa summada <i>
dhammaan summada, laakiin ma haystaan fasal kiis-kaliya horgale la wadaago. Si aad u isticmaasho, dhig koodka soo socda meel kasta:
- <i class = "icon-search" ></i>
Waxa kale oo jira habab diyaar u ah calaamadaha rogan (caddaan), oo lagu diyaariyey hal fasal oo dheeraad ah:
- <i class = "icon-search icon-white" ></i>
Waxaa jira 140 fasal oo aad ka dooran karto astaantaada. Kaliya ku dar <i>
sumad leh fasalada saxda ah oo aad dejisay Waxaad ka heli kartaa liiska oo dhan sprites.less ama halkan dukumeentigan.
Madaxa kor u qaad! Markaad isticmaalayso xadhkaha qoraalka, sida badhamada ama isku xidhka nav, hubi inaad ka tagto meel bannaan ka dib <i>
sumadda si aad u kala fogaato.
Astaamaha waa weyn yihiin, laakiin halkee laga isticmaali karaa? Halkan waxaa ah fikrado dhowr ah:
Asal ahaan, meel kasta oo aad ku dhejin karto <i>
sumad, waxaad dhejin kartaa icon.
U isticmaal badhamada, kooxaha badhanka si aad u heshid bar, navigation, ama foomka la sii diyaariyay.