Litokomane le mehlala ea ho khetha ho kenya litafole (ho fanoe ka tšebeliso e atileng ho li-plugins tsa JavaScript) ka Bootstrap.
Mehlala
Ka lebaka la ts'ebeliso e atileng ea litafole ho li-widget tsa batho ba bang joalo ka lialmanaka le ba khethang matsatsi, re hlophisitse litafole tsa rona hore e ka khetha ho kena . Kenya feela sehlopha sa mantlha .tableho efe kapa efe <table>, ebe u eketsa mekhoa ea rona kapa litlelase tsa rona tse fapaneng tse kenyellelitsoeng tsa ho fetola.
U sebelisa letšoao la motheo la tafole, mona ke hore na .tablelitafole tse thehiloeng ho Bootstrap li shebahala joang. Mefuta eohle ea litafole e futsitsoe ho Bootstrap 4 , ho bolelang hore litafole life kapa life tse behiloeng li tla ngoloa ka mokhoa o tšoanang le oa motsoali.
Joalo ka litafole le litafole tse lefifi, sebelisa litlelase tsa ho fetola .thead-lightkapa .thead-darkho etsa hore <thead>e bonahale e le bobebe kapa boputsoa bo lefifi.
Eketsa .table-borderedbakeng sa meeli ka mahlakoreng 'ohle a tafole le lisele.
#
Ea pele
Qetellong
Tšoara
1
Tšoaea
Otto
@mdo
2
Jakobo
Thornton
@mafura
3
Larry Nonyana
@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>
#
Ea pele
Qetellong
Tšoara
1
Tšoaea
Otto
@mdo
2
Jakobo
Thornton
@mafura
3
Larry Nonyana
@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>
Tafole e se nang moeli
Eketsa .table-borderlessbakeng sa tafole ntle le meeli.
#
Ea pele
Qetellong
Tšoara
1
Tšoaea
Otto
@mdo
2
Jakobo
Thornton
@mafura
3
Larry Nonyana
@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-borderlesse ka boela ea sebelisoa litafoleng tse lefifi.
#
Ea pele
Qetellong
Tšoara
1
Tšoaea
Otto
@mdo
2
Jakobo
Thornton
@mafura
3
Larry Nonyana
@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>
Hoverable mela
Eketsa .table-hoverho nolofalletsa boemo ba hover holim'a mela ea tafole ka har'a <tbody>.
#
Ea pele
Qetellong
Tšoara
1
Tšoaea
Otto
@mdo
2
Jakobo
Thornton
@mafura
3
Larry Nonyana
@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>
#
Ea pele
Qetellong
Tšoara
1
Tšoaea
Otto
@mdo
2
Jakobo
Thornton
@mafura
3
Larry Nonyana
@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>
Tafole e nyane
Eketsa .table-smho etsa hore litafole li kopane haholoanyane ka ho khaola lisele tsa lisele ka halofo.
#
Ea pele
Qetellong
Tšoara
1
Tšoaea
Otto
@mdo
2
Jakobo
Thornton
@mafura
3
Larry Nonyana
@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>
#
Ea pele
Qetellong
Tšoara
1
Tšoaea
Otto
@mdo
2
Jakobo
Thornton
@mafura
3
Larry Nonyana
@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>
Lihlopha tsa maemo
Sebelisa litlelase tsa maemo ho mebala methalong ea litafole kapa liseleng ka bomong.
Sehlopha
Sehlooho
Sehlooho
E sebetsa
Sele
Sele
Ea kamehla
Sele
Sele
Ea mantlha
Sele
Sele
Ea bobeli
Sele
Sele
Katleho
Sele
Sele
Kotsi
Sele
Sele
Tlhokomediso
Sele
Sele
Info
Sele
Sele
Leseli
Sele
Sele
Lefifi
Sele
Sele
<!-- 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>
Mefuta e tloaelehileng ea litafole ha e fumanehe ka tafole e lefifi, leha ho le joalo, u ka sebelisa mongolo kapa lisebelisoa tsa morao-rao ho fumana mekhoa e ts'oanang.
#
Sehlooho
Sehlooho
1
Sele
Sele
2
Sele
Sele
3
Sele
Sele
4
Sele
Sele
5
Sele
Sele
6
Sele
Sele
7
Sele
Sele
8
Sele
Sele
9
Sele
Sele
<!-- 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>
Ho fetisa moelelo ho litheknoloji tse thusang
Ho sebelisa mebala ho eketsa moelelo ho fana feela ka pontšo ea pono, e ke keng ea fetisetsoa ho basebelisi ba theknoloji e thusang - joalo ka sebali sa skrine. Netefatsa hore tlhahisoleseding e hlahisitsweng ke mmala e ka ba e totobetseng ho tswa ho dikahare ka boyona (mohlala, mongolo o bonahalang), kapa e kenyeleditswe ka mekgwa e meng, e kang mongolo o tlatsetso o patilweng le .sr-onlysehlopha.
Theha litafole tse arabelang ka ho phuthela leha e le efe .tableka .table-responsive{-sm|-md|-lg|-xl}, ho etsa hore tafole e tsamaee e tšekaletse sebakeng se seng le se seng max-widthho fihla ho (empa u sa kenyelle) 576px, 768px, 992px, le 1120px, ka ho latellana.
Hlokomela hore kaha libatli ha joale ha li tšehetse
lipotso tse amanang le litaba , re sebetsa ho pota-pota mefokolo ea
min-li max--prefixes le libaka tsa pono tse nang le bophara ba likaroloana (tse ka hlahang tlas'a maemo a itseng ho lisebelisoa tse phahameng tsa dpi, mohlala) ka ho sebelisa boleng bo nepahetseng haholo bakeng sa papiso ena. .
Litlhaloso
E <caption>sebetsa joalo ka sehlooho sa tafole. E thusa basebelisi ba nang le libali tsa skrine ho fumana tafole le ho utloisisa hore na e bua ka eng le ho etsa qeto ea hore na ba batla ho e bala.
Lenane la basebelisi
#
Ea pele
Qetellong
Tšoara
1
Tšoaea
Otto
@mdo
2
Jakobo
Thornton
@mafura
3
Larry
Nonyana
@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>
Litafole tse arabelang
Litafole tse arabelang li lumella litafole ho tsamaisoa ka mokhoa o tšekaletseng habonolo. Etsa hore tafole efe kapa efe e arabele libakeng tsohle tsa pono ka ho phuthela .tableka .table-responsive. Kapa, khetha sebaka se seholo seo u ka bang le tafole e arabelang ho fihlela ka ho sebelisa .table-responsive{-sm|-md|-lg|-xl}.
Keketso e emeng e otlolohileng
Litafole tse arabelang li sebelisa overflow-y: hidden, e tlosang litaba life kapa life tse fetang bokatlase kapa lipheletsong tse kaholimo tsa tafole. Haholo-holo, sena se ka fokotsa menyetla ea ho theoha le li-widget tse ling tsa motho oa boraro.
Kamehla e arabela
Hohle sebakeng se seng le se seng, sebelisa .table-responsivelitafole tse otlolohileng.
Sebelisa .table-responsive{-sm|-md|-lg|-xl}kamoo ho hlokahalang ho theha litafole tse arabelang ho fihlela sebakeng se itseng. Ho tloha sebakeng seo ho ea holimo ho ea holimo, tafole e tla itšoara ka mokhoa o tloaelehileng 'me e se ke ea tsamaea e tšekaletse.
Litafole tsena li ka 'na tsa bonahala li robehile ho fihlela mekhoa ea bona ea ho arabela e sebetsa ho bophara bo itseng ba pono.