bottom

以文件階層中下一個定位物件的底部為基準,設定或擷取物件底部的相對位置。

語法

{ bottom: sBottom }

可能的值

sBottom

指定或接收下列其中一個值的變數:

auto

預設值。以網頁之標準 HTML 版面配置為根據的預設位置。

length

浮點數,後面接著絕對單位指示項 ( cmmminptpc ) 或相對單位指示項 ( emexpx )。

如需支援之長度單位的詳細資訊,請參閱長度單位參照

percentage

整數,後面接著百分比符號 (%)。此值為父物件的高度百分比。

此屬性的預設值為 auto 。這不是繼承屬性。

備註

bottom 屬性只能在已設定 position 屬性的情況下使用,否則將會忽略 bottom 屬性的值。

範例

此範例使用 bottom 屬性將 DIV 物件與用戶端區域底部的距離設為 50 像素:

<div style = "position: absolute; bottom: 50px;">
. . .
</div>

標準資訊

您可以在 Cascading Style Sheets (CSS), Level 2 (CSS2) (階層式樣式表 (CSS) 層級 2 (CSS2)) Ee371296.xtlink_newWindow(zh-tw,Expression.40).png 找到此屬性的定義。

適用範圍

a, abbr, acronym, b, bdo, big, blockquote, body, button, caption, center, cite, code, custom, dd, defaults, del, dfn, div, dl, dt, em, embed, fieldset, font, form, hn, hr, i, iframe, img, input type=button, input type=checkbox, input type=file, input type=image, input type=password, input type=radio, input type=reset, input type=submit, input type=text, ins, li, object, ol, p, q, s, span, sub, table, td, th, tt, u, ul, var, xmp

另請參閱

概念

top
right
left
position