CSSborder -bottomプロパティ
例
さまざまな要素の下枠のスタイルを設定します。
h1 {
border-bottom: 5px solid red;
}
h2 {
border-bottom: 4px dotted blue;
}
div {
border-bottom: double;
}
定義と使用法
border-bottom
プロパティは、(次の順序で)の省略形のプロパティです。
border-bottom-colorを省略した場合、適用される色はテキストの色になります。
デフォルト値: | ミディアムなしカラー |
---|---|
遺伝性の: | いいえ |
アニメート可能: | はい、個々のプロパティを参照してください。アニメート可能について読む |
バージョン: | CSS1 |
JavaScript構文: | object .style.borderBottom = "15pxドットライトブルー" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
border-bottom | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
CSS構文
border-bottom: border-width border-style border-color|initial|inherit;
プロパティ値
Value | Description |
---|---|
border-bottom-width | Required. Specifies the width of the bottom border. Default value is "medium" |
border-bottom-style | Required. Specifies the style of the bottom border. Default value is "none" |
border-bottom-color | Optional. Specifies the color of the bottom border. Default value is the color of the text |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
関連ページ
CSSチュートリアル:CSS Border
HTML DOMリファレンス: borderBottomプロパティ