CSSlist -style-imageプロパティ
例
リスト内のリストアイテムマーカーとして画像を指定します。
ul
{
list-style-image: url('sqpurple.gif');
}
定義と使用法
このlist-style-image
プロパティは、リストアイテムマーカーを画像に置き換えます。
注:常にlist-style-typeプロパティを追加で指定してください。このプロパティは、何らかの理由で画像が利用できない場合に使用されます。
デフォルト値: | なし |
---|---|
遺伝性の: | はい |
アニメート可能: | 番号。アニメート可能について読む |
バージョン: | CSS1 |
JavaScript構文: | オブジェクト.style.listStyleImage = "url( 'smiley.gif')" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
Property | |||||
---|---|---|---|---|---|
list-style-image | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
CSS構文
list-style-image: none|url|initial|inherit;
プロパティ値
Value | Description | Play it |
---|---|---|
none | No image will be displayed. Instead, the list-style-type property will define what type of list marker will be rendered. This is default | |
url | The path to the image to be used as a list-item marker | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
関連ページ
CSSチュートリアル:CSSリスト
CSSリファレンス:リストスタイルのプロパティ
HTML DOMリファレンス:listStyleImageプロパティ