欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Firefox下input button內(nèi)文字不能垂直居中的解決方法

  發(fā)布時(shí)間:2013-08-01 12:04:32   作者:佚名   我要評論
在Firefox下input type=”button”的文字是不好居中的,原因在于Firefox自己弄了個(gè)私有屬性,解決方法很簡單,遇到類似問題的朋友可以學(xué)習(xí)下,希望可以幫助到大家
很老的問題了,如今再次碰到,記錄下來,給后來者方便!

眾所周知,在Firefox下input type=”button”的文字是不好居中的,原因在于Firefox自己比較二,弄了個(gè)私有屬性,導(dǎo)致以下問題的出現(xiàn):

1.按鈕左右本身有2px的間距(FF私有屬性寫了padding:0 2px所致);
2.按鈕文字居中是不行的(此時(shí)設(shè)置padding-bottom是沒用的) ;
3.等等…
解決辦法:

復(fù)制代碼
代碼如下:

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;
}

相關(guān)文章

最新評論