From 4773297867ccefe538d830988519836a7b362450 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sun, 19 Dec 2021 02:32:11 +0900 Subject: 2021/08/13 時点の英語版に同期 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/@counter-style/prefix/index.md | 92 +++++++++++-------------- 1 file changed, 42 insertions(+), 50 deletions(-) (limited to 'files/ja/web/css') diff --git a/files/ja/web/css/@counter-style/prefix/index.md b/files/ja/web/css/@counter-style/prefix/index.md index 8a846a92ff..363196c9d2 100644 --- a/files/ja/web/css/@counter-style/prefix/index.md +++ b/files/ja/web/css/@counter-style/prefix/index.md @@ -3,52 +3,60 @@ title: prefix slug: Web/CSS/@counter-style/prefix tags: - '@counter-style' + - アットルール記述子 - CSS - CSS カウンタースタイル - CSS 記述子 - リファレンス +browser-compat: css.at-rules.counter-style.prefix translation_of: Web/CSS/@counter-style/prefix --- -
{{CSSRef}}
+{{CSSRef}} -

{{cssxref('@counter-style')}} 規則の prefix 記述子は、マーカーに先立って表示される内容を指定します。指定されていない場合、既定値は "" (空文字列) になります。

+**`prefix`** は {{cssxref('@counter-style')}} ルールの記述子で、マーカーに先立って表示される内容を指定します。指定されていない場合、既定値は `""` (空文字列) になります。 -

{{cssinfo}}

+## 構文 -

構文

- -
/* <symbol> 値 */
+```css
+/*  値 */
 prefix: "»";
 prefix: "Page ";
 prefix: url(bullet.png);
-
+``` + +### 値 -

+- `` + - : マーカーに先立って表示される `` を指定します。 {{cssxref("<string>")}}, {{cssxref("<image>")}}, {{cssxref("<custom-ident>")}} の何れかです。 -
-
<symbol>
-
マーカーに先立って表示される <symbol> を指定します。 {{cssxref("<string>")}}, {{cssxref("<image>")}}, {{cssxref("<custom-ident>")}} の何れかです。
-
+## 公式定義 -

形式文法

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

+## 例 -

HTML

+### カウンターに接頭辞を追加 -
<ul class="index">
-  <li>The Boy Who Lived</li>
-  <li>The Vanishing Glass</li>
-  <li>The Letters from No One</li>
-  <li>The Keeper of the Keys</li>
-  <li>Diagon Alley</li>
-</ul>
+#### HTML -

CSS

+```html +
    +
  • The Boy Who Lived
  • +
  • The Vanishing Glass
  • +
  • The Letters from No One
  • +
  • The Keeper of the Keys
  • +
  • Diagon Alley
  • +
+``` -
@counter-style chapters {
+#### CSS
+
+```css
+@counter-style chapters {
   system: numeric;
   symbols: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9";
   prefix: 'Chapter ';
@@ -57,38 +65,22 @@ prefix: url(bullet.png);
 .index {
   list-style: chapters;
   padding-left: 15ch;
-}
+} +```

結果

-

{{ EmbedLiveSample('Example') }}

+{{ EmbedLiveSample('Adding_a_prefix_to_a_counter') }} -

仕様書

+## 仕様書 - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName('CSS3 Counter Styles', '#descdef-counter-style-prefix', 'prefix')}}{{Spec2('CSS3 Counter Styles')}}初回定義
+{{Specifications}} -

ブラウザーの対応

+## ブラウザーの互換性 -

{{Compat("css.at-rules.counter-style.prefix")}}

+{{Compat}} -

関連情報

+## 関連情報 -
    -
  • {{Cssxref("list-style")}}, {{Cssxref("list-style-image")}}, {{Cssxref("list-style-position")}}
  • -
  • {{cssxref("symbols", "symbols()")}}、 匿名のカウンタースタイルを作成するために使用される関数形式の記述方法です。
  • -
+- {{Cssxref("list-style")}}, {{Cssxref("list-style-image")}}, {{Cssxref("list-style-position")}} +- {{cssxref("symbols()", "symbols()")}}、無名のカウンタースタイルを作成する関数記法 \ No newline at end of file -- cgit v1.2.3-54-g00ecf