Lembani gulu
Magulu amndandanda ndi gawo losinthika komanso lamphamvu powonetsa mndandanda wazinthu. Sinthani ndi kukulitsa kuti zithandizire chilichonse mkati.
Gulu la mndandanda wofunikira kwambiri ndi mndandanda wosasankhidwa wokhala ndi mndandanda wazinthu ndi makalasi oyenera. Mangani pa izo ndi zosankha zomwe zikutsatira, kapena ndi CSS yanu ngati pakufunika.
- Cras justo odio
- Dapibus ac facilisis in
- Mowa lero
- Porta ac consectetur ac
- Vestibulum ndi eros
<ul class="list-group">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
<li class="list-group-item">Porta ac consectetur ac</li>
<li class="list-group-item">Vestibulum at eros</li>
</ul>
Onjezani .active
ku a .list-group-item
kuti muwonetse zomwe zasankhidwa.
- Cras justo odio
- Dapibus ac facilisis in
- Mowa lero
- Porta ac consectetur ac
- Vestibulum ndi eros
<ul class="list-group">
<li class="list-group-item active">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
<li class="list-group-item">Porta ac consectetur ac</li>
<li class="list-group-item">Vestibulum at eros</li>
</ul>
Onjezani .disabled
ku a .list-group-item
kuti iwoneke ngati yoyimitsa. Dziwani kuti zinthu zina zomwe zili nazo .disabled
zidzafunikanso JavaScript yokhazikika kuti izimitsa zochitika zawo zodina (mwachitsanzo, maulalo).
- Cras justo odio
- Dapibus ac facilisis in
- Mowa lero
- Porta ac consectetur ac
- Vestibulum ndi eros
<ul class="list-group">
<li class="list-group-item disabled">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
<li class="list-group-item">Porta ac consectetur ac</li>
<li class="list-group-item">Vestibulum at eros</li>
</ul>
Gwiritsani ntchito <a>
s kapena <button>
s kuti mupange mndandanda wazinthu zomwe zingachitike m'magulu okhala ndi ma hover, olemala, ndi omwe akugwira ntchito powonjezera .list-group-item-action
. Timalekanitsa magulu abodzawa kuti tiwonetsetse kuti magulu opangidwa ndi zinthu zosalumikizana (monga <li>
s kapena <div>
s) sapereka kudina kapena kukwanitsa.
Onetsetsani kuti musagwiritse ntchito .btn
makalasi okhazikika apa .
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action active">
Cras justo odio
</a>
<a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in</a>
<a href="#" class="list-group-item list-group-item-action">Morbi leo risus</a>
<a href="#" class="list-group-item list-group-item-action">Porta ac consectetur ac</a>
<a href="#" class="list-group-item list-group-item-action disabled">Vestibulum at eros</a>
</div>
Ndi <button>
s, mutha kugwiritsanso ntchito mawonekedwe disabled
m'malo mwa .disabled
kalasi. Zachisoni, <a>
s sizigwirizana ndi zomwe olumala.
<div class="list-group">
<button type="button" class="list-group-item list-group-item-action active">
Cras justo odio
</button>
<button type="button" class="list-group-item list-group-item-action">Dapibus ac facilisis in</button>
<button type="button" class="list-group-item list-group-item-action">Morbi leo risus</button>
<button type="button" class="list-group-item list-group-item-action">Porta ac consectetur ac</button>
<button type="button" class="list-group-item list-group-item-action" disabled>Vestibulum at eros</button>
</div>
Onjezani .list-group-flush
kuti muchotse malire ndi ngodya zozungulira kuti mupereke mndandanda wazinthu zamagulu m'mphepete mwa chidebe cha makolo (mwachitsanzo, makadi).
- Cras justo odio
- Dapibus ac facilisis in
- Mowa lero
- Porta ac consectetur ac
- Vestibulum ndi eros
<ul class="list-group list-group-flush">
<li class="list-group-item">Cras justo odio</li>
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item">Morbi leo risus</li>
<li class="list-group-item">Porta ac consectetur ac</li>
<li class="list-group-item">Vestibulum at eros</li>
</ul>
Gwiritsani ntchito makalasi amndandanda kuti musinthe zinthu zomwe zili ndi mbiri yabwino komanso mtundu.
- Dapibus ac facilisis in
- Ichi ndi chinthu choyambirira cha gulu
- Ichi ndi chinthu chamndandanda wachiwiri
- Ichi ndi chinthu chamndandanda wopambana
- Ichi ndi chinthu chamndandanda wazowopsa
- Ichi ndi chinthu cha gulu la chenjezo
- Ichi ndi zinthu zagulu lazidziwitso
- Ichi ndi gulu lopepuka lagulu
- Ichi ndi chinthu chamndandanda wakuda
<ul class="list-group">
<li class="list-group-item">Dapibus ac facilisis in</li>
<li class="list-group-item list-group-item-primary">This is a primary list group item</li>
<li class="list-group-item list-group-item-secondary">This is a secondary list group item</li>
<li class="list-group-item list-group-item-success">This is a success list group item</li>
<li class="list-group-item list-group-item-danger">This is a danger list group item</li>
<li class="list-group-item list-group-item-warning">This is a warning list group item</li>
<li class="list-group-item list-group-item-info">This is a info list group item</li>
<li class="list-group-item list-group-item-light">This is a light list group item</li>
<li class="list-group-item list-group-item-dark">This is a dark list group item</li>
</ul>
Maphunziro a Contextual amagwiranso ntchito ndi .list-group-item-action
. Zindikirani kuwonjezera kwa masitaelo a hover pano omwe sakupezeka mu chitsanzo chapitacho. Komanso kuthandizidwa ndi .active
boma; igwiritseni ntchito kusonyeza kusankha komwe kukuchitika pagulu lachinthu.
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action">Dapibus ac facilisis in</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-primary">This is a primary list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-secondary">This is a secondary list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-success">This is a success list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-danger">This is a danger list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-warning">This is a warning list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-info">This is a info list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-light">This is a light list group item</a>
<a href="#" class="list-group-item list-group-item-action list-group-item-dark">This is a dark list group item</a>
</div>
Kupereka tanthauzo ku matekinoloje othandizira
Kugwiritsa ntchito utoto kuti muwonjezere tanthauzo kumangopereka chithunzithunzi, chomwe sichidzaperekedwa kwa ogwiritsa ntchito matekinoloje othandizira - monga owerenga pazenera. Onetsetsani kuti zomwe zatchulidwa ndi mtunduwo zikuwonekera kuchokera pazomwe zili (monga zolemba zowonekera), kapena zikuphatikizidwa ndi njira zina, monga zolemba zina zobisika ndi .sr-only
kalasi.
Onjezani mabaji pagulu lililonse kuti muwonetse mawerengedwe osawerengeka, zochitika, ndi zina mothandizidwa ndi zina .
- Cras justo odio14
- Dapibus ac facilisis in2
- Mowa lero1
<ul class="list-group">
<li class="list-group-item d-flex justify-content-between align-items-center">
Cras justo odio
<span class="badge badge-primary badge-pill">14</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Dapibus ac facilisis in
<span class="badge badge-primary badge-pill">2</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Morbi leo risus
<span class="badge badge-primary badge-pill">1</span>
</li>
</ul>
Onjezani pafupifupi ma HTML aliwonse mkati, ngakhale pamndandanda wamagulu olumikizidwa monga pansipa, mothandizidwa ndi flexbox utilities .
Lembani mutu wazinthu zamagulu
Masiku 3 apitawoDonec id ili si mi porta gravida ndi eget metus. Maecenas sed diam eget risus varius blandit.
Donec id ili si ine porta.Lembani mutu wazinthu zamagulu
Masiku 3 apitawoDonec id ili si mi porta gravida ndi eget metus. Maecenas sed diam eget risus varius blandit.
Donec id ili si ine porta.Lembani mutu wazinthu zamagulu
Masiku 3 apitawoDonec id ili si mi porta gravida ndi eget metus. Maecenas sed diam eget risus varius blandit.
Donec id ili si ine porta.<div class="list-group">
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start active">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">List group item heading</h5>
<small>3 days ago</small>
</div>
<p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
<small>Donec id elit non mi porta.</small>
</a>
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">List group item heading</h5>
<small class="text-muted">3 days ago</small>
</div>
<p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
<small class="text-muted">Donec id elit non mi porta.</small>
</a>
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">List group item heading</h5>
<small class="text-muted">3 days ago</small>
</div>
<p class="mb-1">Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.</p>
<small class="text-muted">Donec id elit non mi porta.</small>
</a>
</div>
Gwiritsani ntchito pulogalamu yowonjezera ya JavaScript-iphatikizepo payekhapayekha kapena kudzera pa bootstrap.js
fayilo yophatikizidwa-kuti muwonjezere gulu lathu la mndandanda kuti mupange mapanelo azomwe zili m'deralo.
Mutha kuyambitsa kusanja kwamagulu osalemba JavaScript pongotchula data-toggle="list"
kapena pa chinthu. Gwiritsani ntchito ma data awa pa .list-group-item
.
Yambitsani chinthu chamndandanda kudzera pa JavaScript (chinthu chilichonse pamndandanda chikuyenera kutsegulidwa pachokha):
Mutha kuyambitsa chinthu chamndandanda m'njira zingapo:
Kuti ma tabo azitha kuzimiririka, onjezani .fade
chilichonse .tab-pane
. Gawo loyamba la tabu liyeneranso .show
kupangitsa kuti zomwe zili zoyamba ziwonekere.
Imayatsa chinthu chamndandanda komanso chidebe chazinthu. Tabu iyenera kukhala ndi imodzi data-target
kapena href
yolunjika ku chidebe mu DOM.
Imasankha chinthu chomwe chaperekedwa ndikuwonetsa gawo lomwe likugwirizana nalo. Chilichonse chamndandanda chomwe chidasankhidwa kale chimakhala chosasankhidwa ndipo mawonekedwe ake amabisika. Imabwerera kwa woyimbayo tsamba la tabu lisanasonyezedwe (mwachitsanzo, shown.bs.tab
chochitikacho chisanachitike).
Mukawonetsa tabu yatsopano, zochitika zimayaka motere:
hide.bs.tab
(pa tabu yomwe ikugwira ntchito pano)show.bs.tab
(pa tabu yomwe ikuyenera kuwonetsedwa)hidden.bs.tab
(pa tabu yogwira kale, yofanana ndi yahide.bs.tab
chochitikacho)shown.bs.tab
(pa tabu yomwe yangowonetsedwa kumene, yofanana ndi yashow.bs.tab
chochitikacho)
Ngati palibe tabu yomwe idayamba kale, hide.bs.tab
ndi hidden.bs.tab
zochitika sizidzachotsedwa.
Mtundu wa chochitika | Kufotokozera |
---|---|
onetsani.bs.tab | Chochitikachi chikuyaka pa tabu chiwonetsero, koma tabu yatsopano isanasonyezedwe. Gwiritsani ntchito event.target ndikuwongolera event.relatedTarget tabu yomwe ikugwira ntchito ndi tabu yogwira kale (ngati ilipo) motsatana. |
chiwonetsero.bs.tab | Chochitika ichi chikuyaka pa tabu chiwonetsero pambuyo poti tabu yawonetsedwa. Gwiritsani ntchito event.target ndikuwongolera event.relatedTarget tabu yomwe ikugwira ntchito ndi tabu yogwira kale (ngati ilipo) motsatana. |
bisa.bs.tab | Chochitikachi chimayaka pomwe tabu yatsopano iyenera kuwonetsedwa (ndipo chifukwa chake tabu yogwira kale iyenera kubisika). Gwiritsani ntchito event.target ndi event.relatedTarget kulunjika tabu yomwe ikugwira ntchito ndi tsamba latsopano lomwe lizigwira ntchito posachedwa, motsatana. |
chobisika.bs.tab | Chochitikachi chimayaka pambuyo poti tabu yatsopano yawonetsedwa (ndipo chifukwa chake tabu yogwira kale yabisika). Gwiritsani event.target ntchito event.relatedTarget ndikulunjika tabu yomwe idagwira kale ndi tabu yatsopano, motsatana. |