スタイルborderBottomStyleプロパティ
例
<div>要素に「実線」の下枠を追加します。
document.getElementById("myDiv").style.borderBottomStyle = "solid";
定義と使用法
borderBottomStyleプロパティは、要素の下の境界線のスタイルを設定または返します。
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
borderBottomStyle | 1.0 | 5.5 | 1.0 | 1.0 | 9.2 |
注:値「hidden」は、IE7以前のバージョンではサポートされていません。IE9以降は「非表示」をサポートしています。
構文
borderBottomStyleプロパティを返します。
object.style.borderBottomStyle
borderBottomStyleプロパティを設定します。
object.style.borderBottomStyle = value
プロパティ値
Value | Description |
---|---|
none | Defines no border. This is default |
hidden | Same as "none", except in border conflict resolution for table elements |
dotted | Defines a dotted border |
dashed | Defines a dashed border |
solid | Defines a solid border |
double | Defines two borders. The width of the two borders are the same as the border-width value |
groove | Defines a 3D grooved border. The effect depends on the border-color value |
ridge | Defines a 3D ridged border. The effect depends on the border-color value |
inset | Defines a 3D inset border. The effect depends on the border-color value |
outset | Defines a 3D outset border. The effect depends on the border-color value |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | なし |
---|---|
戻り値: | 要素の下枠のスタイルを表す文字列 |
CSSバージョン | CSS1 |
その他の例
例
<div>要素の下枠のスタイルを「点線」に変更します。
document.getElementById("myDiv").style.borderBottomStyle = "dotted";
例
<div>要素の下枠スタイルを返します。
alert(document.getElementById("myDiv").style.borderBottomStyle);
例
すべての異なる値のデモンストレーション:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderBottomStyle = listValue;
関連ページ
CSSチュートリアル:CSS Border
CSSリファレンス:border-bottom-styleプロパティ
HTML DOMリファレンス:borderプロパティ