Image vspacePropiedad
Objeto Image
Definición y uso
La propiedad vspace establece o devuelve el espacio en blanco en la parte superior e inferior de una imagen.
Las propiedades space y vspace se pueden usar junto con align para establecer la distancia entre la imagen y el texto circundante.
Sintaxis
imageObject.vspace=pixels
Soporte del navegador
![]()
![]()
![]()
![]()
![]()
Todos los navegadores principales admiten la propiedad vspace
Ejemplo
Ejemplo
El siguiente ejemplo establecerá las propiedades hspace y vspace de la imagen:
<html>
<head>
<script>
function setSpace()
{
document.getElementById("compman").hspace="50";
document.getElementById("compman").vspace="50";
}
</script>
</head>
<body>
<img id="compman" src="compman.gif.html" alt="Computerman">
<p>Some text. Some text. Some text. Some text.</p>
<input type="button" onclick="setSpace()" value="Set hspace and vspace">
</body>
</html>
<head>
<script>
function setSpace()
{
document.getElementById("compman").hspace="50";
document.getElementById("compman").vspace="50";
}
</script>
</head>
<body>
<img id="compman" src="compman.gif.html" alt="Computerman">
<p>Some text. Some text. Some text. Some text.</p>
<input type="button" onclick="setSpace()" value="Set hspace and vspace">
</body>
</html>
Pruébalo »
Objeto Image Otras extensiones