<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bolo的博客 &#187; FireFox</title>
	<atom:link href="http://blog.imbolo.com/tag/firefox/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.imbolo.com</link>
	<description>一个设计爱好者杂七杂八的博客</description>
	<lastBuildDate>Wed, 23 Nov 2011 16:19:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Firefox Input Button Line-Height Bug</title>
		<link>http://blog.imbolo.com/firefox-input-button-line-height-bug/</link>
		<comments>http://blog.imbolo.com/firefox-input-button-line-height-bug/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 07:33:56 +0000</pubDate>
		<dc:creator>bolo</dc:creator>
				<category><![CDATA[Develop]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[FireFox]]></category>
		<category><![CDATA[Opera]]></category>

		<guid isPermaLink="false">http://blog.imbolo.com/?p=1705</guid>
		<description><![CDATA[最近国外有开发者发现Firefox和Opera的一个BUG：无法改变按钮里文字的行高（包括input type="sumbit"和HTML的button标签）。]]></description>
			<content:encoded><![CDATA[<p>最近国外有开发者发现Firefox和Opera的一个BUG：无法改变按钮里文字的行高（包括input type=&#8221;sumbit&#8221;和HTML的button标签）。举个例子，对一个按钮使用以下样式：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">input<span style="color: #cc00cc;">#button</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#06f</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#06f</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#6cf</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span> <span style="color: #933;">12px</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>按照常理，这个样式将为按钮设置50px的行高，并使文本垂直居中。因为这个样式在Chrome、Safari和IE8里的表现都一致，唯独在Firefox和Opera里并没有表现出50px的行高，具体效果如下图。<span id="more-1705"></span></p>
<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/button-sizes-by-browser.png" alt="button-sizes-by-browser" /></p>
<h3>是什么原因引起了这个问题？</h3>
<p>在Firebug的帮助下，该开发人员发现虽然自己已经把行高设为50px，但Firefox依然使用15px的行高。</p>
<p><img src="http://i1001.photobucket.com/albums/af131/bolo1988/firebug-firefox-line-height.png" alt="firebug-firefox-line-height" /></p>
<p>该开发人员认为是Firefox强行限制了按钮文本的行高，于是编写了以下的CSS用于验证。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">ibutton<span style="color: #00AA00;">,</span> input<span style="color: #00AA00;">&#91;</span>type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;reset&quot;</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">,</span> input<span style="color: #00AA00;">&#91;</span>type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;button&quot;</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">,</span> input<span style="color: #00AA00;">&#91;</span>type<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span><span style="color: #00AA00;">&#93;</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #993333;">normal</span> !important<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>该开发人员发现，Firefox会私自把按钮内文本的行高设置为normal，这个值在Firefox里默认为15px，但各个浏览器对normal的值并没有一个统一的标准。最后这个开发人员放弃了通过行高把按钮撑开并使文本居中的方法，而采用了以下的样式，解决了Firefox的按钮行高问题。</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">input<span style="color: #cc00cc;">#button</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#06f</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#06f</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#6cf</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span> <span style="color: #933;">12px</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">18px</span> <span style="color: #933;">6px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>这并不是最好的办法，但也算是达到了所需的效果。</p>
<p>本文案例出自<a href="http://www.cssnewbie.com/input-button-line-height-bug/" rel="external nofollow">The Firefox Input Button Line-Height Bug</a></p>
<h3>后记</h3>
<p>我认为这个开发人员似乎并没有考虑到令一个CSS属性，而是抱着“完成了就好”的心态去解决问题。你认为这个所谓的BUG有更好的办法解决吗？欢迎讨论一下。</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://blog.imbolo.com/cross-browser-css-mutiple-background/" title="CSS：跨浏览器复合背景">CSS：跨浏览器复合背景</a></li><li><a href="http://blog.imbolo.com/oprea-version/" title="Oprea的怪异识别码">Oprea的怪异识别码</a></li><li><a href="http://blog.imbolo.com/ie9-released/" title="IE9 发布">IE9 发布</a></li><li><a href="http://blog.imbolo.com/css-turn-off-webkit-browsers-input-highlight-and-textarea-resize/" title="CSS 屏蔽 Webkit 浏览器 input 高亮和 textarea 缩放">CSS 屏蔽 Webkit 浏览器 input 高亮和 textarea 缩放</a></li><li><a href="http://blog.imbolo.com/jquery-selectors/" title="jQuery选择器详解（一）">jQuery选择器详解（一）</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.imbolo.com/firefox-input-button-line-height-bug/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>我喜爱的Firefox浏览器插件</title>
		<link>http://blog.imbolo.com/i-favorite-firefox-plugins/</link>
		<comments>http://blog.imbolo.com/i-favorite-firefox-plugins/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 13:06:09 +0000</pubDate>
		<dc:creator>bolo</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[FireFox]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://digau.cn/?p=1319</guid>
		<description><![CDATA[大名鼎鼎的Firefox(火狐)浏览器以快速的浏览速度和大量的插件而深受广大Web Designer的喜爱.下面我将介绍一下我喜欢的几个Firefox插件]]></description>
			<content:encoded><![CDATA[<p><a class="highslide-image" onclick="return hs.expand(this, {captionId:'caption_1253450707000'});" href="http://farm3.static.flickr.com/2612/3937245464_f085d99bfa_o.gif"><img class="alignright" title="Click to enlarge" src="http://farm3.static.flickr.com/2612/3937245464_0ae4f77a00_m.jpg" alt="image" /></a></p>
<div id="caption_1253450707000" class="highslide-caption">我喜爱的Firefox插件</div>
<p>大名鼎鼎的Firefox(火狐)浏览器以快速的浏览速度和大量的插件而深受广大Web Designer的喜爱.下面我将介绍一下我喜欢的几个Firefox插件,并进行简单的功能描述和评分(满分为5★,1★=2☆).</p>
<h5>1.Firebug</h5>
<p>Firebug通常被用来查看网页的框架结构,从而找出网页中可能存在的BUG.是不可多得的利器,也是众多Developer们的必装插件.<br />
实用指数:★★★★☆</p>
<h5>2.Yslow</h5>
<p>YSlow是yahoo美国开发的一个页面评分插件，非常的棒，从中我们可以看出我们页面上的很多不足，并且可以知道我们改怎么去改进和优化。对优化页面效率有很大帮助.<br />
实用指数:★★★★<br />
<span id="more-1319"></span><br />
<h5>3.Web Developer</h5>
<p>Web Developer不但可以验证当前网页是否符合W3C的相关标准,还可以控制是否使用缓存,是否允许执行JavaScript,是否允许读写Cookies等,还能方便地查看页面里相关标签的内容.是十分强大的一款页面分析工具.<br />
实用指数:★★★★☆</p>
<h5>4.Html Validator</h5>
<p>Html Validator是一款快速的页面错误提示工具,可以检测出页面是否有语法错误.<br />
实用指数:★★</p>
<h5>5.MeasureIt</h5>
<p>MeasureIt是一款标尺插件,可以方便地量出页面上某个元素的尺寸,是CSSer们的好帮手.<br />
实用指数:★★</p>
<p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://blog.imbolo.com/wordpress-seo-tips/" title="WordPress SEO 技巧：内链优化">WordPress SEO 技巧：内链优化</a></li><li><a href="http://blog.imbolo.com/wp-plugin-author-list-plus/" title="适合多人博客的作者列表插件：Author-List-Plus">适合多人博客的作者列表插件：Author-List-Plus</a></li><li><a href="http://blog.imbolo.com/access-your-feedburner-stats-from-wordpress-dashboard/" title="在 WordPress 后台查看 FeedBurner 数据">在 WordPress 后台查看 FeedBurner 数据</a></li><li><a href="http://blog.imbolo.com/wordpress-plugin-ibegin-share-mod/" title="WordPress 分享插件：iBegin Share (mod)">WordPress 分享插件：iBegin Share (mod)</a></li><li><a href="http://blog.imbolo.com/wordpress-microblog-plugin-wp-admin-microblog/" title="WordPress 微博插件： WP Admin Microblog">WordPress 微博插件： WP Admin Microblog</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.imbolo.com/i-favorite-firefox-plugins/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
	</channel>
</rss>

