因为很多标签在不同的浏览器下都有默认的margin值和padding值,因此将其值设置为0后便可解决问题。 <style type="text/css"> *{ margin:0px; padding:0px; } </style>