スタイルborderBottomWidthプロパティ
例
<div>要素の下の境界線の幅を10pxに変更します。
document.getElementById("myDiv").style.borderBottomWidth = "10px";
以下の「自分で試してみてください」の例をもっと見てください。
定義と使用法
borderBottomWidthプロパティは、要素の下の境界線の幅を設定または返します。
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
borderBottomWidth | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
構文
borderBottomWidthプロパティを返します。
object.style.borderBottomWidth
borderBottomWidthプロパティを設定します。
object.style.borderBottomWidth = "thin|medium|thick|length|initial|inherit"
プロパティ値
Value | Description |
---|---|
thin | Defines a thin border |
medium | Defines a medium border. This is default |
thick | Defines a thick border |
length | The width of the border in length units |
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>要素の下の境界線の幅をthinに変更します。
document.getElementById("myDiv").style.borderBottomWidth = "thin";
例
<div>要素の下枠の幅を返します。
alert(document.getElementById("myDiv").style.borderBottomWidth);
関連ページ
CSSチュートリアル:CSS Border
CSSリファレンス:border-bottom-widthプロパティ
HTML DOMリファレンス:borderプロパティ