propriedade HTML DOM Estilo listStyleImage
estilo Objects
Definição e Uso
listStyleImage conjuntos de propriedades ou retorna uma lista de itens marcados como imagens.
gramática
Definindo as propriedades listStyleImage:
Object.style.listStyleImage="none|url|inherit"
Propriedades listStyleImage Voltar:
Object.style.listStyleImage
值 | 描述 |
---|---|
none | 默认。无图像显示。 |
url | 规定图像的路径。 |
inherit | listStyleImage 属性的值从父元素继承。 |
Suporte a navegadores
Todos os principais navegadores suportam propriedade listStyleImage.
Nota: IE7 e versões anteriores não suportam o valor "herdar".IE8 só fornece! DOCTYPE suportado "herdar". suporte IE9 "herdar".
Exemplos
Exemplos
itens Mudança lista lista marcada:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function displayResult(){
document.getElementById("ul1").style.listStyleImage="url('sqorange.gif')";
}
</script>
</head>
<body>
<ul id="ul1">
<li>Coffee</li>
<li>Tea</li>
<li>Water</li>
<li>Soda</li>
</ul>
<br>
<button type="button" onclick="displayResult()">修改列表项标记</button>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function displayResult(){
document.getElementById("ul1").style.listStyleImage="url('sqorange.gif')";
}
</script>
</head>
<body>
<ul id="ul1">
<li>Coffee</li>
<li>Tea</li>
<li>Water</li>
<li>Soda</li>
</ul>
<br>
<button type="button" onclick="displayResult()">修改列表项标记</button>
</body>
</html>
tente »
estilo Objects