老的问题了,如今再次碰到,记录下来,给后来者方便!

众所周知,在Firefox下input type=”button”的文字是不好居中的,原因在于Firefox自己比较二,弄了个私有属性,导致以下问题的出现:

  1. 按钮左右本身有2px的间距(FF私有属性写了padding:0 2px所致);
  2. 按钮文字居中是不行的(此时设置padding-bottom是没用的) ;
  3. 等等…

解决办法:

input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="file"] > input[type="button"]::-moz-focus-inner{ 	border:none;padding:0; }

因为简单,所以不多写了,研究更是无从说起。

相关文章:

  • 2021-11-03
  • 2022-12-23
  • 2021-12-04
  • 2022-01-18
  • 2021-07-19
  • 2022-02-15
  • 2022-12-23
猜你喜欢
  • 2021-12-06
  • 2021-10-26
  • 2021-09-08
  • 2022-12-23
  • 2022-01-09
相关资源
相似解决方案