HTMLImageElement: hspace プロパティ
非推奨;: この機能は非推奨になりました。まだ対応しているブラウザーがあるかもしれませんが、すでに関連するウェブ標準から削除されているか、削除の手続き中であるか、互換性のためだけに残されている可能性があります。使用を避け、できれば既存のコードは更新してください。このページの下部にある互換性一覧表を見て判断してください。この機能は突然動作しなくなる可能性があることに注意してください。
hspace
は HTMLImageElement
インターフェイスの廃止されたプロパティで、ページをレイアウトする際に <img>
要素の左右に何ピクセル分の空きを残すかを指定します。
値
画像の左側と右側に適用する水平方向のマージンの幅をピクセル単位で指定する整数値です。
使用上の注意
hspace
に指定された値は margin-left
および margin-right
プロパティにマッピングされて、それらのマージンの幅をピクセル単位で指定します。
警告:
このプロパティは廃止されました。代わりに、CSS の margin
プロパティとその個別指定プロパティを使用して、<img>
の周囲に余白を設定してください。
仕様書
Specification |
---|
HTML # dom-img-hspace |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
hspace |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Deprecated. Not for use in new websites.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.