SourceMatafura
Zvinyorwa uye mienzaniso yekusarudza-mukati styling yematafura (zvichipiwa kushandiswa kwavo kwakanyanya muJavaScript plugins) neBootstrap.
Mienzaniso
Nekuda kwekushandiswa kwakatekeshera kwematafura pamawijeti ebato rechitatu semakarenda nevanotora mazuva, takagadzira matafura edu kuti asangane . Ingo wedzera base kirasi .table
kune chero <table>
, wobva wawedzera nemaitiro etsika kana edu akasiyana anosanganisirwa modifier makirasi.
Uchishandisa yakanyanya kukosha tafura markup, heino maitiro .table
-akavakirwa matafura anotarisa muBootstrap. Ese masitayera etafura anogarwa nhaka muBootstrap 4 , zvichireva kuti chero matafura anested achaitwa nenzira yakafanana nemubereki.
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry |
Shiri |
@twitter |
Iwe unogona zvakare kushandura mavara-nemavara akajeka pane yakasviba kumashure-ne .table-dark
.
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry |
Shiri |
@twitter |
Zvisarudzo zvemusoro wetafura
Zvakafanana nematafura nematafura akasviba, shandisa makirasi ekugadzirisa .thead-light
kana .thead-dark
kuita kuti <thead>
s iite seyakajeka kana yakasviba grey.
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry |
Shiri |
@twitter |
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry |
Shiri |
@twitter |
Mitsara mitsetse
Shandisa .table-striped
kuwedzera zebra-striping kune chero mutsara wetafura mukati me <tbody>
.
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry |
Shiri |
@twitter |
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry |
Shiri |
@twitter |
Bordered table
Wedzera .table-bordered
kune miganhu kumativi ese etafura uye maseru.
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry the Shiri |
@twitter |
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry the Shiri |
@twitter |
Tafura isina muganhu
Wedzera .table-borderless
kune tafura isina miganhu.
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry the Shiri |
@twitter |
.table-borderless
inogonawo kushandiswa pamatafura erima.
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry the Shiri |
@twitter |
Hoverable mitsara
Wedzera .table-hover
kugonesa hover state patafura mitsara mukati me <tbody>
.
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry the Shiri |
@twitter |
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry the Shiri |
@twitter |
Diki table
Wedzera .table-sm
kuita kuti matafura awedzere kuwirirana nekucheka cell padding nepakati.
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry the Shiri |
@twitter |
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry the Shiri |
@twitter |
Contextual classes
Shandisa makirasi emukati kupenda mitsara yematafura kana maseru ega ega.
Kirasi |
Heading |
Heading |
Active |
Sero |
Sero |
Default |
Sero |
Sero |
Primary |
Sero |
Sero |
Secondary |
Sero |
Sero |
Success |
Sero |
Sero |
Danger |
Sero |
Sero |
Yambiro |
Sero |
Sero |
Info |
Sero |
Sero |
Chiedza |
Sero |
Sero |
Rima |
Sero |
Sero |
Yakajairwa tafura yekumashure akasiyana haiwanikwe neiyo rima tafura, zvisinei, unogona kushandisa zvinyorwa kana zvemashure zvishandiso kuti uwane akafanana masitaera.
# |
Heading |
Heading |
1 |
Sero |
Sero |
2 |
Sero |
Sero |
3 |
Sero |
Sero |
4 |
Sero |
Sero |
5 |
Sero |
Sero |
6 |
Sero |
Sero |
7 |
Sero |
Sero |
8 |
Sero |
Sero |
9 |
Sero |
Sero |
Kuendesa zvinoreva kunobatsira matekinoroji
Kushandisa ruvara kuwedzera zvinoreva kunongopa chiratidzo chekuona, icho chisingazopirwe kune vashandisi vetekinoroji yekubatsira - senge zvidzitiro zvekuverenga. Ita shuwa kuti ruzivo rwunoratidzwa neruvara rwuri pachena kubva pane zvirimo (semuzvinyorwa zvinooneka), kana kuti zvinosanganisirwa neimwe nzira, senge mamwe mavara akavigwa .sr-only
nekirasi.
Gadzira matafura anopindura nekupeta chero .table
ne .table-responsive{-sm|-md|-lg|-xl}
, uchiita kuti tafura ifambe yakatwasuka pane yega yega max-width
kusvika (asi isingasanganisire) 576px, 768px, 992px, uye 1120px, zvichiteerana.
Ziva kuti sezvo mabhurawuza pari zvino asingatsigire mivhunzo yezvimiro , isu tinoshanda zvakatenderedza min-
uye max-
prefixes uye nzvimbo dzekutarisa dzine hupamhi hwakaganhurwa (izvo zvinogona kuitika mune mamwe mamiriro pamichina yepamusoro-dpi, semuenzaniso) nekushandisa hunhu nehunyanzvi hwepamusoro pakuenzanisa uku. .
Mashoko
A <caption>
anoshanda semusoro wetafura. Inobatsira vashandisi vane screen readers kuti vawane tafura uye vanzwisise kuti ndeyei uye vosarudza kana vachida kuiverenga.
Rondedzero yevashandisi
# |
Chekutanga |
Pakupedzisira |
Bata |
1 |
Mark |
Otto |
@mdo |
2 |
Jacob |
Thornton |
@mafuta |
3 |
Larry |
Shiri |
@twitter |
Matafura anopindura
Matafura anopindura anobvumira matafura kuti atenderedzwe akachinjika zviri nyore. Ita chero tafura ipindure pamativi ese ekuona nekuputira .table
ne .table-responsive
. Kana, tora nzvimbo yakakura yekutyora iyo yekuve netafura inopindura kusvika nekushandisa .table-responsive{-sm|-md|-lg|-xl}
.
Vertical clipping/truncation
Matafura anopindura anoshandisa overflow-y: hidden
, ayo anobvisa chero zvirimo zvinodarika kuzasi kana kumucheto kwetafura. Kunyanya, izvi zvinogona kudimbura mamenu ekudonha uye mamwe echitatu-bato majeti.
Nguva dzose inopindura
Pakati pese pese pese, shandisa .table-responsive
kune yakachinjika kupuruzira matafura.
# |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
1 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
2 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
3 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Breakpoint chaiyo
Shandisa .table-responsive{-sm|-md|-lg|-xl}
sezvinodiwa kugadzira matafura anopindura kusvika kune imwe nzvimbo yekutyora. Kubva pane iyo breakpoint uye kumusoro, tafura ichaita zvakajairwa uye kwete kupururudza yakatwasuka.
Aya matafura anogona kuita seakatyoka kudzamara masitayipi avo ekupindura ashanda pane yakatarwa viewport wides.
# |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
1 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
2 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
3 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
# |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
1 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
2 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
3 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
# |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
1 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
2 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
3 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
# |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
Heading |
1 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
2 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
3 |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |
Sero |