Wɔde nneɛma du du pii a wotumi de di dwuma bio ahyɛ Bootstrap mu de ama akwantu, kɔkɔbɔ, popovers, ne nea ɛkeka ho pii.
Ultra simplistic na minimally styled pagination inspired by Rdio, kɛse 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ɔ.
Links yɛ customizable na ɛyɛ adwuma wɔ tebea horow bi mu ne adesuakuw a ɛfata. .disabled
sɛ wopɛ link ahorow a wuntumi nkɔ so ne .active
krataafa a ɛwɔ hɔ mprempren.
Fa adesuakuw abien a wopɛ no mu biara ka ho na sesa nkratafa nkitahodi ahorow no nhyehyɛe: .pagination-centered
ne .pagination-right
.
Default pagination component no yɛ nea ɛyɛ mmerɛw na ɛyɛ adwuma wɔ nsakrae dodow bi mu.
Wɔkyekyere no <div>
, nkratafa no yɛ <ul>
.
- <div adesuakuw = "kratafa" >
- <ul> no
- <li><a href = "#" > Nea edi kan </a></li>
- <li adesuakuw = "adwumayɛ" >
- <a href = "#" > 1 </a> na ɛwɔ hɔ
- </li>
- <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 = "#" > Nea edi hɔ </a></li>
- </ul>
- </div> no
Pager fã no yɛ link ahorow a wɔahyehyɛ ama pagination dwumadie a ɛnyɛ den a ɛwɔ agyiraehyɛdeɛ a ɛyɛ hare ne mpo styles a ɛyɛ hare. Ɛyɛ papa ma nsɛmma nhoma a ɛnyɛ den te sɛ blog anaa nsɛmma nhoma.
Pager links nso de general .disabled
class a efi pagination no mu no di dwuma.
Sɛnea wɔahyɛ no, pager no de link ahorow no si mfinimfini.
- <ul adesuakuw = "pager" >
- <li> no
- <a href = "#" > Nea atwam </a>
- </li>
- <li> no
- <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>
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> |
Badge yɛ nneɛma nketenkete a ɛnyɛ den a wɔde kyerɛ ade bi anaa akontaabu bi. Wɔtaa hu wɔ email clients te sɛ Mail.app anaa mobile apps so ma push notifications.
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> |
Bootstrap de ade a emu yɛ hare, ɛyɛ mmerɛw a wɔfrɛ no hero unit ma de kyerɛ nneɛma a ɛwɔ wo site no so. Ɛyɛ adwuma yiye wɔ aguadi ne nsɛmma nhoma ahorow a emu nsɛm pii wom so.
Fa wo nsɛm no kyekyere div
like so:
- <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
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.
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 </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 = "span3" >
- <a href = "#" adesuakuw = "mfonini ketewa" >
- <img src = "Ɔkwan a wɔfa so yɛ adwuma no/260x180" alt = "" >
- </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 = "span3" >
- <div class = "mfonini ketewa" >
- <img src = "Ɔkwan a wɔfa so yɛ adwuma no/260x180" alt = "" >
- <h5> Mfonini ketewa no nkyerɛwde </h5>
- <p> Nsɛm a wɔakyerɛw wɔ ha yi ara... </p>
- </div> no
- </li>
- ...
- </ul>
Bootstrap 2 no, yɛama base class no ayɛ mmerɛw: .alert
sen sɛ yɛbɛma .alert-message
. Yɛatew agyiraehyɛde a ɛba fam koraa a wɔhwehwɛ nso so—dabi <p>
na ɛho hia default so, akyi no <div>
nkutoo .
Sɛ wopɛ sɛ wonya ade a ɛyɛ den a ɛwɔ koodu kakraa bi a, yɛayi nsonsonoe hwɛ a ɛfa block alerts, nkrasɛm a ɛba ne padding pii ne mpɛn pii no nsɛm pii. Adesuakuw no nso asesa ayɛ no .alert-block
.
Bootstrap de jQuery plugin kɛseɛ bi ba a ɛboa kɔkɔbɔ nkrasɛm, ɛma sɛ wobɛpo no ntɛmntɛm na ɛnyɛ den.
Wrap wo nkra ne optional close icon wɔ div a simple class.
- <div adesuakuw = "kɔkɔbɔ" >
- <button class = "to" data-dismiss = "kɔbɔ" > × </button>
- <strong> Kɔkɔbɔ! </strong> Best check yo self, wo nnyɛ fɛ dodo.
- </div> no
Ti a ɛwɔ soro! iOS mfiri ahorow hwehwɛ sɛ href="#"
wɔde kɔkɔbɔ ahorow a wɔpow no. Hwɛ hu sɛ wode ne data attribute no bɛka ho ama anchor close icons. 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.
Ɛnyɛ den sɛ wobɛtrɛw gyinapɛn kɔkɔbɔ nkra no mu denam adesua ahorow abien a wopɛ so: .alert-block
ma padding ne nsɛm a wɔde di dwuma pii ne .alert-heading
asɛmti a ɛne no hyia.
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" >
- <a class = "to" data-dismiss = "kɔbɔ" href = "#" > × </a>
- <h4 class = "alert-heading" > Kɔkɔbɔ! </h4> no
- Best check yo self, wo nnyɛ...
- </div> no
- <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".
- style = " ntrɛwmu : 60 %; " ></div>
- </div> no
Ɔde gradient di dwuma de yɛ striped effect (IE nni hɔ).
- <div class = "nkɔso nkɔso-striped" >
- <div adesuakuw = "bar".
- style = " ntrɛwmu : 20 %; " ></div>
- </div> no
Fa striped nhwɛso no na ɛma ɛyɛ animated (no IE).
- <div class = "nkɔso nkɔso-striped."
- a ɛyɛ adwuma" >
- <div adesuakuw = "bar".
- style = " ntrɛwmu : 40 %; " ></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.
Te sɛ kɔla ahorow a ɛyɛ den no, yɛwɔ nkɔso nnua ahorow a ɛyɛ nsensanee.
Nkɔsoɔ bars de CSS3 nsakraeɛ di dwuma, enti sɛ wo dynamically sesa ne tɛtrɛtɛ denam javascript so a, ɛbɛsesa ne kɛseɛ yie.
Sɛ wode .active
adesua no di dwuma a, wo .progress-striped
nkɔso nnua no bɛma nsensanee no ayɛ adwuma wɔ benkum so akɔ nifa so.
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.
Opera ne IE ntumi mmoa animations saa bere yi.
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
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 hwehwɛ href="#" ma click events sɛ wopɛ sɛ wode anchor di dwuma a.
- <a adesuakuw = "to" href = "#" > &mmere; </a>