Rekọja si akoonu akọkọ Rekọja si lilọ kiri awọn iwe aṣẹ

Lo awọn wọnyi oluranlọwọ fun ni kiakia tito le awọn ipo ti ohun ano.

Oke ti o wa titi

Gbe ohun elo kan si oke ti oju wiwo, lati eti si eti. Rii daju pe o loye awọn ramifications ti ipo ti o wa titi ninu iṣẹ akanṣe rẹ; o le nilo lati fi afikun CSS kun.

<div class="fixed-top">...</div>

Ti o wa titi isalẹ

Gbe ohun elo kan si isalẹ ti oju wiwo, lati eti si eti. Rii daju pe o loye awọn ramifications ti ipo ti o wa titi ninu iṣẹ akanṣe rẹ; o le nilo lati fi afikun CSS kun.

<div class="fixed-bottom">...</div>

Oke alalepo

Gbe ohun kan si oke ibudo wiwo, lati eti si eti, ṣugbọn lẹhin ti o yi lọ kọja rẹ. IwUlO .sticky-topnlo CSS's position: sticky, eyiti ko ni atilẹyin ni kikun ni gbogbo awọn aṣawakiri.

<div class="sticky-top">...</div>

Idahun alalepo oke

Awọn iyatọ idahun tun wa fun .sticky-topIwUlO.

<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>