Daraasiin qaybood oo dib loo isticmaali karo ayaa lagu dhisay Bootstrap si ay u bixiyaan hagidda, digniinaha, popovers, iyo wax ka badan.
Bogga aad u fudud oo qaab yar loo qaabeeyey oo ay dhiirigelisay Rdio, ku fiican abka iyo natiijooyinka raadinta. Baloogga weyni way adag tahay in la waayo, si fudud ayaa loo miisaami karaa, wuxuuna bixiyaa meelo badan oo gujis ah.
Xiriirinta waa la habeyn karo waxayna ku shaqeeyaan xaalado dhowr ah oo leh fasalka saxda ah. .disabled
Xiriirinta aan la gujin karin iyo .active
bogga hadda jira.
Ku dar mid ka mid ah laba fasal oo ikhtiyaari ah si aad u bedesho isku xidhka boggaga: .pagination-centered
iyo .pagination-right
.
Qaybta pagination-ka caadiga ah waa dabacsanaan waxayna ku shaqeysaa tiro kala duwanaansho ah.
Ku duudduubay a <div>
, pagination waa uun a <ul>
.
- <div class = "pagination" >
- <ul>
- <li><a href = "#" > Horay </a></li>
- <li class = "firfircoon" >
- <a href = "#" > 1 </a>
- </li>
- <li><a href = "#" > 2 </a></li>
- <li><a href = "#" > 3 </a></li>
- <li><a href = "#" > 4 </a></li>
- <li><a href = "#" > Xiga </a></li>
- </ul>
- </div>
Qaybta bogaggu waa isku-xirayaal loogu talagalay hirgelinta pagination fudud oo leh calaamad iftiin iyo xitaa qaabab fudud. Waxay u fiican tahay bogagga fudud sida blogyada ama majaladaha.
Xiriirinta Pager sidoo kale waxay isticmaalaan .disabled
fasalka guud ee bogga.
Sida caadiga ah, pager-ku wuxuu isku xiraa.
- <ul class = "pager" >
- <li>
- <a href = "#" > Hore </a>
- </li>
- <li>
- <a href = "#" > Xiga </a>
- </li>
- </ul>
Haddii kale, waxaad isku toosin kartaa xiriiriye kasta dhinacyada:
- <ul class = "pager" >
- <li class = "kii hore" >
- <a href = "#" > ← Ka weyn </a>
- </li>
- <li class = "ku xiga" >
- <a href = "#" > Ka cusub → </a>
- </li>
- </ul>
Calaamadaha | Calaamadayn |
---|---|
Asal ahaan | <span class="label">Default</span> |
Guul | <span class="label label-success">Success</span> |
Digniin | <span class="label label-warning">Warning</span> |
Muhiim | <span class="label label-important">Important</span> |
Xog | <span class="label label-info">Info</span> |
rogan | <span class="label label-inverse">Inverse</span> |
Calaamaduhu waa qaybo yaryar, fudud oo muujinaya tilmaame ama tiro nooc ka mid ah. Waxaa badanaa laga helaa macaamiisha iimaylka sida Mail.app ama abka moobaylka ee ogeysiisyada riixitaanka.
Magaca | Tusaale | Calaamadayn |
---|---|---|
Asal ahaan | 1 | <span class="badge">1</span> |
Guul | 2 | <span class="badge badge-success">2</span> |
Digniin | 4 | <span class="badge badge-warning">4</span> |
Muhiim | 6 | <span class="badge badge-important">6</span> |
Xog | 8 | <span class="badge badge-info">8</span> |
rogan | 10 | <span class="badge badge-inverse">10</span> |
Bootstrap waxay ku siinaysaa qayb dabacsan oo fudud oo loo yaqaan unugga geesiga si ay u soo bandhigto waxa ku jira boggaaga. Waxay si fiican uga shaqeysaa suuq-geynta iyo boggaga culculus.
Ku duub macluumaadkaaga div
sida:
- <div class = "hero-unit" >
- <h1> Ciwaanka </h1>
- <p> Tagline </p>
- <p>
- <a class = "btn btn-primary btn-large" >
- Wax dheeri ah baro
- </a>
- </p>
- </div>
Tani waa unug fudud oo halyey ah, qayb fudud oo qaabka jumbotron ah oo loogu yeedhayo feejignaan dheeri ah nuxurka ama macluumaadka.
Qolf fudud oo loogu talagalay in h1
si habboon loo baneeyo oo u qaybiyo qaybaha nuxurka bogga. Waxay ka faa'iidaysan kartaa h1
' default' small
, element iyo sidoo kale inta badan qaybaha kale (oo leh qaabab dheeraad ah).
- <div class = "page-header" >
- <h1> Tusaalaha madaxa bogga </h1>
- </div>
Sida caadiga ah, Bootstrap's thumbnails waxaa loogu talagalay in lagu soo bandhigo sawirro ku xiran oo leh calaamad u yar oo loo baahan yahay.
Waxoogaa calaamad ah oo dheeri ah, waxaa suurtagal ah in lagu daro nooc kasta oo ka mid ah waxyaabaha HTML sida cinwaannada, cutubyada, ama badhamada thumbnails.
Sawir-gacmeedka (horay .media-grid
u ahaa ilaa v1.4) waxay ku fiican yihiin shabakadaha sawirada ama fiidyaha, natiijooyinka raadinta sawirka, alaabta tafaariiqda, faylalka, iyo wax ka badan. Waxay noqon karaan xiriirin ama nuxur taagan.
Calaamadaynta thumbnail waa mid fudud - oo ul
leh tiro kasta oo li
walxood ayaa ah waxa loo baahan yahay oo dhan. Waxa kale oo aad u dabacsan, oo u oggolaanaysa nooc kasta oo ka mid ah nuxurka leh wax yar oo dheeraad ah si loo duubo waxa ku jira.
Ugu dambayntii, qaybta thumbnails-ka waxay isticmaashaa fasallada nidaamka grid-ka jira-sida .span2
ama - .span3
si loo xakameeyo cabbirrada thumbnail-ka.
Sidii hore loo sheegay, calaamadaynta loo baahan yahay ee thumbnails waa iftiin iyo toosan. Waa kan eega habaynta asalka ah ee sawirada ku xidhan :
- <ul class = "thumbnails" >
- <li class = "span3" >
- <a href = "#" class = "thumbnail" >
- <img src = "https://placehold.it/260x180" alt = "" >
- </a>
- </li>
- ...
- </ul>
Wixii HTML ah ee ku jira thumbnails, calaamadayntu wax yar ayay isbedeshaa. Si loo oggolaado nuxurka xannibaadda meel kasta, waxaanu ku beddelannaa <a>
sidan <div>
:
- <ul class = "thumbnails" >
- <li class = "span3" >
- <div class = "thumbnail" >
- <img src = "https://placehold.it/260x180" alt = "" >
- <h5> Calaamadda thumbnail </h5>
- <p> Qoraalka thumbnail halkan... </p>
- </div>
- </li>
- ...
- </ul>
Bootstrap 2, waxaanu fududaynay fasalka aasaasiga ah: .alert
halkii .alert-message
. Waxaan sidoo kale yareynay calaamadeynta ugu yar ee loo baahan yahay-maya <p>
ayaa loo baahan yahay default, kaliya dibadda <div>
.
Qayb aad u waara oo leh kood ka yar, waxaanu ka saarnay kala soocida eegno digniinta xannibaadda, fariimaha la socda suuf badan iyo qoraalo badan. Fasalka sidoo kale wuxuu isu beddelay .alert-block
.
Bootstrap waxay la socotaa jQuery plugin weyn oo taageera fariimaha digniinta ah, taasoo ka dhigaysa inay si dhakhso ah oo fudud u eryaan.
Ku duub fariintaada iyo summada dhow ee ikhtiyaarka ah ee div leh fasal fudud.
- <div class = " feejignaan " >
- <button class = "close" data-dismiss = " digniin" > × </button>
- Digniin ! </strong> Hubinta ugu fiican ee naftaada, uma eka mid aad u wanaagsan.
- </div>
Madaxa kor u qaad! Aaladaha iOS waxay u baahan yihiin href="#"
ka saarida digniinaha Hubi inaad ku darto iyada iyo xogta sifada summada xidhidhiyaha Haddii kale, waxa aad isticmaali kartaa shay <button>
leh sifada xogta, kaas oo aanu u dooranay in aanu u samayno docsyadayada. Markaad isticmaalayso <button>
, waa inaad ku dartaatype="button"
ama foomamkaagu ma soo gudbin karaan.
Si fudud u fidi fariinta digniinta caadiga ah oo leh laba qaybood oo ikhtiyaari ah: .alert-block
suuf badan iyo kontaroolada qoraalka iyo .alert-heading
ciwaanka u dhigma.
Hubinta ugu fiican ee naftaada, uma eka mid aad u wanaagsan. Nulla vitae elit libero, a pharetra augue. Preesent commodo cursus magna, vel scelerisque nisl consectetur et.
- <div class = "digniinta digniin-block" >
- <a class = "close" data-dismiss = "alert" href = "#" > × </a>
- <h4 class = "ciwaanka digniinta" > Digniin! </h4>
- Is hubinta ugu fiican, ma tihid...
- </div>
- <div class = "wargelinta digniinta- khalad" >
- ...
- </div>
- <div class = " feejignaan-guul" >
- ...
- </div>
- <div class = "wargelinta digniin-info" >
- ...
- </div>
Bar horumarka caadiga ah oo leh jaangooyo toosan.
- <div class = "horumar" >
- <div class = "bar"
- style = " ballac : 60 %; " </div>
- </div>
Wuxuu isticmaalaa gradient si uu u abuuro saamayn xariijimo ah (IE maya).
- <div class = "horumar-horumar-ku-soo-bax" >
- <div class = "bar"
- style = " ballac : 20 %; " </div>
- </div>
Qaado tusaalaha xariijimaha ah oo ku nooleeya (maya IE).
- <div class = "horumar-ku-socod
- firfircoon" >
- <div class = "bar"
- style = " ballac : 40 %; " </div>
- </div>
Baararka horusocodku waxay isticmaalaan qaar ka mid ah badhanka isku midka ah iyo xiisadaha digniinta ee qaababka joogtada ah.
Si la mid ah midabada adag, waxaan leenahay baararka horumarka xariijimaha kala duwan.
Baararka horusocodku waxay adeegsadaan kala-guurka CSS3, markaa haddii aad si firfircoon u hagaajisid ballaca Javascript, waxay si habsami leh u cabbiri doontaa.
Haddii aad isticmaasho .active
fasalka, .progress-striped
baararka horumarkaagu waxay soo jiidan doonaan xariijimaha bidix ilaa midig.
Baararka horusocodku waxay isticmaalaan gradients CSS3, kala-guurka, iyo animations si ay u gaaraan dhammaan saameyntooda. Tilmaamahan laguma taageero IE7-9 ama noocyadii hore ee Firefox.
Opera iyo IE ma taageeraan animations wakhtigan.
Isticmaal ceelka si sahlan oo saameyn ku leh curiyaha si aad u siiso saameyn inset.
- <div class = "wanaagsan" >
- ...
- </div>
U isticmaal astaanta guud ee u dhow si aad meesha uga saarto waxyaabaha sida moodalka iyo digniinaha.
- <button class = "xir" > × </button>
Aaladaha iOS waxay u baahan yihiin href="#" dhacdooyinka gujinta haddii aad doorbidi lahayd inaad isticmaasho barroosin.
- <a class = "close" href = "#" > & times; </a>