火狐下,td 的 bug;

想实现类似的效果,看代码,

<div style="488px;float:left; margin:-52px 0px 15px 15px;">
  <table>
    <tr>
      <td style="text-align:center;70px;height:36px;background:#5776a3;color:#ffffff;border-radius: 5px 0px 0px 5px;cursor:pointer;border:1px solid #c4cdd8;diaplay:inline-block;">&nbsp;日&nbsp;</td>
      <td style="text-align:center;70px;height:36px;background:#f5f7f7;cursor:pointer;border:1px solid #c4cdd8;widht:120px;diaplay:inline-block;">&nbsp;月&nbsp;</td>
      <td style="text-align:center;70px;height:36px;background:#f5f7f7;cursor:pointer;border:1px solid #c4cdd8;widht:120px;diaplay:inline-block;">&nbsp;季&nbsp;</td>
      <td style="text-align:center;70px;height:36px;background:#f5f7f7;cursor:pointer;border-radius: 0px 5px 5px 0px;border:1px solid #c4cdd8;diaplay:inline-block;">&nbsp;年&nbsp;</td>
    </tr>
  </table>
</div>

火狐上,发现td右边都有一段margin,原来是因为display:inline-block;

直接将display:inline-block改成float:left;就解决了。

原文地址:https://www.cnblogs.com/ertingbo/p/7520776.html