Udindo
Gwiritsani ntchito zida zazifupizi kuti mukonze mwachangu malo a chinthu.
Mfundo zofanana
Makalasi oyika mwachangu akupezeka, ngakhale salabadira.
<div class="position-static">...</div>
<div class="position-relative">...</div>
<div class="position-absolute">...</div>
<div class="position-fixed">...</div>
<div class="position-sticky">...</div>
Kukhazikika pamwamba
Ikani chinthu pamwamba pa malo owonera, kuchokera m'mphepete mpaka m'mphepete. Onetsetsani kuti mukumvetsetsa zokhuza za malo osakhazikika mu polojekiti yanu; mungafunike kuwonjezera CSS yowonjezera.
<div class="fixed-top">...</div>
Kukhazikika pansi
Ikani chinthu pansi pa malo owonera, kuchokera m'mphepete mpaka m'mphepete. Onetsetsani kuti mukumvetsetsa zokhuza za malo osakhazikika mu polojekiti yanu; mungafunike kuwonjezera CSS yowonjezera.
<div class="fixed-bottom">...</div>
Chomata pamwamba
Ikani chinthu pamwamba pa malo owonera, kuchokera m'mphepete mpaka m'mphepete, koma mukangodutsa. Pulogalamuyi .sticky-top
imagwiritsa ntchito ma CSS's position: sticky
, omwe sagwiritsidwa ntchito mokwanira m'masakatuli onse.
IE11 ndi IE10 idzapereka position: sticky
ngati position: relative
. Chifukwa chake, timayika masitayelowo @supports
pofunsa, ndikuchepetsa kukhazikika kwa asakatuli okha omwe angawafotokozere bwino.
<div class="sticky-top">...</div>