
			<p>很老的问题了，如今再次碰到，记录下来，给后来者方便！</p>
<p>众所周知，在Firefox下input type=&#8221;button&#8221;的文字是不好居中的，原因在于Firefox自己比较二，弄了个私有属性，导致以下问题的出现：</p>
<ol>
<li>按钮左右本身有2px的间距（FF私有属性写了padding:0 2px所致）；</li>
<li>按钮文字居中是不行的（此时设置padding-bottom是没用的） ；</li>
<li>等等&#8230;</li>
</ol>
<p><strong>解决办法：</strong></p>
<pre style="margin: 15px 0; font: 100 12px/18px monaco, andale mono, courier new; padding: 10px 12px; border: #ccc 1px solid; border-left-width: 4px; background-color: #fefefe; box-shadow: 0 0 4px #eee; word-break: break-all; word-wrap: break-word; color: #444;"><span style="color: #170;">input</span>[<span style="color: #170;">type</span>=<span style="color: #a11;">"reset"</span>]::<span style="color: #170;">-moz-focus-inner</span>,
<span style="color: #170;">input</span>[<span style="color: #170;">type</span>=<span style="color: #a11;">"button"</span>]::<span style="color: #170;">-moz-focus-inner</span>,
<span style="color: #170;">input</span>[<span style="color: #170;">type</span>=<span style="color: #a11;">"submit"</span>]::<span style="color: #170;">-moz-focus-inner</span>,
<span style="color: #170;">input</span>[<span style="color: #170;">type</span>=<span style="color: #a11;">"file"</span>] &gt; <span style="color: #170;">input</span>[<span style="color: #170;">type</span>=<span style="color: #a11;">"button"</span>]::<span style="color: #170;">-moz-focus-inner</span>{
	<span style="color: #000;">border</span>:<span style="color: #164;">none</span>;<span style="color: #000;">padding</span>:<span style="color: #164;">0</span>;
}</pre>
<p>因为简单，所以不多写了，研究更是无从说起。</p>
<p>转载请注明：<a href="http://www.daqianduan.com">大前端</a> &raquo; <a href="http://www.daqianduan.com/firefox-input-button/">解决Firefox下input button内文字垂直居中</a></p>		