SourceImbonerahamwe
Inyandiko n'ingero zo guhitamo-imbonerahamwe yimbonerahamwe (ukurikije imikoreshereze yabo muri plugin ya JavaScript) hamwe na Bootstrap.
Ingero
Bitewe no gukoresha cyane imbonerahamwe kurubuga rwa gatatu rwa widget nka kalendari hamwe nabatoranya amatariki, twateguye ameza yacu kugirango duhitemo . Gusa ongeraho urwego shingiro .table
kuri buriwese <table>
, hanyuma wongere hamwe nuburyo bwihariye cyangwa ibyiciro bitandukanye birimo guhindura ibyiciro.
Ukoresheje urutonde rwibanze rwibanze, dore uko .table
-bishingiye kumeza reba muri Bootstrap. Imiterere yimeza yose yarazwe muri Bootstrap 4 , bivuze ko ameza yose yashizwemo azandikwa muburyo bumwe nababyeyi.
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Larry |
Inyoni |
@twitter |
Urashobora kandi guhindura amabara-hamwe ninyandiko yoroheje kumurongo wijimye-hamwe .table-dark
.
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Larry |
Inyoni |
@twitter |
Imbonerahamwe yumutwe
Bisa nameza hamwe nameza yijimye, koresha ibyiciro bihindura .thead-light
cyangwa .thead-dark
kugirango <thead>
ugaragare urumuri cyangwa umukara wijimye.
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Larry |
Inyoni |
@twitter |
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Larry |
Inyoni |
@twitter |
Imirongo ikurikiranye
Koresha .table-striped
kugirango wongereho zebra-gukuramo kumurongo uwo ariwo wose kumurongo muri <tbody>
.
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Larry |
Inyoni |
@twitter |
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Larry |
Inyoni |
@twitter |
Imeza ihana imbibi
Ongeraho .table-bordered
imipaka kumpande zose zameza na selile.
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Inyoni |
@twitter |
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Inyoni |
@twitter |
Imeza itagira umupaka
Ongeraho .table-borderless
kumeza idafite imipaka.
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Inyoni |
@twitter |
.table-borderless
irashobora kandi gukoreshwa kumeza yijimye.
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Inyoni |
@twitter |
Imirongo yemewe
Ongeraho .table-hover
kugirango ushoboze kugendagenda kumurongo kumurongo kumeza muri a <tbody>
.
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Inyoni |
@twitter |
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Inyoni |
@twitter |
Imeza nto
Ongeraho .table-sm
kugirango imbonerahamwe irusheho gukata uduce twa selile mo kabiri.
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Inyoni |
@twitter |
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Inyoni |
@twitter |
Amasomo ajyanye
Koresha ibyiciro kugirango uhindure amabara kumurongo cyangwa selile.
Icyiciro |
Umutwe |
Umutwe |
Bikora |
Akagari |
Akagari |
Mburabuzi |
Akagari |
Akagari |
Ibanze |
Akagari |
Akagari |
Secondary |
Akagari |
Akagari |
Intsinzi |
Akagari |
Akagari |
Akaga |
Akagari |
Akagari |
Iburira |
Akagari |
Akagari |
Amakuru |
Akagari |
Akagari |
Umucyo |
Akagari |
Akagari |
Umwijima |
Akagari |
Akagari |
Imiterere isanzwe yimbonerahamwe ntishobora kuboneka hamwe nameza yijimye, icyakora, urashobora gukoresha inyandiko cyangwa ibikoresho byingenzi kugirango ugere kumiterere isa.
# |
Umutwe |
Umutwe |
1 |
Akagari |
Akagari |
2 |
Akagari |
Akagari |
3 |
Akagari |
Akagari |
4 |
Akagari |
Akagari |
5 |
Akagari |
Akagari |
6 |
Akagari |
Akagari |
7 |
Akagari |
Akagari |
8 |
Akagari |
Akagari |
9 |
Akagari |
Akagari |
Gutanga ibisobanuro kubuhanga bufasha
Gukoresha ibara kugirango wongere ibisobanuro bitanga gusa icyerekezo cyerekana, kitazashyikirizwa abakoresha tekinoroji ifasha - nk'abasoma ecran. Menya neza ko amakuru yerekanwe n'ibara agaragara uhereye kubirimo ubwabyo (urugero: inyandiko igaragara), cyangwa bigashyirwa muburyo butandukanye, nk'inyandiko y'inyongera ihishe hamwe .sr-only
n'ishuri.
Kora imbonerahamwe yitabiriwe .table
no gupfunyika icyaricyo cyose, utume imbonerahamwe izenguruka .table-responsive{-sm|-md|-lg|-xl}
itambitse kuri buri cyerekezo max-width
kigera kuri (ariko utabariyemo) 576px, 768px, 992px, na 1120px.
Menya ko kuva mushakisha zidashyigikiye urutonde rwibibazo , dukora hafi yimbibi za prefixes min-
hamwemax-
na kureba hamwe nubugari bwibice (bishobora kugaragara mubihe bimwe na bimwe kubikoresho byo hejuru-dpi, urugero) dukoresheje indangagaciro zifite ubusobanuro bunoze bwo kugereranya. .
Ibisobanuro
Imikorere <caption>
nkumutwe kumeza. Ifasha abakoresha hamwe nabasomyi ba ecran kubona imbonerahamwe no kumva icyo ivuga no guhitamo niba bashaka kuyisoma.
Urutonde rwabakoresha
# |
Ubwa mbere |
Icya nyuma |
Koresha |
1 |
Ikimenyetso |
Otto |
@mdo |
2 |
Yakobo |
Thornton |
@fat |
3 |
Larry |
Inyoni |
@twitter |
Imbonerahamwe isubiza
Imbonerahamwe isubiza yemerera imbonerahamwe kuzenguruka mu buryo butambitse kandi byoroshye. Kora imbonerahamwe iyo ari yo yose isubiza ibintu byose ureba .table
hamwe .table-responsive
. Cyangwa, hitamo intera ntarengwa yo kugira imbonerahamwe isubiza hejuru ukoresheje .table-responsive{-sm|-md|-lg|-xl}
.
Gukata neza / guhagarika
Imbonerahamwe ishubije ikoresha overflow-y: hidden
, ikuraho ibintu byose birenze hepfo cyangwa hejuru yimeza. By'umwihariko, ibi birashobora gukuramo ibice byamanutse hamwe nandi mashyaka ya gatatu.
Buri gihe witabira
Hirya no hino, koresha .table-responsive
kumeza utambitse.
# |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
1 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
2 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
3 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Ibice byihariye
Koresha .table-responsive{-sm|-md|-lg|-xl}
nkuko bikenewe kugirango ukore imbonerahamwe yishura kugeza kumurongo runaka. Uhereye kuri ibyo bice no hejuru, imbonerahamwe izitwara bisanzwe kandi ntizunguruka.
Izi mbonerahamwe zishobora kugaragara nkizimenetse kugeza uburyo bwo gusubiza bwakoreshejwe mubugari bwihariye bwo kureba.
# |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
1 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
2 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
3 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
# |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
1 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
2 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
3 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
# |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
1 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
2 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
3 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
# |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
Umutwe |
1 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
2 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
3 |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |
Akagari |