Sehlopha sa lenane
Lihlopha tsa manane ke karolo e feto-fetohang le e matla bakeng sa ho bonts'a letoto la litaba. Li fetole 'me u li atolose ho tšehetsa hoo e ka bang litaba life kapa life tse ka hare.
Sehlopha sa lenane la motheo ke lenane le sa reroang le nang le lethathamo la lintho le lihlopha tse nepahetseng. Iketsetse holim'a eona ka likhetho tse latelang, kapa ka CSS ea hau ha ho hlokahala.
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo ris
- Porta ac consectetur ac
- Vestibulum le 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>
Eketsa .active
ho a .list-group-item
ho bontsha kgetho e sebetsang ha jwale.
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo ris
- Porta ac consectetur ac
- Vestibulum le 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>
Kenya .disabled
ho a .list-group-item
ho etsa hore e bonahale e sa sebetse. Hlokomela hore likarolo tse ling tse nang le .disabled
tsona li tla hloka JavaScript e tloaelehileng ho tima ka botlalo liketsahalo tsa bona tsa ho tobetsa (mohlala, lihokelo).
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo ris
- Porta ac consectetur ac
- Vestibulum le 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>
Sebelisa <a>
s kapa <button>
s ho theha lethathamo la lintho tse ka etsahalang tsa sehlopha ka hover, ba holofetseng, le maemo a sebetsang ka ho eketsa .list-group-item-action
. Re arola lihlopha tsena tsa pseudo ho netefatsa hore lihlopha tse entsoeng ka likarolo tse sa sebelisaneng (joalo <li>
ka s kapa <div>
s) ha li fane ka monyetla oa ho penya kapa ho tobetsa.
Etsa bonnete ba hore u se ke ua sebelisa .btn
litlelase tse tloaelehileng mona .
<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>
Ka <button>
s, u ka boela ua sebelisa disabled
tšobotsi ho e-na le .disabled
sehlopha. Ka bomalimabe, <a>
s ha e tšehetse batho ba nang le bokooa.
<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>
Eketsa .list-group-flush
ho tlosa meeli e meng le likhutlo tse pota-potiloeng ho fana ka lethathamo la lintho tsa sehlopha ka lehlakoreng le leng ka har'a sets'oants'o sa motsoali (mohlala, likarete).
- Cras justo odio
- Dapibus ac facilisis in
- Morbi leo ris
- Porta ac consectetur ac
- Vestibulum le 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>
Sebelisa litlelase tsa maemo ho etsa lethathamo la lintho tse nang le bokantle le mebala e metle.
- Dapibus ac facilisis in
- Ena ke karolo ea mantlha ea sehlopha
- Ena ke karolo ea bobeli ea lenane la sehlopha
- Ena ke karolo ea sehlopha sa katleho
- Ena ke karolo ea sehlopha sa likotsi
- Ena ke lintlha tsa sehlopha sa tlhokomeliso
- Ena ke lethathamo la lintlha tsa sehlopha
- Ena ke karolo ea sehlopha se bobebe
- Ena ke karolo ea sehlopha se lefifi
<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>
Litlelase tsa Contextual li boetse li sebetsa le .list-group-item-action
. Ela hloko tlatsetso ea mekhoa ea hover mona e seng teng mohlaleng o fetileng. Hape ho tšehetsoa ke .active
mmuso; e sebelise ho bontša khetho e sebetsang lethathamong la maemo a sehlopha.
<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>
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-only
sehlopha.
Kenya libeche lethathamong lefe kapa lefe la sehlopha ho bontša lipalo tse sa baloang, liketsahalo, le tse ling ka thuso ea lisebelisoa tse ling .
- Cras justo odio14
- Dapibus ac facilisis in2
- Morbi leo ris1
<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>
Kenya hoo e batlang e le HTML efe kapa efe ka hare, esita le bakeng sa lihlopha tsa lenane tse hokahaneng joalo ka e ka tlase, ka thuso ea lisebelisoa tsa flexbox .
Etsa lethathamo la lihlooho tsa sehlopha
Matsatsi a 3 a fetilengDonec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta.Etsa lethathamo la lihlooho tsa sehlopha
Matsatsi a 3 a fetilengDonec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta.Etsa lethathamo la lihlooho tsa sehlopha
Matsatsi a 3 a fetilengDonec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi 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>
Sebelisa tab "JavaScript plugin" - e kenyelle ka bonngoe kapa ka bootstrap.js
faele e hlophisitsoeng - ho atolosa sehlopha sa rona sa lenane ho theha liphasejene tsa litaba tsa lehae.
O ka kenya ts'ebetso ea sehlopha sa lethathamo ntle le ho ngola JavaScript efe kapa efe ka ho hlakisa feela data-toggle="list"
kapa ho ntho e itseng. Sebelisa litšobotsi tsena tsa data ho .list-group-item
.
Lumella lethathamo la lintho tse fumanehang ka JavaScript (ntho ka 'ngoe ea lethathamo e hloka ho etsoa ka bonngoe):
O ka kenya tšebetsong lethathamo la ntho ka 'ngoe ka mekhoa e mengata:
Ho etsa hore phanele ea li-tab e nyamele, eketsa .fade
ho e 'ngoe le e 'ngoe .tab-pane
. Letlapa la pele la li-tab le lona le tlameha .show
ho etsa hore litaba tsa pele li bonahale.
E kenya tshebetsong karolo ya lenane le setshelo sa dikahare. Tab e lokela ho ba le node ea setshelo data-target
kapa e href
lebisitsoeng ho DOM.
E khetha lethathamo le fanoeng ebe e bontša karolo e amanang le eona. Ntho efe kapa efe e 'ngoe ea lethathamo e neng e khethiloe nakong e fetileng e fetoha e sa khethoeng 'me karolo ea eona e amanang le eona ea patoa. E kgutlela ho moletsi pele fenstere ya tab e bontshwa (mohlala, pele shown.bs.tab
ketsahalo e etsahala).
Ha o hlahisa tab e ncha, liketsahalo li tla ka tatellano e latelang:
hide.bs.tab
(tabong ea hajoale e sebetsang)show.bs.tab
(letlapeng le tlang ho bontšoa)hidden.bs.tab
(tabong e fetileng e sebetsang, e ts'oanang le eahide.bs.tab
ketsahalo)shown.bs.tab
(tabong e sa tsoa hlaha, e ts'oanang le eashow.bs.tab
ketsahalo)
Haeba ho se tab e neng e se e ntse e sebetsa, liketsahalo hide.bs.tab
le hidden.bs.tab
liketsahalo li ke ke tsa hlakoloa.
Mofuta oa ketsahalo | Tlhaloso |
---|---|
bontša.bs.tab | Ketsahalo ena e qala ho bonts'a li-tab, empa pele tab e ncha e bontšoa. Sebelisa event.target le event.relatedTarget ho shebisa tab e sebetsang le tab e fetileng e sebetsang (haeba e le teng) ka ho latellana. |
e bonts'itsoeng.bs.tab | Ketsahalo ena e tla hlaha ka mor'a hore tab e hlahisoe. Sebelisa event.target le event.relatedTarget ho shebisa tab e sebetsang le tab e fetileng e sebetsang (haeba e le teng) ka ho latellana. |
pata.bs.tab | Ketsahalo ena e tuka ha tab e ncha e tla bontšoa ('me ka hona tab e fetileng e sebetsang e lokela ho patoa). Sebedisa event.target le event.relatedTarget ho shebisisa letlapa le ntseng le sebetsa le le letjha le tlang ho sebetsa haufinyane, ka ho latellana. |
patiloeng.bs.tab | Ketsahalo ena e tuka ka mor'a hore ho bontšoe tab e ncha ('me ka hona tab e fetileng e sebetsang e patiloe). Sebelisa event.target le event.relatedTarget ho shebisa tab e fetileng e sebetsang le tab e ncha e sebetsang, ka ho latellana. |