HTML-DOM Bild hspace Eigenschaft
Definition und Verwendung
hspace Eigenschaft Setzt oder sendet das Bild hspace Attributwerte.
Blank linken und rechten Rand des hspace Attribut gibt das Bild.
Grammatik
imageObject.hspace=pixels
Browser-Unterstützung
Alle gängigen Browser unterstützen hspace Eigentum
Beispiele
Beispiele
Das folgende Beispiel soll die hspace und vspace Attribute eines Bildes festgelegt:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Titel> Dieses Tutorial (w3big.com) </ title>
<Script>
Funktion setspace () {
document.getElementById ( "compman") hspace = "50" .;
document.getElementById ( "compman") vspace = "50" .;
}
</ Script>
</ Head>
<Body>
<Img id = "compman" src = "compman.gif" alt = "Computerman" width = "107" height = "98">
<P> Ein Text. Einige Text. Einige Text. Einige Text. </ P>
<Input type = "button" Onclick = "setspace ()" value = "stellen Sie den horizontalen und vertikalen Abstand">
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "UTF-8">
<Titel> Dieses Tutorial (w3big.com) </ title>
<Script>
Funktion setspace () {
document.getElementById ( "compman") hspace = "50" .;
document.getElementById ( "compman") vspace = "50" .;
}
</ Script>
</ Head>
<Body>
<Img id = "compman" src = "compman.gif" alt = "Computerman" width = "107" height = "98">
<P> Ein Text. Einige Text. Einige Text. Einige Text. </ P>
<Input type = "button" Onclick = "setspace ()" value = "stellen Sie den horizontalen und vertikalen Abstand">
</ Body>
</ Html>
Versuchen »
Bildobjekt