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/list-style-image/index.html | 115 +++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 files/ja/web/css/list-style-image/index.html (limited to 'files/ja/web/css/list-style-image') diff --git a/files/ja/web/css/list-style-image/index.html b/files/ja/web/css/list-style-image/index.html new file mode 100644 index 0000000000..e1f682fc74 --- /dev/null +++ b/files/ja/web/css/list-style-image/index.html @@ -0,0 +1,115 @@ +--- +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