HTML DOM propiedad Estilo listStyleImage
Objetos de estilo
Definición y Uso
listStyleImage conjuntos de propiedades o devuelve una lista de los elementos marcados como imágenes.
gramática
Configuración de las propiedades listStyleImage:
Object.style.listStyleImage="none|url|inherit"
listStyleImage propiedades para la espalda:
Object.style.listStyleImage
值 | 描述 |
---|---|
none | 默认。无图像显示。 |
url | 规定图像的路径。 |
inherit | listStyleImage 属性的值从父元素继承。 |
Soporte para el navegador
Todos los principales navegadores soportan la propiedad listStyleImage.
Nota: Internet Explorer 7 y versiones anteriores no son compatibles con el valor "heredar".IE8 sólo proporciona! DOCTYPE apoyado "hereda". apoyo IE9 "hereda".
Ejemplos
Ejemplos
Cambio artículos Lista Lista marcados:
<!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>
Trate »
Objetos de estilo