Dokumentazzjoni u eżempji għall-grafika opt-in tat-tabelli (minħabba l-użu prevalenti tagħhom fil-plugins JavaScript) b'Bootstrap.
Eżempji
Minħabba l-użu mifrux tat-tabelli f'widgets ta' partijiet terzi bħall-kalendarji u l-ġbir tad-data, iddisinna t-tabelli tagħna biex ikunu opt-in . Żid biss il-klassi bażi .tablegħal kwalunkwe <table>, imbagħad testendi bi stili tad-dwana jew il-klassijiet varji ta 'modifikaturi inklużi tagħna.
Bl-użu tal-markup tat-tabella l-aktar bażiku, hawn kif .tablejidhru t-tabelli bbażati fuq Bootstrap. L-istili tal-mejda kollha jintirtu f'Bootstrap 4 , li jfisser li kwalunkwe tabelli nested se jiġu stilati bl-istess mod bħall-ġenitur.
Żid .table-borderedgħall-fruntieri fuq in-naħat kollha tat-tabella u ċ-ċelloli.
#
L-ewwel
L-aħħar
Manku
1
Mark
Otto
@mdo
2
Ġakobb
Thornton
@xaħam
3
Larry l-Għasfur
@twitter
<tableclass="table table-bordered"><thead><tr><thscope="col">#</th><thscope="col">First</th><thscope="col">Last</th><thscope="col">Handle</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
#
L-ewwel
L-aħħar
Manku
1
Mark
Otto
@mdo
2
Ġakobb
Thornton
@xaħam
3
Larry l-Għasfur
@twitter
<tableclass="table table-bordered table-dark"><thead><tr><thscope="col">#</th><thscope="col">First</th><thscope="col">Last</th><thscope="col">Handle</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
Mejda bla fruntieri
Żid .table-borderlessgħal mejda mingħajr fruntieri.
#
L-ewwel
L-aħħar
Manku
1
Mark
Otto
@mdo
2
Ġakobb
Thornton
@xaħam
3
Larry l-Għasfur
@twitter
<tableclass="table table-borderless"><thead><tr><thscope="col">#</th><thscope="col">First</th><thscope="col">Last</th><thscope="col">Handle</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
.table-borderlessjista 'jintuża wkoll fuq imwejjed skuri.
#
L-ewwel
L-aħħar
Manku
1
Mark
Otto
@mdo
2
Ġakobb
Thornton
@xaħam
3
Larry l-Għasfur
@twitter
<tableclass="table table-borderless table-dark"><thead><tr><thscope="col">#</th><thscope="col">First</th><thscope="col">Last</th><thscope="col">Handle</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
Ringieli hoverable
Żid .table-hoverbiex tippermetti stat ta' hover fuq ringieli tal-mejda fi ħdan <tbody>.
#
L-ewwel
L-aħħar
Manku
1
Mark
Otto
@mdo
2
Ġakobb
Thornton
@xaħam
3
Larry l-Għasfur
@twitter
<tableclass="table table-hover"><thead><tr><thscope="col">#</th><thscope="col">First</th><thscope="col">Last</th><thscope="col">Handle</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
#
L-ewwel
L-aħħar
Manku
1
Mark
Otto
@mdo
2
Ġakobb
Thornton
@xaħam
3
Larry l-Għasfur
@twitter
<tableclass="table table-hover table-dark"><thead><tr><thscope="col">#</th><thscope="col">First</th><thscope="col">Last</th><thscope="col">Handle</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
Mejda żgħira
Żid .table-smbiex tagħmel it-tabelli aktar kompatti billi taqta' l-ikkuttunar taċ-ċelluli bin-nofs.
#
L-ewwel
L-aħħar
Manku
1
Mark
Otto
@mdo
2
Ġakobb
Thornton
@xaħam
3
Larry l-Għasfur
@twitter
<tableclass="table table-sm"><thead><tr><thscope="col">#</th><thscope="col">First</th><thscope="col">Last</th><thscope="col">Handle</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
#
L-ewwel
L-aħħar
Manku
1
Mark
Otto
@mdo
2
Ġakobb
Thornton
@xaħam
3
Larry l-Għasfur
@twitter
<tableclass="table table-sm table-dark"><thead><tr><thscope="col">#</th><thscope="col">First</th><thscope="col">Last</th><thscope="col">Handle</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><tdcolspan="2">Larry the Bird</td><td>@twitter</td></tr></tbody></table>
Klassijiet kuntestwali
Uża klassijiet kuntestwali biex ikkulurit ringieli tat-tabella jew ċelloli individwali.
Klassi
Intestatura
Intestatura
Attiva
Ċellula
Ċellula
Default
Ċellula
Ċellula
Primarja
Ċellula
Ċellula
Sekondarja
Ċellula
Ċellula
Suċċess
Ċellula
Ċellula
Periklu
Ċellula
Ċellula
Twissija
Ċellula
Ċellula
Info
Ċellula
Ċellula
Dawl
Ċellula
Ċellula
Dlam
Ċellula
Ċellula
<!-- On rows --><trclass="table-active">...</tr><trclass="table-primary">...</tr><trclass="table-secondary">...</tr><trclass="table-success">...</tr><trclass="table-danger">...</tr><trclass="table-warning">...</tr><trclass="table-info">...</tr><trclass="table-light">...</tr><trclass="table-dark">...</tr><!-- On cells (`td` or `th`) --><tr><tdclass="table-active">...</td><tdclass="table-primary">...</td><tdclass="table-secondary">...</td><tdclass="table-success">...</td><tdclass="table-danger">...</td><tdclass="table-warning">...</td><tdclass="table-info">...</td><tdclass="table-light">...</td><tdclass="table-dark">...</td></tr>
Varjanti regolari fl-isfond tal-mejda mhumiex disponibbli mat-tabella skura, madankollu, tista 'tuża test jew utilitajiet fl-isfond biex tikseb stili simili.
#
Intestatura
Intestatura
1
Ċellula
Ċellula
2
Ċellula
Ċellula
3
Ċellula
Ċellula
4
Ċellula
Ċellula
5
Ċellula
Ċellula
6
Ċellula
Ċellula
7
Ċellula
Ċellula
8
Ċellula
Ċellula
9
Ċellula
Ċellula
<!-- On rows --><trclass="bg-primary">...</tr><trclass="bg-success">...</tr><trclass="bg-warning">...</tr><trclass="bg-danger">...</tr><trclass="bg-info">...</tr><!-- On cells (`td` or `th`) --><tr><tdclass="bg-primary">...</td><tdclass="bg-success">...</td><tdclass="bg-warning">...</td><tdclass="bg-danger">...</td><tdclass="bg-info">...</td></tr>
Twassal tifsira għal teknoloġiji ta' assistenza
L-użu tal-kulur biex iżżid it-tifsira jipprovdi biss indikazzjoni viżwali, li mhux se tingħata lill-utenti ta’ teknoloġiji ta’ assistenza – bħal screen readers. Kun żgur li l-informazzjoni indikata bil-kulur hija jew ovvja mill-kontenut innifsu (eż. it-test viżibbli), jew tkun inkluża permezz ta' mezzi alternattivi, bħal test addizzjonali moħbi mal- .sr-onlyklassi.
Oħloq tabelli li jirrispondu billi tgeżwer kwalunkwe .tableb' .table-responsive{-sm|-md|-lg|-xl}, u tagħmel it-tabella tiskrollja orizzontalment f'kull max-widthbreakpoint ta' sa (iżda mhux inkluż) 576px, 768px, 992px, u 1120px, rispettivament.
Innota li peress li l-browsers bħalissa ma jappoġġjawx
mistoqsijiet dwar il-kuntest tal-firxa , naħdmu madwar il-limitazzjonijiet ta'
min-u max-prefissi u viewports b'wisgħat frazzjonali (li jistgħu jseħħu taħt ċerti kundizzjonijiet fuq apparati b'dpi għolja, pereżempju) billi nużaw valuri bi preċiżjoni ogħla għal dawn il-paraguni. .
Captions
A <caption>jiffunzjona bħal intestatura għal tabella. Jgħin lill-utenti bi screen readers biex isibu tabella u jifhmu dwar xiex tkun u jiddeċiedu jekk iridux jaqrawha.
Lista ta' utenti
#
L-ewwel
L-aħħar
Manku
1
Mark
Otto
@mdo
2
Ġakobb
Thornton
@xaħam
3
Larry
l-ghasfur
@twitter
<tableclass="table"><caption>List of users</caption><thead><tr><thscope="col">#</th><thscope="col">First</th><thscope="col">Last</th><thscope="col">Handle</th></tr></thead><tbody><tr><thscope="row">1</th><td>Mark</td><td>Otto</td><td>@mdo</td></tr><tr><thscope="row">2</th><td>Jacob</td><td>Thornton</td><td>@fat</td></tr><tr><thscope="row">3</th><td>Larry</td><td>the Bird</td><td>@twitter</td></tr></tbody></table>
Tabelli li jirrispondu
Tabelli li jirrispondu jippermettu li t-tabelli jiġu skrollati orizzontalment b'faċilità. Agħmel kwalunkwe mejda li tirreaġixxi fil-viewports kollha billi tgeżwer .tableb ' .table-responsive. Jew, agħżel breakpoint massimu li bih ikollok tabella li tirrispondi sa billi tuża .table-responsive{-sm|-md|-lg|-xl}.
Qtugħ/qtugħ vertikali
It-tabelli li jirrispondu jagħmlu użu minn overflow-y: hidden, li jaqta' kull kontenut li jmur lil hinn mit-truf ta' isfel jew ta' fuq tat-tabella. B'mod partikolari, dan jista' jaqtgħu menus dropdown u widgets oħra ta 'partijiet terzi.
Dejjem jirrispondi
F'kull breakpoint, uża .table-responsivegħal tabelli li tiskrolljaw orizzontalment.
Uża .table-responsive{-sm|-md|-lg|-xl}kif meħtieġ biex toħloq tabelli responsivi sa breakpoint partikolari. Minn dak il-breakpoint u 'l fuq, it-tabella se taġixxi b'mod normali u mhux tiskrollja orizzontalment.
Dawn it-tabelli jistgħu jidhru mkissra sakemm l-istili reattivi tagħhom japplikaw f'wisgħat ta' viewport speċifiċi.