From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/css/border-top-width/index.html | 148 +++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 files/ja/web/css/border-top-width/index.html (limited to 'files/ja/web/css/border-top-width/index.html') diff --git a/files/ja/web/css/border-top-width/index.html b/files/ja/web/css/border-top-width/index.html new file mode 100644 index 0000000000..9d6d09ba3e --- /dev/null +++ b/files/ja/web/css/border-top-width/index.html @@ -0,0 +1,148 @@ +--- +title: border-top-width +slug: Web/CSS/border-top-width +tags: + - CSS + - CSS プロパティ + - CSS 背景と境界 + - Reference + - border + - border-top + - border-width +translation_of: Web/CSS/border-top-width +--- +
{{CSSRef}}
+ +

CSSborder-top-width プロパティは、要素の上側の境界の幅を設定します。

+ +
{{EmbedInteractiveExample("pages/css/border-top-width.html")}}
+ + + +

構文

+ +
/* キーワード値 */
+border-top-width: thin;
+border-top-width: medium;
+border-top-width: thick;
+
+/* <length> 値 */
+border-top-width: 10em;
+border-top-width: 3vmax;
+border-top-width: 6px;
+
+/* グローバルキーワード */
+border-top-width: inherit;
+border-top-width: initial;
+border-top-width: unset;
+
+ +

+ +
+
<line-width>
+
明示的な非負の {{cssxref("<length>")}} またはキーワードで、境界の幅を定義します。キーワードの場合、以下の値のうちの一つでなければなりません。 + + + + + + + + + + + + + + + + + + +
thin +
 
+
細い境界線
medium +
 
+
中くらいの境界線
thick +
 
+
太い境界線
+ +
+

メモ: 仕様書ではそれぞれのキーワードで示される正確な太さを定義していないため、何れか一つを使用した場合の詳細な結果は、実装に依存します。とは言っても、常に thin ≤ medium ≤ thick というパターンに従い、値は同じ文書の中では一貫しています。

+
+
+
+ +

形式文法

+ +
{{csssyntax}}
+ +

+ +

HTML

+ +
<div>Element 1</div>
+<div>Element 2</div>
+ +

CSS

+ +
div {
+  border: 1px solid red;
+  margin: 1em 0;
+}
+
+div:nth-child(1) {
+  border-top-width: thick;
+}
+div:nth-child(2) {
+  border-top-width: 2em;
+}
+ +

結果

+ +

{{EmbedLiveSample('Example', '100%')}}

+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS3 Backgrounds', '#the-border-width', 'border-top-width')}}{{Spec2('CSS3 Backgrounds')}}目立った変更はなし。
{{SpecName('CSS2.1', 'box.html#border-width-properties', 'border-top-width')}}{{Spec2('CSS2.1')}}目立った変更はなし。
{{SpecName('CSS1', '#border-left-width', 'border-top-width')}}{{Spec2('CSS1')}}初回定義
+ +

{{cssinfo}}

+ +

ブラウザーの対応

+ + + +

{{Compat("css.properties.border-top-width")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf