window Resize

html 測試 左入右出

html 測試 上入下出

html 測試 單入單出

html 測試 左單右單

tt

DIV position:fixed-CSS固定物件

DIV position:fixed-CSS固定物件


讓物件固定在上方,或是網頁的某一個地方,這時候我們就會需要用到CSS裡position:fixed這個語法。
position是絕對位置,可以讓圖片或區塊固定在你所想要的地方,fixed則是根據瀏覽器視窗來定位。
position: 值;
描述
absolute 生成絕對定位的元素,相對於 static 定位以外的第一個父元素進行定位。
元素的位置通過 "left", "top", "right" 以及 "bottom" 屬性進行規定。
fixed生成絕對定位的元素,相對於瀏覽器窗口進行定位。
元素的位置通過 "left", "top", "right" 以及 "bottom" 屬性進行規定。
relative生成相對定位的元素,相對於其正常位置進行定位。
因此,"left:20" 會向元素的 LEFT 位置添加 20 像素。
static默認值。沒有定位,元素出現在正常的流中(忽略 top, bottom, left, right 或者 z-index 聲明)。
inherit規定應該從父元素繼承 position 屬性的值。
00
#html position:absolute#html position:fixed#html position:relative#html position:static#html position:inherit

沒有留言:

張貼留言