From 0ed7c371f7ff103e19b2474e8a55c02d77e3c74d Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sat, 16 Oct 2021 23:48:25 +0900 Subject: CSS 基本ユーザーインターフェイスの文書を更新 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 2021/10/15 時点の英語版に同期 --- files/ja/web/css/outline-offset/index.md | 94 +++++++++++++++++--------------- 1 file changed, 49 insertions(+), 45 deletions(-) (limited to 'files/ja/web/css/outline-offset') diff --git a/files/ja/web/css/outline-offset/index.md b/files/ja/web/css/outline-offset/index.md index 5995f59e76..e59e22199b 100644 --- a/files/ja/web/css/outline-offset/index.md +++ b/files/ja/web/css/outline-offset/index.md @@ -3,83 +3,87 @@ title: outline-offset slug: Web/CSS/outline-offset tags: - CSS - - CSS Outline - - CSS Property - - CSS プロパティ - CSS 輪郭線 + - CSS プロパティ - Reference - - 'recipe:css-property' + - recipe:css-property +browser-compat: css.properties.outline-offset translation_of: Web/CSS/outline-offset --- -
{{CSSRef}}
- -

CSS の outline-offset プロパティは、要素の辺や境界線と輪郭線との空間の量を設定します。

- -
{{EmbedInteractiveExample("pages/css/outline-offset.html")}}
+{{CSSRef}} - +CSS の **`outline-offset`** プロパティは、要素の辺や境界線と[輪郭線](/ja/docs/Web/CSS/outline)との空間の量を設定します。 -

輪郭線 (outline) は要素の周囲、境界線 (border) の外側に描かれる線です。要素とその輪郭線との空間は透明です。つまり、親要素の背景と同じになります。

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

構文

+## 構文 -
/* <length> 値 */
+```css
+/*  値 */
 outline-offset: 3px;
 outline-offset: 0.2em;
 
 /* グローバル値 */
 outline-offset: inherit;
 outline-offset: initial;
+outline-offset: revert;
 outline-offset: unset;
-
+``` + +### 値 + +- `{{cssxref("<length>")}}` + - : 要素とその輪郭線との空間の幅です。負の値を指定すると輪郭線は要素の内側に表示されます。 `0` を指定すると輪郭線は要素との隙間を置かずに表示されます。 + +## 解説 -

+輪郭線 (outline) は要素の周囲、境界線 (border) の外側に描かれる線です。要素とその輪郭線の間は透明です。つまり、親要素の背景と同じになります。 -
-
{{cssxref("<length>")}}
-
要素とその輪郭線との空間の幅です。負の値を指定すると輪郭線は要素の内側に表示されます。 0 を指定すると輪郭線は要素との隙間を置かずに表示されます。
-
+## 公式定義 -

形式文法

+{{cssinfo}} + +## 形式文法 {{csssyntax}} -

+## 例 + +

輪郭線のオフセットをピクセル数で設定

+ +#### HTML -
p {
+```html
+

Gallia est omnis divisa in partes tres.

+``` + +#### CSS + +```css +p { outline: 1px dashed red; outline-offset: 10px; background: yellow; border: 1px solid blue; margin: 15px; } -
+``` + +#### 結果 -
<p>Gallia est omnis divisa in partes tres.</p>
+{{EmbedLiveSample('Setting_outline_offset_in_pixels')}} -

{{EmbedLiveSample('Example')}}

+## 仕様書 -

仕様書

+{{Specifications}} - - - - - - - - - - - - - - - -
仕様書状態備考
{{ SpecName('CSS3 Basic UI', '#outline-offset', 'outline-offset') }}{{ Spec2('CSS3 Basic UI') }}初回定義
+## ブラウザーの互換性 -

{{cssinfo}}

+{{Compat}} -

ブラウザーの互換性

+## 関連情報 -

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

+- {{cssxref("outline")}} +- {{cssxref("outline-color")}} +- {{cssxref("outline-style")}} +- {{cssxref("outline-width")}} -- cgit v1.2.3-54-g00ecf