Why font-family sporadically adds 1px gap between buttons?

后端 未结 8 823
小蘑菇
小蘑菇 2020-12-16 12:13

Please read the question carefully. It\'s not the same as the one about How to remove the space between inline-block elements.

Consider the followin

8条回答
  •  醉梦人生
    2020-12-16 12:58

    Check the demo and use this CSS. If you have not satisfied, just change the font size. It will get fixed.

    body {
      font-family: Arial;
      font-size: 15px;
      
    }
    
    .my-class {
      display: inline-block;
      margin: 0 0 0 -4px;
      background-color: ccc;
      border: 1px solid #ccc;
      padding: 20px;
    }

    See also JSfiddle.

提交回复
热议问题