CSSborder -bottom-widthプロパティ
例
下の境界線の幅を設定します。
div {border-bottom-width: thin;}
以下の「自分で試してみてください」の例をもっと見てください。
定義と使用法
このborder-bottom-width
プロパティは、要素の下枠の幅を設定します。
注:プロパティの前に、常にborder-styleまたは
border-bottom-styleプロパティを宣言してくださいborder-bottom-width
。幅を変更する前に、要素に境界線が必要です。
デフォルト値: | 中くらい |
---|---|
遺伝性の: | いいえ |
アニメート可能: | はい。アニメート可能について読む |
バージョン: | CSS1 |
JavaScript構文: | object .style.borderBottomWidth = "5px" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
border-bottom-width | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
CSS構文
border-bottom-width: medium|thin|thick|length|initial|inherit;
プロパティ値
Value | Description | Play it |
---|---|---|
medium | Specifies a medium bottom border. This is default | |
thin | Specifies a thin bottom border | |
thick | Specifies a thick bottom border | |
length | Allows you to define the thickness of the bottom border. Read about length units | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
その他の例
例
下の境界線の幅を中程度に設定します。
div {border-bottom-width: medium;}
例
下の境界線の幅を太く設定します。
div {border-bottom-width: thick;}
例
下の境界線の幅を1pxに設定します。
div {border-bottom-width: 1px;}
例
下の境界線の幅を15pxに設定します。
div {border-bottom-width: 15px;}
関連ページ
CSSチュートリアル:CSS Border
CSSリファレンス:border-bottomプロパティ
HTML DOMリファレンス: borderBottomWidthプロパティ