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-style/index.html | 243 ++++++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 files/ja/web/css/outline-style/index.html (limited to 'files/ja/web/css/outline-style') diff --git a/files/ja/web/css/outline-style/index.html b/files/ja/web/css/outline-style/index.html new file mode 100644 index 0000000000..b8b6f2a897 --- /dev/null +++ b/files/ja/web/css/outline-style/index.html @@ -0,0 +1,243 @@ +--- +title: outline-style +slug: Web/CSS/outline-style +tags: + - CSS + - CSS プロパティ + - CSS 輪郭線 + - Outline + - Reference + - outline-style +translation_of: Web/CSS/outline-style +--- +
{{CSSRef}}
+ +

CSS の outline-style プロパティは、要素の輪郭線のスタイルを設定します。輪郭線とは要素の周りに描かれる線のことで、 {{cssxref("border")}} よりも外側です。

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

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

+ +

構文

+ +
/* キーワード値 */
+outline-style: auto;
+outline-style: none;
+outline-style: dotted;
+outline-style: dashed;
+outline-style: solid;
+outline-style: double;
+outline-style: groove;
+outline-style: ridge;
+outline-style: inset;
+outline-style: outset;
+
+/* グローバル値 */
+outline-style: inherit;
+outline-style: initial;
+outline-style: unset;
+
+ +

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

+ +

+ +
+
+

auto

+
+
ユーザーエージェントに輪郭線の描画を任せます。
+
+

none

+
+
輪郭線を描きません。{{cssxref("outline-width")}} は 0 です。
+
+

dotted

+
+
点線の輪郭線です。
+
+

dashed

+
+
破線の輪郭線です。
+
+

solid

+
+
1本の実線の輪郭線です。
+
+

double

+
+
2本の実線の輪郭線です。{{cssxref("outline-width")}}は2本の線とその隙間の合計です。
+
+

groove

+
+
ページに刻まれたかのように見える輪郭線です。
+
+

ridge

+
+
grooveの逆で、ページから押し出されたように見える輪郭線です。
+
+

inset

+
+
領域がページに埋め込まれたかのように見える輪郭線です。
+
+

outset

+
+
insetの逆で、領域がページから隆起しているように見える輪郭線です。
+
+ +

形式文法

+ +
{{csssyntax}}
+ +

+ +

例 0 - auto

+ +

autoは、輪郭線スタイルがカスタムであることを表します。 — 典型的には、プラットフォーム用のユーザーインターフェースのデフォルトのスタイル、または、CSSで詳細に記述できるスタイルよりも表現豊かなスタイル(例:輝いて見える半透明の外郭を持つ、輪郭の丸い輪郭線)

+ +

HTML

+ +
<div>
+  <p class="auto">Outline Demo</p>
+</div> 
+ +

CSS

+ +
.auto {
+  outline-style: auto; /* "outline: auto" と同じ */
+}
+
+/* デモを見やすく */
+* { outline-width: 10px; padding: 15px; } 
+ +

{{ EmbedLiveSample('Example_0_-_auto') }}

+ +

例 1 - dotteddashed

+ +

HTML

+ +
<div>
+  <div class="dotted">
+    <p class="dashed">Outline Demo</p>
+  </div>
+</div> 
+ +

CSS

+ +
.dotted {
+  outline-style: dotted; /* "outline: dotted" と同じ */
+}
+.dashed {
+  outline-style: dashed;
+}
+
+/* デモを見やすく */
+* { outline-width: 10px; padding: 15px; } 
+ +

{{ EmbedLiveSample('Example_1_-_dotted_and_dashed') }}

+ +

例 2 - soliddouble

+ +

HTML

+ +
<div>
+  <div class="solid">
+    <p class="double">Outline Demo</p>
+  </div>
+</div> 
+ +

CSS

+ +
.solid {
+  outline-style: solid;
+}
+.double {
+  outline-style: double;
+}
+
+/* デモを見やすく */
+* { outline-width: 10px; padding: 15px; } 
+ +

{{ EmbedLiveSample('Example_2_-_solid_and_double') }}

+ +

例 3 - grooveridge

+ +

HTML

+ +
<div>
+  <div class="groove">
+    <p class="ridge">Outline Demo</p>
+  </div>
+</div>
+ +

CSS

+ +
.groove {
+  outline-style: groove;
+}
+.ridge {
+  outline-style: ridge;
+}
+
+/* デモを見やすく */
+* { outline-width: 10px; padding: 15px; }
+ +

{{ EmbedLiveSample('Example_3_-_groove_and_ridge') }}

+ +

例 4 - insetoutset

+ +

HTML

+ +
<div>
+  <div class="inset">
+    <p class="outset">Outline Demo</p>
+  </div>
+</div>
+ +

CSS

+ +
.inset {
+  outline-style: inset;
+}
+.outset {
+  outline-style: outset;
+}
+
+/* デモを見やすく */
+* { outline-width: 10px; padding: 15px; }
+ +

{{ EmbedLiveSample('Example_4_-_inset_and_outset') }}

+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS3 Basic UI', '#outline-style', 'outline-style')}}{{Spec2('CSS3 Basic UI')}}auto値を追加。
{{SpecName('CSS2.1', 'ui.html#propdef-outline-style', 'outline-style')}}{{Spec2('CSS2.1')}}初回定義
+ +

{{cssinfo}}

+ +

ブラウザーの対応

+ + + +

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

-- cgit v1.2.3-54-g00ecf