Source

Turanga

Whakamahia enei taputapu poto mo te whirihora tere i te waahi o tetahi huānga.

Nga uara noa

Kei te waatea nga karaehe tuunga tere, ahakoa kaore i te aro.

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

Te tihi mau

Whakaturia he huānga ki runga o te tauranga tirohanga, mai i tetahi taha ki tetahi tapa. Kia mohio koe ki nga hua o te tuunga i roto i to kaupapa; ka hiahia koe ki te taapiri CSS taapiri.

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

Raro mau

Whakaturia he huānga ki raro o te tauranga tirohanga, mai i tetahi taha ki tetahi tapa. Kia mohio koe ki nga hua o te tuunga i roto i to kaupapa; ka hiahia koe ki te taapiri CSS taapiri.

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

runga piri

Whakatakotoria he huānga ki te tihi o te tauranga tirohanga, mai i tetahi taha ki tetahi tapa, engari i muri i to panuku i mua. Ka whakamahi te .sticky-topwhaipainga CSS's position: sticky, e kore e tino tautokona i roto i nga kaitirotiro katoa.

Ko IE11 me IE10 ka whakaputa position: stickyhei position: relative. Na, ka takai matou i nga momo ki tetahi @supportspatai, ka whakawhāitihia te piri ki nga kaitirotiro anake ka taea te whakaputa tika.

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