怎样清除td和input之间空隙

<style>
input {background:red;border:none;height:30px;margin:0px}
td {background-color:blue;padding:0px;margin:0px}
</style>

<table cellspacing=10 cellpadding=0 bgcolor="pink">
<tr>
<td><input type="text"/></td>
<td><input type="text"/></td>
</tr>
<tr>

如图:

red input的上下有细blue线。怎样去掉?

 

修改后

<style>
input {background:red;border:none;height:30px;margin-top:-1px;margin-bottom:-1px;}
}
td {background-color:blue;padding:0px;margin:0px}
</style>

<table cellspacing=10 cellpadding=0 bgcolor="pink">
<tr>
<td><input type="text"/></td>
<td><input type="text"/></td>
</tr>
<tr>
<td>11
</td>
<td>11
</td>
</tr></table>

 
原文地址:https://www.cnblogs.com/SFAN/p/3673587.html