Nneɛma du du pii a wotumi de di dwuma bio a wɔasisi de ama akwantu, kɔkɔbɔ, popovers, ne nea ɛkeka ho.
Toggleable, contextual menu a wɔde kyerɛ link ahorow a wɔahyehyɛ. Wɔde JavaScript plugin a ɛwɔ ase hɔ no yɛɛ nkitahodi .
- <ul class = "menu a ɛba fam" dwuma = "menu" aria-labelledby = "Menu a ɛba fam" >
- <li><a tabindex = "-1" href = "#" > Adeyɛ </a></li>
- <li><a tabindex = "-1" href = "#" > Adeyɛ foforo </a></li>
- <li><a tabindex = "-1" href = "#" > Biribi foforo wɔ ha </a></li>
- <li adesuakuw = "nkyekyɛmu" ></li>
- <li><a tabindex = "-1" href = "#" > Nkitahodi a wɔatew mu </a></li>
- </ul>
Sɛ wohwɛ dropdown menu no nkutoo a, HTML a wɔhwehwɛ no ni. Ɛsɛ sɛ wobɔ dropdown no trigger ne dropdown menu no mu .dropdown
, anaa element foforo a ɛpae mu ka position: relative;
. Afei yɛ menu no ara kwa.
- <div class = "a ɛwɔ ase hɔ" >
- <!-- Link anaa button a wode bɛdannan dropdown -->
- <ul class = "dropdown-menu" dwumadie = "menu" aria-a wɔde ahyɛnsodeɛ = "dLabel" >
- <li><a tabindex = "-1" href = "#" > Adeyɛ </a></li>
- <li><a tabindex = "-1" href = "#" > Adeyɛ foforo </a></li>
- <li><a tabindex = "-1" href = "#" > Biribi foforo wɔ ha </a></li>
- <li adesuakuw = "nkyekyɛmu" ></li>
- <li><a tabindex = "-1" href = "#" > Nkitahodi a wɔatew mu </a></li>
- </ul>
- </div> no
Hyehyɛ menu ahorow no wɔ nifa so na fa ka ho ka levels afoforo a ɛwɔ dropdowns ho.
Fa ka .pull-right
a ho .dropdown-menu
kɔ nifa so hyɛ dropdown menu no mu.
- <ul adesuakuw = "dropdown-menu twe-nifa" dwuma = "menu" aria-labelledby = "dLabel" >
- ...
- </ul>
Fa ka .disabled
a ho <li>
wɔ dropdown no mu na ama link no ayɛ adwuma.
- <ul class = "menu a ɛba fam" dwuma = "menu" aria-labelledby = "Menu a ɛba fam" >
- <li><a tabindex = "-1" href = "#" > Nkitahodi a ɛkɔ so daa </a></li>
- <li class = "wɔayɛ adwuma" ><a tabindex = "-1" href = "#" > Wɔagyae link </a></li>
- <li><a tabindex = "-1" href = "#" > Nkitahodi foforo </a></li>
- </ul>
Fa dropdown menus a ɛwɔ soro no ka ho, a ɛbɛda adi wɔ hover so te sɛ OS X de no, a markup a ɛnyɛ den bi ka ho. Fa ka .dropdown-submenu
biara li
ho wɔ dropdown menu a ɛwɔ hɔ dedaw mu ma automatic styling.
- <ul class = "dropdown-menu" dwumadie = "menu" aria-a wɔde ahyɛnsodeɛ = "dLabel" >
- ...
- <li class = "menu a ɛwɔ ase hɔ" >
- <a tabindex = "-1" href = "#" > Nneɛma pii a wobɛpaw </a>
- <ul class = "nsɛm a ɛwɔ ase hɔ" >
- ...
- </ul>
- </li>
- </ul>
Simple pagination inspired by Rdio, eye ma apps ne nhwehwɛmu aba. Block kɛse no yɛ den sɛ wobɛpa ho kyɛw, ɛnyɛ den sɛ wobɛsesa, na ɛma mmeae akɛse a wobɛbɔ.
- <div adesuakuw = "kratafa" >
- <ul> no
- <li><a href = "#" > Nea edi kan </a></li>
- <li><a href = "#" > 1 </a></li> na ɛwɔ hɔ
- <li><a href = "#" > 2 </a></li> na ɛwɔ hɔ
- <li><a href = "#" > 3 </a></li> na ɛwɔ hɔ
- <li><a href = "#" > 4 </a></li> na ɛwɔ hɔ
- <li><a href = "#" > 5 </a></li> na ɛwɔ hɔ
- <li><a href = "#" > Nea edi hɔ </a></li>
- </ul>
- </div> no
Links yɛ customizable ma tebea horow. Fa di dwuma .disabled
ma link ahorow a wuntumi klik so na .active
kyerɛ kratafa a ɛwɔ hɔ mprempren no.
- <div adesuakuw = "kratafa" >
- <ul> no
- <li adesuakuw = "wɔadi dɛm" ><a href = "#" > « </a></li> na ɛwɔ hɔ
- <li adesuakuw = "adwumayɛ" ><a href = "#" > 1 </a></li>
- ...
- </ul>
- </div> no
Wubetumi apaw swap out active anaa disabled anchors ama spans de ayi click functionality bere a wokura styles a woabɔ wo tirim no.
- <div adesuakuw = "kratafa" >
- <ul> no
- <li adesuakuw = "wɔadi dɛm" ><span> « </span></li> na ɛwɔ hɔ
- <li adesuakuw = "adwumayɛ" ><span> 1 </span></li>
- ...
- </ul>
- </div> no
Fancy kɛse anaa nketewa nkratafa? Fa .pagination-large
, .pagination-small
, anaa .pagination-mini
ka ho sɛ wopɛ sɛ wunya akɛse afoforo a.
- <div class = "kratafa krataafa-kɛse" >
- <ul> no
- ...
- </ul>
- </div> no
- <div adesuakuw = "kratafa" >
- <ul> no
- ...
- </ul>
- </div> no
- <div class = "kratafa krataafa-ketewa" >
- <ul> no
- ...
- </ul>
- </div> no
- <div class = "kratafa krataafa-mini" >
- <ul> no
- ...
- </ul>
- </div> no
Fa adesua ahorow abien a wopɛ no mu biako ka ho na sesa nkratafa link ahorow no nhyehyɛe: .pagination-centered
ne .pagination-right
.
- <div class = "kratafa nkratafa-mfinimfini" >
- ...
- </div> no
- <div class = "kratafa krataafa-nifa" >
- ...
- </div> no
Ntɛmntɛm a edi kan ne nea edi hɔ links ma simple pagination implementations a hann markup ne styles. Ɛyɛ papa ma nsɛmma nhoma a ɛnyɛ den te sɛ blog anaa nsɛmma nhoma.
Sɛnea wɔahyɛ no, pager no de link ahorow no si mfinimfini.
- <ul adesuakuw = "pager" >
- <li><a href = "#" > Nea atwam </a></li>
- <li><a href = "#" > Nea edi hɔ </a></li>
- </ul>
Sɛnea ɛbɛyɛ a, wubetumi de link biara ahyia afã horow no:
- <ul adesuakuw = "pager" >
- <li adesuakuw = "a atwam" >
- <a href = "#" > Nsɛm a wɔka kyerɛ; Mpanyimfo </a>
- </li>
- <li adesuakuw = "nea edi hɔ" >
- <a href = "#" > Nsɛm foforo → </a>
- </li>
- </ul>
Pager links nso de general .disabled
utility class a ɛfiri pagination no mu di dwuma.
- <ul adesuakuw = "pager" >
- <li class = "a wɔadi kan ayɛ adwuma" >
- <a href = "#" > Nsɛm a wɔka kyerɛ; Mpanyimfo </a>
- </li>
- ...
- </ul>
Nneɛma a wɔde kyerɛw nsɛm | Markup a wɔde hyɛ agyirae |
---|---|
Mfiaseɛ | <span class="label">Default</span> |
Nkunimdie | <span class="label label-success">Success</span> |
Kɔkɔbɔ | <span class="label label-warning">Warning</span> |
Ɛhia | <span class="label label-important">Important</span> |
Info | <span class="label label-info">Info</span> |
Inverse | <span class="label label-inverse">Inverse</span> |
Din | Nhwɛsoɔ | Markup a wɔde hyɛ agyirae |
---|---|---|
Mfiaseɛ | 1. 1. | <span class="badge">1</span> |
Nkunimdie | 2. 2. | <span class="badge badge-success">2</span> |
Kɔkɔbɔ | 4. 4. | <span class="badge badge-warning">4</span> |
Ɛhia | 6. 6 | <span class="badge badge-important">6</span> |
Info | 8 | <span class="badge badge-info">8</span> |
Inverse | 10. 10 | <span class="badge badge-inverse">10</span> |
Sɛnea ɛbɛyɛ a ɛbɛyɛ mmerɛw sɛ wode bedi dwuma no, nkyerɛwde ne badge ahorow no bɛhwe ase kɛkɛ (ɛnam CSS no :empty
paw so) bere a nsɛm biara nni mu no.
Ade a emu yɛ hare a ɛyɛ mmerɛw a wode bɛda nneɛma atitiriw adi wɔ wo wɛbsaet no so. Ɛyɛ adwuma yiye wɔ aguadi ne nsɛmma nhoma ahorow a emu nsɛm pii wom so.
Eyi yɛ hero unit a ɛnyɛ den, jumbotron-style component a ɛnyɛ den a wɔde twe adwene si nneɛma anaa nsɛm a wɔada no adi so kɛse.
- <div adesuakuw = "ɔkokodurufo-kuw" >
- <h1> Asɛmti </h1>
- <p> Nsɛmfua a wɔde kyerɛw nsɛm </p>
- <p> na ɛwɔ hɔ
- <a class = "btn btn-mfitiaseɛ btn-kɛseɛ" >
- Sua pii
- </a>
- </p> no
- </div> no
Shell a ɛnyɛ den ma an h1
to a ɛfata space out na segment afã horow a ɛwɔ kratafa bi so. Ɛbɛtumi de h1
's default small
, element no adi dwuma ne afã afoforo dodow no ara (a styles afoforo ka ho).
- <div class = "kratafa-atiri" >
- <h1> Nhwɛsoɔ krataafa asɛmti <small> Nsɛm ketewa ma atiri </small></h1>
- </div> no
Sɛnea wɔahyɛ no, wɔayɛ Bootstrap mfonini nketewa no sɛnea ɛbɛyɛ a ɛbɛkyerɛ mfonini ahorow a ɛwɔ abusuabɔ a ɛwɔ agyiraehyɛde kakraa bi a ɛho hia.
Sɛ wode markup kakra ka ho a, ɛyɛ yie sɛ wode HTML nsɛm biara te sɛ nsɛmti, nkyekyɛm, anaa bɔtɔn bɛka mfonini nketewa ho.
Mfonini nketewa (kan no na .media-grid
ɛkɔ soro kosi v1.4) yɛ papa ma mfonini anaa video ahorow a ɛwɔ grids, mfonini hwehwɛ aba, nneɛma a wɔtɔn wɔ sotɔɔ mu, portfolio ahorow, ne nea ɛkeka ho pii. Ebetumi ayɛ link ahorow anaasɛ static content.
Mfonini ketewaa a wɔde hyɛ agyirae no yɛ mmerɛw—a ul
a nneɛma dodow biara li
wom no nkutoo ne nea ɛho hia. Ɛsan nso yɛ super flexible, ɛma kwan ma biribiara a ɛwɔ mu a ɛwɔ markup kakra bi kɛkɛ a ɛbɛkyekyere wo nsɛm no.
Nea etwa to no, mfonini nketewa no fã no de grid nhyehyɛe adesua ahorow a ɛwɔ hɔ dedaw no di dwuma—te sɛ .span2
anaa .span3
—ma mfonini nketewa no nsusuwii ahorow sohwɛ.
Sɛnea yɛadi kan aka no, agyiraehyɛde a wɔhwehwɛ ma mfonini nketewa no yɛ hare na ɛyɛ tẽẽ. Ɛha na wobɛhwɛ default nhyehyɛe a ɛwɔ mfonini ahorow a wɔde abɔ mu no :
- <ul class = "mfonini nketewa" >
- <li adesuakuw = "span4" >
- <a href = "#" adesuakuw = "mfonini ketewa" >
- <img data-src = "ɔkurafo.js/300x200" alt = "" > . Ɔde ne nsa kyerɛɛ ne so, na ɔde ne nsa kyerɛɛ ne so bio
- </a>
- </li>
- ...
- </ul>
Sɛ wopɛ HTML nsɛm a wɔahyɛ da ayɛ wɔ mfonini nketewa mu a, agyiraehyɛde no sesa kakra. Sɛ yɛbɛma block level content kwan wɔ baabiara a, yɛsesa no <a>
ma <div>
like so:
- <ul class = "mfonini nketewa" >
- <li adesuakuw = "span4" >
- <div class = "mfonini ketewa" >
- <img data-src = "ɔkurafo.js/300x200" alt = "" > . Ɔde ne nsa kyerɛɛ ne so, na ɔde ne nsa kyerɛɛ ne so bio
- <h3> Mfonini ketewa no nkyerɛwde </h3>
- <p> Mfonini ketewa no ase... </p>
- </div> no
- </li>
- ...
- </ul>
Hwehwɛ wo akwan nyinaa mu denam grid adesua ahorow a ɛwɔ hɔ ma wo no so. Wubetumi nso de akɛse ahorow afrafra na woayɛ no pɛpɛɛpɛ.
Fa nsɛm biara ne dismiss button a wopɛ no kyekyere mu na woanya .alert
kɔkɔbɔ kɔkɔbɔ nkrasɛm titiriw bi.
- <div adesuakuw = "kɔkɔbɔ" >
- <button type = "button" class = "to" data-a wɔpow = "kɔbɔ" > × </button> no ho
- <strong> Kɔkɔbɔ! </strong> Best check yo self, wo nnyɛ fɛ dodo.
- </div> no
Mobile Safari ne Mobile Opera browser ahorow, a ɛka data-dismiss="alert"
su no ho no, hwehwɛ sɛ href="#"
wɔde kɔkɔbɔ ahorow a wɔpow bere a wɔde <a>
tag redi dwuma no.
- <a href = "#" adesuakuw = "to" data-dismiss = "kɔbɔ" > × </a>
Sɛnea ɛbɛyɛ a, wubetumi de <button>
element bi a ɛwɔ data attribute no adi dwuma, a yɛapaw sɛ yɛbɛyɛ ama yɛn docs no. Sɛ wode redi dwuma <button>
a, ɛsɛ sɛ wode ka ho type="button"
anaasɛ wo nkrataa no remfa mma.
- <button type = "button" class = "to" data-a wɔpow = "kɔbɔ" > × </button> no ho
Fa kɔkɔbɔ jQuery plugin no di dwuma ma kɔkɔbɔ ahorow a wobɛpow ntɛmntɛm na ɛnyɛ den.
Sɛ wopɛ nkrasɛm tenten a, ma padding a ɛwɔ kɔkɔbɔ wrapper no atifi ne ase no nyɛ kɛse denam .alert-block
.
Best check yo self, wo nnyɛ fɛ dodo. Nulla vitae elit libero, a ɛyɛ aduru a wɔde di dwuma wɔ ɔkwan a ɛfata so. Praesent commodo cursus magna, vel scelerisque nisl consectetur ne nea wɔde di dwuma wɔ ɔkwan a ɛyɛ nwonwa so.
- <div class = "kɔkɔbɔ kɔkɔbɔ-asiw" >
- <button type = "button" class = "to" data-a wɔpow = "kɔbɔ" > × </button> no ho
- <h4> Kɔkɔbɔ! </h4> no
- Best check yo self, wo nnyɛ...
- </div> no
Fa adesua ahorow a wopɛ ka ho na sesa kɔkɔbɔ bi nkyerɛase.
- <div class = "kɔkɔbɔ kɔkɔbɔ-mfomso" >
- ...
- </div> no
- <div class = "kɔkɔbɔ kɔkɔbɔ-nkonimdi" >
- ...
- </div> no
- <div class = "kɔkɔbɔ kɔkɔbɔ-nsɛm" >
- ...
- </div> no
Default nkɔso bar a ɛwɔ vertical gradient.
- <div adesuakuw = "nkɔso" >
- <div adesuakuw = "bar" kwan = " ntrɛwmu : 60 %; " ></div>
- </div> no
Ɔde gradient di dwuma de yɛ striped effect. Ɛnyɛ nea ɛwɔ IE7-8 mu.
- <div class = "nkɔso nkɔso-striped" >
- <div adesuakuw = "bar" kwan = " ntrɛwmu : 20 %; " ></div>
- </div> no
Fa ka .active
ho na .progress-striped
ama nsensanee no ayɛ adwuma wɔ nifa so akɔ benkum so. Ɛnyɛ nea ɛwɔ IE no nkyerɛase ahorow nyinaa mu.
- <div class = "nkɔso nkɔso-striped active" >
- <div adesuakuw = "bar" kwan = " ntrɛwmu : 40 %; " ></div>
- </div> no
Fa nnua pii gu biako mu na .progress
fa boaboa ano.
- <div adesuakuw = "nkɔso" >
- <div adesuakuw = "bar bar-nkonimdi" ɔkwan = " ntrɛwmu : 35 %; " ></div>
- <div class = "bar bar-kɔkɔbɔ" style = " trɛw : 20 %; " ></div>
- <div class = "bar bar-asiane" style = " ntrɛwmu : 10 %; " ></div>
- </div> no
Nkɔso bars de button ne kɔkɔbɔ adesua koro no ara bi di dwuma ma style ahorow a ɛkɔ so daa.
- <div class = "nkɔso nkɔso-nsɛm" >
- <div adesuakuw = "bar" kwan = " ntrɛwmu : 20 % " ></div>
- </div> no
- <div class = "nkɔso nkɔso-nkonimdi" >
- <div adesuakuw = "bar" kwan = " ntrɛwmu : 40 % " ></div>
- </div> no
- <div class = "nkɔso nkɔso-kɔkɔbɔ" >
- <div adesuakuw = "bar" kwan = " ntrɛwmu : 60 % " ></div>
- </div> no
- <div class = "nkɔso nkɔso-asiane" >
- <div adesuakuw = "bar" kwan = " ntrɛwmu : 80 % " ></div>
- </div> no
Te sɛ kɔla ahorow a ɛyɛ den no, yɛwɔ nkɔso nnua ahorow a ɛyɛ nsensanee.
- <div class = "nkɔso nkɔso-nsɛm nkɔso-striped" >
- <div adesuakuw = "bar" kwan = " ntrɛwmu : 20 % " ></div>
- </div> no
- <div class = "nkɔso nkɔso-nkonimdi nkɔso-striped" >
- <div adesuakuw = "bar" kwan = " ntrɛwmu : 40 % " ></div>
- </div> no
- <div class = "nkɔso nkɔso-kɔkɔbɔ nkɔso-striped" >
- <div adesuakuw = "bar" kwan = " ntrɛwmu : 60 % " ></div>
- </div> no
- <div class = "nkɔso nkɔso-asiane nkɔso-striped" >
- <div adesuakuw = "bar" kwan = " ntrɛwmu : 80 % " ></div>
- </div> no
Nkɔsoɔ bars de CSS3 gradients, nsakraeɛ, ne animations di dwuma de nya wɔn nsunsuansoɔ nyinaa. Saa nneɛma yi ntumi mmoa wɔ IE7-9 anaa Firefox dedaw no mu.
Nkyerɛase ahorow a edii kan sen Internet Explorer 10 ne Opera 12 no ntumi mmoa animations.
Abstract object styles a wɔde si nneɛma ahorow ahorow (te sɛ blog nsɛm, Tweets, ne nea ɛkeka ho) a ɛkyerɛ mfonini a ɛwɔ benkum anaa nifa a ɛka nsɛm a wɔakyerɛw ho.
Media a wɔde ahyɛ hɔ no ma kwan ma wɔde media ade (mfonini, video, ɔdio) kɔ benkum anaa nifa so wɔ nsɛm a wɔabɔ no mu.
- <div adesuakuw = "nsɛm ho amanneɛbɔ" >
- <a adesuakuw = "twe-benkum" href = "#" >
- <img adesuakuw = "media-ade" data-src = "kurafo.js/64x64" >
- </a>
- <div class = "nsɛm ho amanneɛbɔ-nipadua" >
- <h4 class = "media-asɛmti" > Nsɛm ho amanneɛbɔ asɛmti </h4>
- ...
- <!-- Nested media ade -->
- <div adesuakuw = "nsɛm ho amanneɛbɔ" >
- ...
- </div> no
- </div> no
- </div> no
Sɛ wode markup kakra ka ho a, wubetumi de media adi dwuma wɔ list mu (ɛho wɔ mfaso ma comment threads anaa articles lists).
Cras tena amet nibh libero, wɔ gravida nulla mu. Nulla vel metus scelerisque a wɔde di dwuma wɔ ɔkwan a ɛyɛ hu so. Cras purus odio, ahurututu a ɛwɔ ahurututu mu wɔ, tempus viverra turpis.
- <ul class = "nsɛm ho amanneɛbɔ-nkyerɛwee" >
- <li adesuakuw = "nsɛm ho amanneɛbɔ" >
- <a adesuakuw = "twe-benkum" href = "#" >
- <img adesuakuw = "media-ade" data-src = "kurafo.js/64x64" >
- </a>
- <div class = "nsɛm ho amanneɛbɔ-nipadua" >
- <h4 class = "media-asɛmti" > Nsɛm ho amanneɛbɔ asɛmti </h4>
- ...
- <!-- Nested media ade -->
- <div adesuakuw = "nsɛm ho amanneɛbɔ" >
- ...
- </div> no
- </div> no
- </li>
- </ul>
Fa abura no di dwuma sɛ nkɛntɛnso a ɛnyɛ den wɔ element bi so na ama no nsunsuanso a ɛwɔ mu.
- <div adesuakuw = "yiye" >
- ...
- </div> no
Control padding ne kurukuruwa ntwea so ne abien optional modifier adesuakuw.
- <div class = "wia yiye-kɛse" >
- ...
- </div> no
- <div class = "wiɛ yie-ketewa" >
- ...
- </div> no
Fa generic close icon no di dwuma ma pow nsɛm te sɛ modals ne kɔkɔbɔ ahorow.
- <button class = "to mu" > &mmere; </button> no ho
iOS mfiri ahorow hwehwɛ sɛ wode href="#"
for click events di dwuma sɛ wopɛ sɛ wode anchor di dwuma a.
- <a adesuakuw = "to" href = "#" > &mmere; </a>
Simple, focused classes ma nketewa ɔyɛkyerɛ anaa suban tweaks.
Float element bi benkum so
- class = "twe-benkum so".
- . twe - benkum { .
- float : benkum so ;
- } .
Float element bi nifa so
- class = "twe-nifa".
- . twe - nifa { .
- float : nifa so ;
- } .
Sesa element bi kɔla kɔ#999
- class = "wɔayɛ mum".
- . muted { .
- kɔla : #999;
- } .
Clear the float
wɔ element biara so
- class = "nsɛm a wɔasiesie".
- . clearfix { .
- * zoom : 1 na ɛyɛ ;
- &: ansa na , .
- &: akyi { .
- ɔyɛkyerɛ : pon ;
- emu nsɛm : "" ;
- } .
- &: akyi { .
- pefee : abien no nyinaa ;
- } .
- } .