HTML 参考手册
HTML <img> hspace 属性
CSS 实例:带有边距的图像
源代码:
点击运行 »
<!DOCTYPE html> <html> <body> <h4>Image with no margins:</h4> <p><img src="/examples/smiley.gif" alt="Smiley face" width="42" height="42" align="middle"> This is some text. This is some text. This is some text.</p> <h4>Image with 50px margins on left and right sides:</h4> <p><img src="/examples/smiley.gif" alt="Smiley face" width="42" height="42" align="middle" style="margin:0px 50px">This is some text. This is some text. This is some text.</p> </body> </html>
运行结果:
点击运行 »