CSS下部プロパティ
例
<div>要素の下端を最も近い親要素の下端から10px上に設定し、いくつかの位置を設定します。
div.absolute {
position: absolute;
bottom:
10px;
width: 50%;
border: 3px solid #8AC007;
}
定義と使用法
このbottom
プロパティは、配置された要素の垂直位置に影響します。このプロパティは、配置されていない要素には影響しません。
- 位置の場合:絶対; または位置:固定; -
bottom
プロパティは、要素の下端を、最も近い位置にある祖先の下端の上下の単位に設定します。 - 位置の場合:相対; -
bottom
プロパティは、要素の下端を通常の位置の上/下に移動させます。 - 位置の場合:粘着性; -
bottom
プロパティは、要素がビューポートの内側にあるときはその位置が相対的であるように動作し、外側にあるときはその位置が固定されているように動作します。 - 位置の場合:静的; -
bottom
プロパティは効果がありません。
デフォルト値: | 自動 |
---|---|
遺伝性の: | いいえ |
アニメート可能: | はい。アニメート可能について読む |
バージョン: | CSS2 |
JavaScript構文: | object .style.bottom = "10px" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
bottom | 1.0 | 5.0 | 1.0 | 1.0 | 6.0 |
CSS構文
bottom: auto|length|initial|inherit;
プロパティ値
Value | Description | Play it |
---|---|---|
auto | Lets the browser calculate the bottom edge position. This is default | |
length | Sets the bottom edge position in px, cm, etc. Negative values are allowed. Read about length units | |
% | Sets the bottom edge position in % of containing element. Negative values are allowed | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
関連ページ
CSSチュートリアル:CSSポジショニング
CSSリファレンス:トッププロパティ
CSSリファレンス:leftプロパティ
CSSリファレンス:正しいプロパティ
HTML DOMリファレンス:bottomプロパティ