Isikhundla
Sebenzisa aba bancedisi ngokukhawuleza ukuqwalasela indawo yento.
Umphezulu olungisiweyo
Beka into phezulu kwindawo yokujonga, ukusuka emphethweni ukuya emphethweni. Qiniseka ukuba uyayiqonda imilinganiselo yesikhundla esisisigxina kwiprojekthi yakho; unokufuna ukongeza i-CSS eyongezelelweyo.
<div class="fixed-top">...</div>
Fixed emazantsi
Misa into ezantsi kwendawo yokujonga, ukusuka emphethweni ukuya emphethweni. Qiniseka ukuba uyayiqonda imilinganiselo yesikhundla esisisigxina kwiprojekthi yakho; unokufuna ukongeza i-CSS eyongezelelweyo.
<div class="fixed-bottom">...</div>
Umphezulu oncangathi
Beka into phezulu kwindawo yokujonga, ukusuka emphethweni ukuya emphethweni, kodwa kuphela emva kokuba uskrole udlule kuyo. Isixhobo .sticky-top
sisebenzisa ii-CSS's position: sticky
, ezingaxhaswanga ngokupheleleyo kuzo zonke iibhrawuza.
<div class="sticky-top">...</div>
Umphezulu oncangathi ophendulayo
Iiyantlukwano eziphendulayo zikwakhona kusetyenziso .sticky-top
.
<div class="sticky-sm-top">Stick to the top on viewports sized SM (small) or wider</div>
<div class="sticky-md-top">Stick to the top on viewports sized MD (medium) or wider</div>
<div class="sticky-lg-top">Stick to the top on viewports sized LG (large) or wider</div>
<div class="sticky-xl-top">Stick to the top on viewports sized XL (extra-large) or wider</div>