border-bottom-width
CSS の border-bottom-width
プロパティは、ボックスの下の境界の幅を設定します。
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
このデモのソースファイルは GitHub リポジトリに格納されています。デモプロジェクトに協力したい場合は、 https://github.com/mdn/interactive-examples をクローンしてプルリクエストを送信してください。
構文
/* キーワード値 */
border-bottom-width: thin;
border-bottom-width: medium;
border-bottom-width: thick;
/* <length> 値 */
border-bottom-width: 10em;
border-bottom-width: 3vmax;
border-bottom-width: 6px;
/* グローバルキーワード */
border-bottom-width: inherit;
border-bottom-width: initial;
border-bottom-width: unset;
値
<line-width>
- 明示的な非負の
<length>
またはキーワードで、境界の幅を定義します。キーワードの場合、以下の値のうちの一つでなければなりません。thin
細い境界線 medium
中くらいの境界線 thick
太い境界線 メモ: 仕様書ではそれぞれのキーワードで示される正確な太さを定義していないため、何れか一つを使用した場合の詳細な結果は、実装に依存します。とは言っても、常に
thin ≤ medium ≤ thick
というパターンに従い、値は同じ文書の中では一貫しています。
形式文法
例
HTML
<div>Element 1</div>
<div>Element 2</div>
CSS
div {
border: 1px solid red;
margin: 1em 0;
}
div:nth-child(1) {
border-bottom-width: thick;
}
div:nth-child(2) {
border-bottom-width: 2em;
}
結果
仕様書
仕様書 | 状態 | 備考 |
---|---|---|
CSS Backgrounds and Borders Module Level 3 border-bottom-width の定義 |
勧告候補 | 目立った変更はなし。 |
CSS Level 2 (Revision 1) border-bottom-width の定義 |
勧告 | 目立った変更はなし。 |
CSS Level 1 border-bottom-width の定義 |
勧告 | 初回定義 |
初期値 | medium |
---|---|
適用対象 | すべての要素。 ::first-letter にも適用されます。 |
継承 | なし |
計算値 | 絶対的な長さ、または border-bottom-style が none または hidden の場合は 0 |
アニメーションの種類 | length |
ブラウザーの対応
BCD tables only load in the browser
このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 https://github.com/mdn/browser-compat-data をチェックアウトしてプルリクエストを送信してください。
関連情報
- 他の border-width 関連 CSS プロパティ:
border-left-width
,border-right-width
,border-top-width
,border-width
- 他の border-bottom 関連 CSS プロパティ:
border
,border-bottom
,border-bottom-style
,border-bottom-color