スタイルcaptionSideプロパティ
例
表のキャプションを表の一番下に移動します。
document.getElementById("myCap").style.captionSide = "bottom";
定義と使用法
captionSideプロパティは、テーブルのキャプションの位置を設定または返します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
captionSide | Yes | 9.0 | Yes | Yes | Yes |
構文
captionSideプロパティを返します。
object.style.captionSide
captionSideプロパティを設定します。
object.style.captionSide = "top|bottom|initial|inherit"
プロパティ値
Value | Description |
---|---|
top | Default. Positions the table caption above the table |
bottom | Positions the table caption below the table |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | 上 |
---|---|
戻り値: | 表のキャプションの位置を表す文字列 |
CSSバージョン | CSS2 |
その他の例
例
表のキャプションを返します。
alert(document.getElementById("myCap").style.captionSide);
関連ページ
CSSチュートリアル:CSSテーブル
CSSリファレンス:キャプション側のプロパティ
❮スタイルオブジェクト