Ọnọdụ
Jiri ngwa mkpirisi ndị a maka ịhazi ngwa ngwa ọnọdụ nke mmewere.
Ụkpụrụ nkịtị
Klas idokwa ngwa ngwa dị, n'agbanyeghị na ha anaghị anabata ya.
<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>
Edoziri elu
Debe ihe mmewere n'elu ebe nlele, site na nsọtụ ruo n'ọnụ. Jide n'aka na ị ghọtara ramifications nke ọnọdụ a kapịrị ọnụ na ọrụ gị; ị nwere ike ịtinye CSS ọzọ.
<div class="fixed-top">...</div>
Edobere ala
Debe ihe mmewere n'okpuru ebe nlele, site na nsọtụ ruo n'ọnụ. Jide n'aka na ị ghọtara ramifications nke ọnọdụ a kapịrị ọnụ na ọrụ gị; ị nwere ike ịtinye CSS ọzọ.
<div class="fixed-bottom">...</div>
elu nyapade
Debe ihe mmewere n'elu ebe nlele, site na nsọtụ ruo na nsọtụ, mana ọ bụ naanị mgbe ị gafechara ya. Ngwa ahụ .sticky-top
na-eji CSS's position: sticky
, nke anaghị akwado nke ọma na ihe nchọgharị niile.
IE11 na IE10 ga-eme position: sticky
ka position: relative
. Dị ka nke a, anyị na-ekekọta ụdị ndị ahụ na @supports
ajụjụ, na-amachi nrapagidesi ike na naanị ihe nchọgharị nwere ike ime ya nke ọma.
<div class="sticky-top">...</div>