zoukankan      html  css  js  c++  java
  • ff下button按钮上的文字垂直居中

    在Firefox下input type=”button”的文字是不好居中的,原因在于Firefox自己弄了个私有属性,解决方法很简单,遇到类似问题的朋友可以学习下,希望可以帮助到大家

     

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

    众所周知,在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;
    }

    一个不敬业的前端攻城狮
  • 相关阅读:
    使用ab进行页面的压力测试
    apache http server2.2 + tomcat5.5 性能调优
    php Try Catch多层级异常测试
    用flask实现的添加后保留原url搜索条件
    会议室预定设计
    day4
    day3
    day2
    day1
    redis介绍以及安装
  • 原文地址:https://www.cnblogs.com/chaoming/p/3340908.html
Copyright © 2011-2022 走看看