Daraasiin ka kooban qaybo dib loo isticmaali karo oo loo dhisay si ay u bixiyaan hagidda, digniinaha, popovers, iyo in ka badan.
La beddeli karo, liiska macnaha guud ee muujinaya liisaska isku xirka. Lagu sameeyay is dhexgal leh hoos udhaca JavaScript plugin .
- <ul class = "Dropdown-menu" doorka = "menu" aria-labelledby = "dropdownMenu" >
- <li><a tabindex = "-1" href = "#" > Ficil </a></li>
- <li><a tabindex = "-1" href = "#" > Ficil kale </a></li>
- <li><a tabindex = "-1" href = "#" > Wax kale halkan </a></li>
- <li class = "qaybiye" </li>
- <li><a tabindex = "-1" href = "#" > Xiriirinta goonida ah </a></li>
- </ul>
Markaad eegto kaliya liiska hoos u dhaca, waa kan HTML-ka loo baahan yahay. Waxaad u baahan tahay inaad ku duubto kiciyaha hoos u dhaca iyo liiska hoos u dhaca ee gudaha .dropdown
, ama shay kale oo sheegaya position: relative;
. Kadib samee kaliya menu-ka.
- <div class = "hoos u dhac" >
- <!-- Isku xidhka ama badhanka si aad u beddesho hoos u dhaca -->
- <ul class = "Dropdown-menu" doorka = "menu" aria-labelledby = "dLabel" >
- <li><a tabindex = "-1" href = "#" > Ficil </a></li>
- <li><a tabindex = "-1" href = "#" > Ficil kale </a></li>
- <li><a tabindex = "-1" href = "#" > Wax kale halkan </a></li>
- <li class = "qaybiye" </li>
- <li><a tabindex = "-1" href = "#" > Xiriirinta goonida ah </a></li>
- </ul>
- </div>
Ku toosi menus dhinaca midig oo ku dar waxa ku jira heerar dheeraad ah oo hoos u dhigis ah.
Ku dar .pull-right
a .dropdown-menu
to midig toosi liiska hoos u dhaca.
- <ul class = "Dropdown-menu pull-right" doorka = "menu" aria-labelledby = "dLabel" >
- ...
- </ul>
Ku dar .disabled
hoos <li>
-hoosaadka si aad u joojiso xidhiidhka
- <ul class = "Dropdown-menu" doorka = "menu" aria-labelledby = "dropdownMenu" >
- <li><a tabindex = "-1" href = "#" > Xiriirinta joogtada ah </a></li>
- <li class = "disabled" ><a tabindex = "-1" href = "#" > Xiriirinta naafada </a></li>
- <li><a tabindex = "-1" href = "#" > Xiriiriye kale </a></li>
- </ul>
Ku dar heerar dheeri ah oo liiska hoos-u-dhaca ah, oo ka muuqda dul heehaab la mid ah kuwa OS X, oo leh qaar ka mid ah ku-kordhinta fudud. Ku dar .dropdown-submenu
mid kasta li
oo ku jira liiska hoos u dhaca ee jira qaabaynta tooska ah.
- <ul class = "Dropdown-menu" doorka = "menu" aria-labelledby = "dLabel" >
- ...
- <li class = "Dropdown-submenu" >
- <a tabindex = "-1" href = "#" > Ikhtiyaar badan </a>
- <ul class = "Dropdown-menu" >
- ...
- </ul>
- </li>
- </ul>
Pagination fudud 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.
- <div class = "pagination" >
- <ul>
- <li><a href = "#" > Horay </a></li>
- <li><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 = "#" > 5 </a></li>
- <li><a href = "#" > Xiga </a></li>
- </ul>
- </div>
Xiriirinta waa kuwo lagu habeyn karo duruufo kala duwan. U isticmaal .disabled
xiriiriyeyaasha aan la gujin karin iyo .active
si aad u muujiso bogga hadda jira.
- <div class = "pagination" >
- <ul>
- <li class = "disabled" ><a href = "#" > « </a></li>
- <li class = "firfircoon" ><a href = "#" > 1 </a></li>
- ...
- </ul>
- </div>
Waxaad si ikhtiyaari ah u beddeli kartaa barroosinnada firfircoon ama naafada ah ee taako si aad meesha uga saarto shaqeynta guji inta aad haysatid qaababka loogu talagalay.
- <div class = "pagination" >
- <ul>
- <li class = "naafo" ><span> & laquo; </span></li>
- <li class = "firfircoon" ><span> 1 </span></li>
- ...
- </ul>
- </div>
Ma jeceshahay bogag ka weyn ama ka yar? Ku dar .pagination-large
, .pagination-small
, ama .pagination-mini
cabbirro dheeraad ah.
- <div class = "pagination pagination-large" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "pagination" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "pagination pagination-small" >
- <ul>
- ...
- </ul>
- </div>
- <div class = "pagination pagination-mini" >
- <ul>
- ...
- </ul>
- </div>
Ku dar mid ka mid ah laba fasal oo ikhtiyaari ah si aad u bedesho isku xidhka boggaga: .pagination-centered
iyo .pagination-right
.
- <div class = "pagination pagination-centered" >
- ...
- </div>
- <div class = "pagination pagination-right" >
- ...
- </div>
Xidhiidhada degdega ah ee hore iyo kan xiga ee hirgelinta pagination fudud oo leh calaamad iftiin iyo qaabab. Waxay u fiican tahay bogagga fudud sida blogyada ama majaladaha.
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>
Xiriirinta Pager sidoo kale waxay isticmaalaan .disabled
fasalka utility guud ee bogga.
- <ul class = "pager" >
- <li class = "hore naafo ah" >
- <a href = "#" > ← Ka weyn </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> |
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> |
Si loo fududeeyo hirgelinta, sumadaha iyo calaamaduhu si fudud ayay u burburi doonaan (iyada oo loo sii marayo :empty
xulashada CSS) marka aanay wax nuxur ahi ku jirin.
Qayb fufud, dabacsanaan leh si loogu soo bandhigo nuxurka muhiimka ah ee goobtaada. Waxay si fiican uga shaqeysaa suuq-geynta iyo boggaga culculus.
Tani waa unug fudud oo halyey ah, qayb fudud oo qaabka jumbotron ah oo loogu yeedhayo feejignaan dheeri ah nuxurka ama macluumaadka.
- <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>
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> Tusaale bogga madaxa <small> Qoraal-hoosaadka madaxa </small></h1>
- </div>
Sida caadiga ah, Bootstrap's thumbnails waxaa loogu talagalay inay soo bandhigaan sawirro ku xiran oo leh calaamado loo baahan yahay ugu yar.
Waxoogaa calaamad ah oo dheeri ah, waxaa suurtogal ah in lagu daro nooc kasta oo ka mid ah waxyaabaha HTML sida cinwaannada, cutubyada, ama badhamada thumbnails.
thumbnails (horay.media-grid
u ahaa ilaa v1.4) waxay ku fiican yihiin xadhkaha 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 kastali
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 dambeyntii, qaybta thumbnails-ka waxay isticmaashaa fasallada nidaamka grid-ka-sida .span2
ama.span3
- si loo xakameeyo cabbirrada thumbnail-ka.
Sidii hore loo sheegay, calaamadaynta loo baahan yahay ee thumbnails waa mid fudud oo toosan. Waa kan eega habaynta caadiga ah ee sawirada ku xidhan :
- <ul class = "thumbnails" >
- <li class = "span4" >
- <a href = "#" class = "thumbnail" >
- <img data-src = "holder.js/300x200" alt = "" >
- </a>
- </li>
- ...
- </ul>
Wixii HTML ka kooban ee thumbnails, calaamadeyntu wax yar ayey isu beddeshaa. Si loo oggolaado nuxurka heerka xannibaadda meel kasta, waxaanu ku beddelannaa sidan <a>
oo kale:<div>
- <ul class = "thumbnails" >
- <li class = "span4" >
- <div class = "thumbnail" >
- <img data-src = "holder.js/300x200" alt = "" >
- <h3> Calaamadda thumbnail </h3>
- <p> Qoraalka sawirka thumbnail... </p>
- </div>
- </li>
- ...
- </ul>
Ku sahamin dhammaan xulashooyinkaaga fasallada kala duwan ee kala duwan ee aad diyaar u tahay. Waxa kale oo aad isku dari kartaa oo aad isku dari kartaa cabbirro kala duwan.
Ku duub qoraal kasta iyo badhanka cayrinta ikhtiyaarka ah ee .alert
fariinta digniinta aasaasiga ah.
- <div class = " feejignaan " >
- <button type = "button" class = "close" data-dismiss = "alert" > × </button>
- Digniin ! </strong> Hubinta ugu fiican ee naftaada, uma eka mid aad u wanaagsan.
- </div>
Mobile Safari iyo Mobile Opera browsers, marka lagu daro data-dismiss="alert"
sifada, waxay u baahan yihiin href="#"
ka saarida digniinaha marka la isticmaalayo <a>
sumadda.
- <a href = "#" class = "close" data-dismiss = "alert" > × </a>
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 dartaa type="button"
ama foomamkaagu ma soo gudbin karaan.
- <button type = "button" class = "close" data-dismiss = "alert" > × </button>
U isticmaal digniinaha jQuery plugin si deg deg ah oo sahlan u ceyrinta ogeysiisyada.
Fariimaha dhaadheer, kordhi suufka sare iyo hoose ee duubabka digniinta adiga oo ku daraya .alert-block
.
Hubinta ugu fiican ee naftaada, uma eka mid aad u wanaagsan. Nulla vitae elit libero, a pharetra augue. Preesent commodo cursus magna, vel selerisque nisl consectetur et.
- <div class = "digniinta digniin-block" >
- <button type = "button" class = "close" data-dismiss = "alert" > × </button>
- <h4> Digniin! </h4>
- Is hubinta ugu fiican, ma tihid...
- </div>
Ku dar xiisado ikhtiyaari ah si aad u bedesho macnaha digniinta.
- <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 = " ballaaran : 60 %; " ></ div>
- </div>
Wuxuu isticmaalaa gradient si uu u abuuro saamayn xariijimo ah. Lagama heli karo IE7-8
- <div class = "horumar-horumar-ku-soo-bax" >
- <div class = "bar" style = " ballac : 20 %; " ></ div>
- </div>
Ku dar .active
si .progress-striped
aad u dhaqaajiso xariijimaha midig ilaa bidix. Lama heli karo dhammaan noocyada IE.
- <div class = "horumar horu-socod-xariif firfircoon" >
- <div class = "bar" style = " ballac : 40 %; " ></ div>
- </div>
Dhig baararka badan oo isku mid .progress
ah si aad isugu dhejiso.
- <div class = "horumar" >
- <div class = "bar bar-guul" style = " ballaaran : 35 %; " ></div>
- <div class = "bar bar-warning" style = " ballaaran : 20 %; " </div>
- <div class = "bar-bar-danger" style = " ballaaran : 10 %; " </div>
- </div>
Baararka horusocodku waxay isticmaalaan qaar ka mid ah badhanka isku midka ah iyo xiisadaha digniinta ee qaababka joogtada ah.
- <div class = "progress progress-info" >
- <div class = "bar" style = " ballaaran : 20 % " ></ div>
- </div>
- <div class = "horumar horumar-guul" >
- <div class = "bar" style = " ballaaran : 40 % " ></ div>
- </div>
- <div class = "horumarka-horumarka digniinta" >
- <div class = "bar" style = " ballaaran : 60 % " ></ div>
- </div>
- <div class = "horumarka horumarka-khatar" >
- <div class = "bar" style = " ballaaran : 80 % " ></ div>
- </div>
Si la mid ah midabada adag, waxaan leenahay baararka horumarka xariijimaha kala duwan.
- <div class = "horumarka horumarka-info horu-socod-xariif" >
- <div class = "bar" style = " ballaaran : 20 % " ></ div>
- </div>
- <div class = "horumar horu-soco-guul-ku-socod-hor-u-socod" >
- <div class = "bar" style = " ballaaran : 40 % " ></ div>
- </div>
- <div class = "horumar horu-u-socod-digniin horu-u-socod-ku-duuban" >
- <div class = "bar" style = " ballaaran : 60 % " ></ div>
- </div>
- <div class = "horumar horu-u-socod-khatar-horumar-ku-dhac" >
- <div class = "bar" style = " ballaaran : 80 % " ></ div>
- </div>
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.
Noocyadii hore ee Internet Explorer 10 iyo Opera 12 ma taageeraan animations.
Qaababka shayga la taaban karo ee lagu dhisayo noocyo kala duwan oo ka kooban (sida faallooyinka blogka, Tweets, iwm) kuwaas oo leh muuqaal bidix ama midig ku toosan oo ay weheliso nuxur qoraal ah.
Warbaahinta caadiga ah waxay ogolaataa inay sabbayso shay warbaahineed (sawir, muuqaal, maqal) bidix ama midig ee block content.
- <div class = "media" >
- <a class = "pull-left" href = "#" >
- <img class = "media-object" data-src = "holder.js/64x64" >
- </a>
- <div class = "media-body" >
- <h4 class = "madax-madaxeed" > Ciwaanka warbaahinta </h4>
- ...
- <!-- Shay warbaahin buul leh -->
- <div class = "media" >
- ...
- </div>
- </div>
- </div>
Iyada oo waxoogaa calaamadayn dheeraad ah, waxaad isticmaali kartaa warbaahinta liiska gudaha (waxtar u leh mawduucyada faallooyinka ama liisaska maqaallada).
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus sclerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis.
- <ul class = "liiska warbaahinta" >
- <li class = "media" >
- <a class = "pull-left" href = "#" >
- <img class = "media-object" data-src = "holder.js/64x64" >
- </a>
- <div class = "media-body" >
- <h4 class = "madax-madaxeed" > Ciwaanka warbaahinta </h4>
- ...
- <!-- Shay warbaahin buul leh -->
- <div class = "media" >
- ...
- </div>
- </div>
- </li>
- </ul>
Isticmaal ceelka si sahlan oo saameyn ku leh curiyaha si aad u siiso saameyn gelinta.
- <div class = "wanaagsan" >
- ...
- </div>
Xakamaynta suufka iyo geesaha wareegsan oo leh laba fasal wax-beddeleyaal ikhtiyaari ah.
- <div class = "si fiican u weyn" >
- ...
- </div>
- <div class = "si fiican u-yar" >
- ...
- </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 = "#" > × </a>
Fasalo fudud, diirada saaraya bandhig yar ama habdhaqan.
Sabbeyn qayb bidix
- fasalka = "jiid-bidix"
- . bidix u jiid {
- sabayn : bidix ;
- }
Saxeex xubinta midig
- fasalka = "jiid-midig"
- . jiid - midig {
- sabayn : xaq ;
- }
U beddel midabka curiyaha#999
- fasalka = "la aamusay"
- . la aamusay {
- midabka : # 999;
- }
Nadiifi float
shay kasta
- class = "clearfix"
- . nadiifin {
- * zoom : 1 ;
- &: ka hor ,
- &: kadib {
- bandhig : miiska ;
- nuxurka : "" ;
- }
- &: kadib {
- cad : labadaba ;
- }
- }