スタイルlistStyleImageプロパティ
例
リスト内のリストアイテムマーカーとして画像を指定します。
document.getElementById("myList").style.listStyleImage = "url('sqorange.gif')";
定義と使用法
listStyleImageプロパティは、画像をリストアイテムマーカーとして設定または返します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
listStyleImage | Yes | Yes | Yes | Yes | Yes |
構文
listStyleImageプロパティを返します。
object.style.listStyleImage
listStyleImageプロパティを設定します。
object.style.listStyleImage = "none|url|initial|inherit"
プロパティ値
Value | Description |
---|---|
none | No image will be displayed. This is default |
url | Specifies the path to the image |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | なし |
---|---|
戻り値: | 画像のロケーションパスを表す文字列 |
CSSバージョン | CSS1 |
その他の例
例
list-style-imageプロパティ値を返します。
alert(document.getElementById("myList").style.listStyleImage);
関連ページ
CSSチュートリアル:CSSリスト
CSSリファレンス:list-style-imageプロパティ
HTML DOMリファレンス:listStyleプロパティ
❮スタイルオブジェクト