From 62ed2901fb9efc6e5bbc6ef8013112b3dc6ec22f Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sun, 7 Nov 2021 15:59:39 +0900 Subject: CSS Lists 関連のプロパティの変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/css/list-style-image/index.md | 113 +++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 files/ja/web/css/list-style-image/index.md (limited to 'files/ja/web/css/list-style-image/index.md') diff --git a/files/ja/web/css/list-style-image/index.md b/files/ja/web/css/list-style-image/index.md new file mode 100644 index 0000000000..cf725c5287 --- /dev/null +++ b/files/ja/web/css/list-style-image/index.md @@ -0,0 +1,113 @@ +--- +title: list-style-image +slug: Web/CSS/list-style-image +tags: + - CSS + - CSS プロパティ + - CSS リスト + - Reference + - list-style + - list-style-image +translation_of: Web/CSS/list-style-image +--- +
{{CSSRef}}
+ +

CSSlist-style-image プロパティは、リスト項目のマーカーとして使われる画像を設定します。

+ +

ふつうは一括指定の {{cssxref("list-style")}} を使うほうが便利です。

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

注: このプロパティはリスト項目、つまり、 {{cssxref("display")}}: list-item; が指定された要素に対して適用されます。既定では、 {{HTMLElement("li")}} 要素を含みます。このプロパティは継承されるので、親要素 (通常は {{HTMLElement("ol")}} や {{HTMLElement("ul")}}) に設定することで、すべてのリスト項目に適用することができます。

+
+ +

構文

+ +
/* キーワード値 */
+list-style-image: none;
+
+/* <url> 値 */
+list-style-image: url('starsolid.gif');
+
+/* グローバル値 */
+list-style-image: inherit;
+list-style-image: initial;
+list-style-image: unset;
+
+ +

+ +
+
{{cssxref("<url>")}}
+
マーカーとして使う画像の場所です。
+
none
+
画像をマーカーとして使用しないことを指定します。この値が設定された場合、代わりに {{ Cssxref("list-style-type") }} で定義されたマーカーが使われます。
+
+ +

公式定義

+ +

{{cssinfo}}

+ +

形式文法

+ +{{csssyntax}} + +

+ +

リスト項目の画像の設定

+ +

HTML

+ +
<ul>
+  <li>Item 1</li>
+  <li>Item 2</li>
+</ul>
+
+ +

CSS

+ +
ul {
+  list-style-image: url("https://mdn.mozillademos.org/files/11981/starsolid.gif");
+}
+ +

結果

+ +

{{ EmbedLiveSample('Setting_list_item_images') }}

+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{ SpecName('CSS3 Lists', '#propdef-list-style-image', 'list-style-image') }}{{ Spec2('CSS3 Lists') }}すべての {{cssxref("<image>")}} データ型をサポートするように拡張
{{ SpecName('CSS2.1', 'generate.html#propdef-list-style-image', 'list-style-image') }}{{ Spec2('CSS2.1') }}初回定義
+ +

ブラウザーの互換性

+ +

{{Compat("css.properties.list-style-image")}}

+ +

関連情報

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