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/outline-width/index.html | 141 ++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 files/ja/web/css/outline-width/index.html (limited to 'files/ja/web/css/outline-width/index.html') diff --git a/files/ja/web/css/outline-width/index.html b/files/ja/web/css/outline-width/index.html new file mode 100644 index 0000000000..d70fcf6658 --- /dev/null +++ b/files/ja/web/css/outline-width/index.html @@ -0,0 +1,141 @@ +--- +title: outline-width +slug: Web/CSS/outline-width +tags: + - CSS + - CSS Outline + - CSS Property + - Layout + - Reference + - 'recipe:css-property' +translation_of: Web/CSS/outline-width +--- +
{{CSSRef}}
+ +

CSSoutline-width プロパティは、要素の輪郭線の太さを設定します。輪郭線とは要素の周りに描かれる線のことで、 {{cssxref("border")}} よりも外側です。

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

たいていの場合、輪郭線の見た目を定義するときは一括指定プロパティ {{cssxref("outline")}} を使ったほうが便利です。

+ +

構文

+ +
/* キーワード値 */
+outline-width: thin;
+outline-width: medium;
+outline-width: thick;
+
+/* <length> 値 */
+outline-width: 1px;
+outline-width: 0.1em;
+
+/* グローバル値 */
+outline-width: inherit;
+
+ +

outline-width プロパティは、以下に挙げた値のうちの一つで指定します。

+ +

+ +
+
{{cssxref("<length>")}}
+
輪郭線の太さを <length> で指定します。
+
thin
+
ユーザーエージェントに依存します。Firefox のようなデスクトップブラウザーでは、通常は 1px です。
+
medium
+
ユーザーエージェントに依存します。Firefox のようなデスクトップブラウザーでは、通常は 3px です。
+
thick
+
ユーザーエージェントに依存します。Firefox のようなデスクトップブラウザーでは、通常は 5px です。
+
+ +

公式定義

+ +

{{cssinfo}}

+ +

形式文法

+ +
{{csssyntax}}
+ +

+ +

要素の輪郭線の幅の設定

+ +

HTML

+ +
<span id="thin">thin</span>
+<span id="medium">medium</span>
+<span id="thick">thick</span>
+<span id="twopixels">2px</span>
+<span id="oneex">1ex</span>
+<span id="em">1.2em</span>
+
+ +

CSS

+ +
span {
+  outline-style: solid;
+  display: inline-block;
+  margin: 20px;
+}
+
+#thin {
+  outline-width: thin;
+}
+
+#medium {
+  outline-width: medium;
+}
+
+#thick {
+  outline-width: thick;
+}
+
+#twopixels {
+  outline-width: 2px;
+}
+
+#oneex {
+  outline-width: 1ex;
+}
+
+#em {
+  outline-width: 1.2em;
+}
+
+
+ +

結果

+ +

{{EmbedLiveSample('Setting_an_elements_outline_width', '100%', '80')}}

+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS3 Basic UI', '#outline-width', 'outline-width')}}{{Spec2('CSS3 Basic UI')}}変更なし。
{{SpecName('CSS2.1', 'ui.html#propdef-outline-width', 'outline-width')}}{{Spec2('CSS2.1')}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("css.properties.outline-width")}}

-- cgit v1.2.3-54-g00ecf