CSS โฉ layout โฉ top
top ้จ่ไธๅ็ position ่จญๅฎ๏ผ่ๆไธๅ็ๆๆ๏ผ
top
position
absolute or fixed๏ผ ่ชๅทฑไธๆน outer margin ๅฐ็ถๅฎนๅจไธๆน็ inner border ็่ท้ขใ
absolute
fixed
relative๏ผ่ชๅทฑ (ๅพๆญฃๅธธไฝ็ฝฎ) ๅพไธ็งปๅ็่ท้ขใ
relative
sticky๏ผ top property is used to compute the sticky-constraint rectangle.
sticky
static๏ผ top ็กๆๆใ
static
/* top: ็ถๅ ็ด ็ top ๅฐ่ชๅทฑ็ top ็่ท้ข */ top: 125%; /* 100% ไปฃ่กจ็ถๅ ็ด ็้ซๅบฆ */
position: absolute ็ๅฎไฝๅญๅ ็ด ๏ผๅฎ็ top, bottom, left, right ๆฏ็ธๅฐๆผ่ชๅทฑ็ๆ่ฟๅฎไฝ็ถๅ ็ด ็ใ
CSS โฉ top
anchor positioned elements
Last updated 3 months ago
Was this helpful?