Nnwinnade ahorow
Nwoma ne nhwɛsoɔ a ɛfa opt-in styling of tables (esiane wɔn a wɔde di dwuma abu so wɔ JavaScript plugins mu nti) ne Bootstrap.
Nhwɛso ahorow
Esiane sɛ wɔde tables di dwuma kɛse wɔ third-party widgets te sɛ kalenda ne date pickers so nti, yɛayɛ yɛn tables no sɛ ɛbɛyɛ opt-in . Just add the base class .table
to any <table>
, afei trɛw mu ne custom styles anaa yɛn ahorow ahorow a ɛka ho modifier classes.
Sɛ wode table markup a ɛyɛ mfitiaseɛ paa di dwuma a, ɛha na .table
-gyina tables hwɛ wɔ Bootstrap mu. Table styles nyinaa wɔ agyapadeɛ wɔ Bootstrap 4 , a ɛkyerɛ sɛ nested tables biara bɛ styled wɔ ɔkwan korɔ no ara so sɛdeɛ ɔwofoɔ no yɛ no.
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry na ɔkyerɛwee | Anomaa no | @twitter so |
Wubetumi nso adan kɔla ahorow no—a wode nsɛm a emu yɛ hare ahyɛ akyi a ɛyɛ sum—de .table-dark
.
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry na ɔkyerɛwee | Anomaa no | @twitter so |
Table ti a wobetumi apaw
Te sɛ tables ne tables tuntum no, fa modifier classes no di dwuma .thead-light
anaasɛ .thead-dark
ma <thead>
s yɛ hann anaa tuntum gray.
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry na ɔkyerɛwee | Anomaa no | @twitter so |
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry na ɔkyerɛwee | Anomaa no | @twitter so |
Ntrɛwmu a ɛwɔ nsensanee
Fa di dwuma .table-striped
de zebra-striping ka table row biara a ɛwɔ <tbody>
.
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry na ɔkyerɛwee | Anomaa no | @twitter so |
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry na ɔkyerɛwee | Anomaa no | @twitter so |
Ɔpon a ɛwɔ hye so
Fa ka ho .table-bordered
ma borders wɔ table no afã nyinaa ne cells.
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry Anomaa no | @twitter so |
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry Anomaa no | @twitter so |
Pon a enni hye so
Fa ka ho .table-borderless
ma pon a enni ahye.
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry Anomaa no | @twitter so |
.table-borderless
wobetumi de adi dwuma nso wɔ pon a ɛyɛ sum so.
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry Anomaa no | @twitter so |
Hoverable row ahorow
Fa ka .table-hover
ho na ama hover tebea bi ayɛ adwuma wɔ table rows a ɛwɔ a <tbody>
.
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry Anomaa no | @twitter so |
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry Anomaa no | @twitter so |
Pon ketewaa bi
Fa ka .table-sm
ho na ama pon ahorow no ayɛ ketewaa denam cell padding a wubetwitwa mu abien no so.
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry Anomaa no | @twitter so |
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry Anomaa no | @twitter so |
Adesua ahorow a ɛfa nsɛm a ɛfa ho
Fa nsɛm a ɛfa ho adesua ahorow di dwuma de kɔla pon row anaa nkwammoaa ankorankoro.
Klaase | Asɛmti | Asɛmti |
---|---|---|
Asɔ | Nnaduafie | Nnaduafie |
Mfiaseɛ | Nnaduafie | Nnaduafie |
Mfiaseɛ | Nnaduafie | Nnaduafie |
Nea ɛto so abien | Nnaduafie | Nnaduafie |
Nkunimdie | Nnaduafie | Nnaduafie |
Ɔhaw a ɛbɛtumi aba | Nnaduafie | Nnaduafie |
Kɔkɔbɔ | Nnaduafie | Nnaduafie |
Info | Nnaduafie | Nnaduafie |
Kanea | Nnaduafie | Nnaduafie |
Sum | Nnaduafie | Nnaduafie |
Daa table akyi variants nni hɔ ne dark table, nanso, wubetumi de text anaa background utilities adi dwuma de anya styles a ɛte saa ara.
# . | Asɛmti | Asɛmti |
---|---|---|
1. 1. | Nnaduafie | Nnaduafie |
2. 2. | Nnaduafie | Nnaduafie |
3. 3 | Nnaduafie | Nnaduafie |
4. 4. | Nnaduafie | Nnaduafie |
5. 5 | Nnaduafie | Nnaduafie |
6. 6 | Nnaduafie | Nnaduafie |
7. 7 | Nnaduafie | Nnaduafie |
8 | Nnaduafie | Nnaduafie |
9. 9 | Nnaduafie | Nnaduafie |
Ntease a wɔde bɛma mfiridwuma ahorow a ɛboa
Kɔla a wɔde di dwuma de ntease ka ho no ma wonya sɛnkyerɛnne a wotumi hu nkutoo, a wɔremfa nkɔma wɔn a wɔde mfiridwuma a ɛboa di dwuma – te sɛ screen akenkanfo. Hwɛ sɛ nsɛm a wɔde kɔla no kyerɛ no da adi pefee fi emu nsɛm no ankasa mu (sɛ nhwɛso no, nsɛm a wotumi hu no), anaasɛ wɔde bɛka ho denam akwan foforo so, te sɛ nsɛm foforo a wɔde asie ne .sr-only
adesuakuw no mu.
Yɛ mmuaeɛ pon denam biara .table
a wode .table-responsive{-sm|-md|-lg|-xl}
, ma pon no nkɔ soro tẽẽ wɔ max-width
breakpoint biara a ɛkɔ (nanso ɛnka ho) 576px, 768px, 992px, ne 1120px, sɛnea ɛte biara.
Hyɛ no nsow sɛ esiane sɛ mprempren browser ahorow ntumi mmoa range context queries , yɛyɛ adwuma twa anohyeto ahorow a ɛwɔ min-
ne max-
prefixes ne viewports a ɛwɔ fractional widths (a ebetumi aba wɔ tebea horow bi mu wɔ high-dpi mfiri ahorow so, sɛ nhwɛso no) ho dwuma denam values a ɛwɔ pɛpɛɛpɛyɛ a ɛkorɔn a yɛde di dwuma ma saa ntotoho ahorow yi so .
Nsɛm a wɔakyerɛw wɔ ase
A <caption>
yɛ adwuma te sɛ asɛmti a wɔde kyerɛ pon bi. Ɛboa wɔn a wɔde di dwuma a wɔwɔ screen readers no ma wonya pon na wɔte nea ɛfa ho ase na wosi gyinae sɛ wɔpɛ sɛ wɔkenkan anaa.
# . | Deɛ ɛdi kan | Twa toɔ | Di ho dwuma |
---|---|---|---|
1. 1. | Marko | Otto na ɔkyerɛwee | @mdo na ɔkyerɛwee |
2. 2. | Yakob | Thornton na ɔkyerɛwee | @kɛseɛ |
3. 3 | Larry na ɔkyerɛwee | Anomaa no | @twitter so |
Nnwom a wɔde bua nsɛm
Table ahorow a ɛyɛ mmuae ma wotumi twetwe table ahorow no tẽẽ a ɛnyɛ den. Ma pon biara nyɛ adwuma wɔ viewports nyinaa so denam a wode bɛkyekyere .table
so .table-responsive
. Anaasɛ, paw breakpoint a ɛsen biara a wode benya pon a ɛyɛ mmuae denam .table-responsive{-sm|-md|-lg|-xl}
.
Vertical clipping/twitwa mu
Responsive tables make use of overflow-y: hidden
, a ɛtwitwa nsɛm biara a ɛkɔ akyiri sen table no ase anaa atifi anoano. Titiriw no, eyi betumi atwitwa dropdown menus ne afoforo widgets afoforo so.
Bere nyinaa yɛ aso
Wɔ breakpoint biara mu no, fa di dwuma .table-responsive
ma pon ahorow a ɛrekɔ soro no.
# . | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti |
---|---|---|---|---|---|---|---|---|---|
1. 1. | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
2. 2. | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
3. 3 | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
Breakpoint pɔtee bi
Fa di dwuma .table-responsive{-sm|-md|-lg|-xl}
sɛnea ɛho hia de yɛ mmuae pon ahorow kosi breakpoint pɔtee bi. Efi saa breakpoint no ne soro no, pon no bɛyɛ n’ade sɛnea ɛsɛ na ɛrentwetwe nkɔ soro.
Saa tables yi betumi ayɛ te sɛ nea abubu kosi sɛ wɔn mmuae kwan ahorow no bedi dwuma wɔ viewport ntrɛwmu pɔtee bi mu.
# . | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti |
---|---|---|---|---|---|---|---|---|
1. 1. | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
2. 2. | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
3. 3 | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
# . | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti |
---|---|---|---|---|---|---|---|---|
1. 1. | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
2. 2. | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
3. 3 | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
# . | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti |
---|---|---|---|---|---|---|---|---|
1. 1. | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
2. 2. | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
3. 3 | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
# . | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti | Asɛmti |
---|---|---|---|---|---|---|---|---|
1. 1. | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
2. 2. | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |
3. 3 | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie | Nnaduafie |