火狐下,td 的 bug;

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

<div style="width:488px;float:left; margin:-52px 0px 15px 15px;">
  <table>
    <tr>
      <td style="text-align:center;width: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;width:70px;height:36px;background:#f5f7f7;cursor:pointer;border:1px solid #c4cdd8;widht:120px;diaplay:inline-block;">&nbsp;月&nbsp;</td>
      <td style="text-align:center;width:70px;height:36px;background:#f5f7f7;cursor:pointer;border:1px solid #c4cdd8;widht:120px;diaplay:inline-block;">&nbsp;季&nbsp;</td>
      <td style="text-align:center;width: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;就解决了。

相关文章:

  • 2021-06-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
  • 2021-07-01
猜你喜欢
  • 2021-11-27
  • 2022-12-23
  • 2021-04-20
  • 2021-09-19
  • 2022-01-08
  • 2021-11-30
  • 2021-11-27
相关资源
相似解决方案