Bootstrap yordamida jadvallarni (JavaScript plaginlarida keng qo'llanilishini hisobga olgan holda) sozlash uchun hujjatlar va misollar.
Misollar
Jadvallardan taqvimlar va sana tanlagichlar kabi uchinchi tomon vidjetlarida keng qoʻllanilganligi sababli, biz jadvallarimizni roʻyxatdan oʻtish uchun yaratdik . .tableShunchaki har qanday ga asosiy sinfni qo'shing <table>, so'ngra maxsus uslublar yoki turli xil o'z ichiga olgan modifikator sinflarimiz bilan kengaytiring.
Eng oddiy jadval belgilaridan foydalanib, .tableBootstrap-da asoslangan jadvallar qanday ko'rinishga ega. Barcha jadval uslublari Bootstrap 4 da meros qilib olingan , ya'ni har qanday ichki o'rnatilgan jadvallar ota-ona bilan bir xil uslubda bo'ladi.
Jadvallar va quyuq jadvallarga o'xshab, o'zgartiruvchi sinflardan foydalaning yoki .thead-lights ochiq yoki to'q kulrang ko'rinishga ega bo'lsin..thead-dark<thead>
.table-borderedJadval va kataklarning barcha tomonidagi chegaralar uchun qo'shing .
#
Birinchidan
Oxirgi
Tutqich
1
Mark
Otto
@mdo
2
Yoqub
Tornton
@yog'
3
Qush Larri
@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>
#
Birinchidan
Oxirgi
Tutqich
1
Mark
Otto
@mdo
2
Yoqub
Tornton
@yog'
3
Qush Larri
@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>
Ko'chma qatorlar
.table-hoverJadval qatorlarida hover holatini yoqish uchun qo'shing <tbody>.
#
Birinchidan
Oxirgi
Tutqich
1
Mark
Otto
@mdo
2
Yoqub
Tornton
@yog'
3
Qush Larri
@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>
#
Birinchidan
Oxirgi
Tutqich
1
Mark
Otto
@mdo
2
Yoqub
Tornton
@yog'
3
Qush Larri
@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>
Kichik stol
Jadvallarni .table-smyanada ixcham qilish uchun hujayra to'plamini yarmiga bo'ling.
#
Birinchidan
Oxirgi
Tutqich
1
Mark
Otto
@mdo
2
Yoqub
Tornton
@yog'
3
Qush Larri
@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>
#
Birinchidan
Oxirgi
Tutqich
1
Mark
Otto
@mdo
2
Yoqub
Tornton
@yog'
3
Qush Larri
@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>
Kontekstli sinflar
Jadval satrlari yoki alohida kataklarni ranglash uchun kontekstli sinflardan foydalaning.
Ma'no qo'shish uchun rangdan foydalanish faqat vizual ko'rsatkichni ta'minlaydi, bu yordamchi texnologiyalar foydalanuvchilariga, masalan, ekranni o'qiydiganlarga etkazilmaydi. Rang bilan belgilangan ma'lumotlar mazmunning o'zidan (masalan, ko'rinadigan matn) aniq bo'lishiga yoki .sr-onlysinf bilan yashiringan qo'shimcha matn kabi muqobil vositalar orqali kiritilganligiga ishonch hosil qiling.
576px, 768px, 992px va 1120px gacha boʻlgan (lekin shu jumladan emas) har bir toʻxtash nuqtasida jadvalni gorizontal ravishda aylantirib, har birini .tableoʻrash orqali javob beruvchi jadvallar yarating ..table-responsive{-sm|-md|-lg|-xl}max-width
Esda tutingki, brauzerlar hozirda diapazondagi kontekst so‘rovlarini qo‘llab-quvvatlamaydi, shuning uchun biz ushbu taqqoslashlar uchun yuqori aniqlikka ega bo‘lgan qiymatlardan foydalangan holda fraksiyonel kenglikdagi (masalan, yuqori dpi qurilmalarda ma’lum sharoitlarda paydo bo‘lishi mumkin) prefikslar min-vamax- ko‘rish oynalarining cheklovlari atrofida ishlaymiz. .
Taglavhalar
<caption>Jadval sarlavhasi kabi funktsiyalarni bajaradi . Bu ekranni o'qish dasturlari bo'lgan foydalanuvchilarga jadvalni topishga va u nima haqida ekanligini tushunishga va uni o'qishni xohlash yoki xohlamasliklarini hal qilishga yordam beradi.
Foydalanuvchilar ro'yxati
#
Birinchidan
Oxirgi
Tutqich
1
Mark
Otto
@mdo
2
Yoqub
Tornton
@yog'
3
Larri
qush
@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>
Javob beruvchi jadvallar
Javob beruvchi jadvallar jadvallarni gorizontal ravishda osongina aylantirish imkonini beradi. .tablebilan oʻrash orqali har qanday jadvalni barcha koʻrish oynalarida sezgir qiling .table-responsive. Yoki dan foydalanib, javob beruvchi jadvalga ega bo'ladigan maksimal to'xtash nuqtasini tanlang .table-responsive{-sm|-md|-lg|-xl}.
Vertikal kesish/kesish
Javob beruvchi jadvallar jadvalning overflow-y: hiddenpastki yoki yuqori chetlaridan tashqariga chiqadigan har qanday tarkibni o'chirib qo'yadigan dan foydalanadi. Xususan, bu ochiladigan menyular va boshqa uchinchi tomon vidjetlarini kesib tashlashi mumkin.
Har doim sezgir
Har bir to'xtash nuqtasi bo'ylab, .table-responsivegorizontal aylantiruvchi jadvallar uchun foydalaning.
#
Sarlavha
Sarlavha
Sarlavha
Sarlavha
Sarlavha
Sarlavha
Sarlavha
Sarlavha
Sarlavha
1
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
2
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
3
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Hujayra
Maxsus uzilish nuqtasi
.table-responsive{-sm|-md|-lg|-xl}Muayyan to'xtash nuqtasigacha javob beradigan jadvallarni yaratish uchun kerak bo'lganda foydalaning . Ushbu to'xtash nuqtasidan va undan yuqoriga qarab, jadval odatdagidek ishlaydi va gorizontal ravishda aylanmaydi.