HTML图像对齐
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>图像对齐方式</title> <style type="text/css"> img{width: 100px;} </style> </head> <body bgcolor="aliceblue"> <h2 align="center">设置图像对齐方式</h2> <hr color="aqua" /> <table border="1" cellspacing="" cellpadding=""> <tr align="center"> <td>图像垂直对齐方式</td> <td>图像水平对齐方式</td> </tr> <tr> <td><img src="img/HH.jpg" align="top" />图像顶部top与文字对齐,当前行高度,相应扩大</td> <td><img src="img/HH.jpg" align="left" />图像左对齐,浮动游离于文字之外</td>
</tr> </table> </body> </html>
table表示表格 tr表示行 td表示一行的一小格

vspace 和hspace省略略略略

浙公网安备 33010602011771号