HTML DOM
The deprecated hspace property of the HTMLImageElement interface specifies the number of pixels of empty space to leave empty on the left and right sides of the img element when laying out the page. It reflects the <img> element's hspace content attribute.
You should instead use the CSS property margin or its longhand properties to establish margin space around an image.
Value
An integer value specifying the width, in pixels, of the horizontal margin to apply to the left and right sides of the image.
Specifications
Browser compatibility
See also
- margin
- HTMLImageElement.vspace
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
