﻿<?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>Xixi&#039;s Blog &#187; firefox</title>
	<atom:link href="http://www.xixis.net/archives/tag/firefox/feed" rel="self" type="application/rss+xml" />
	<link>http://www.xixis.net</link>
	<description>http://www.xixis.net  &#124;  Eternal Sunshine of the Spotless Mind</description>
	<lastBuildDate>Thu, 12 Jan 2012 06:04:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>浏览器标签选择</title>
		<link>http://www.xixis.net/archives/browser-tab-selected.html</link>
		<comments>http://www.xixis.net/archives/browser-tab-selected.html#comments</comments>
		<pubDate>Fri, 09 Jul 2010 18:46:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://www.xixis.net/archives/%e6%b5%8f%e8%a7%88%e5%99%a8%e6%a0%87%e7%ad%be%e9%80%89%e6%8b%a9.html</guid>
		<description><![CDATA[1. &#60;!&#8211;[if !IE]&#62;&#60;!&#8211;&#62; 除IE外都可识别 &#60;!&#8211;&#60;![endif]&#8211;&#62;   2. &#60;!&#8211;[if IE]&#62; 所有的IE可识别 &#60;![endif]&#8211;&#62;    3. &#60;!&#8211;[if IE 5.0]&#62; 只有IE5.0可以识别 &#60;![endif]&#8211;&#62;    4. &#60;!&#8211;[if IE 5]&#62; 仅IE5.0与IE5.5可以识别 &#60;![endif]&#8211;&#62;    5. &#60;!&#8211;[if gt IE 5.0]&#62; IE5.0以及IE5.0以上版本都可以识别 &#60;![endif]&#8211;&#62;    6. &#60;!&#8211;[if IE 6]&#62; 仅IE6可识别 &#60;![endif]&#8211;&#62;    7. &#60;!&#8211;[if lt IE 6]&#62; IE6以及IE6以下版本可识别 &#60;![endif]&#8211;&#62;    8. &#60;!&#8211;[if gte IE 6]&#62; IE6以及IE6以上版本可识别 &#60;![endif]&#8211;&#62;    9. &#60;!&#8211;[if IE 7]&#62; 仅IE7可识别 &#60;![endif]&#8211;&#62;    10. &#60;!&#8211;[if lt IE 7]&#62; IE7以及IE7以下版本可识别 &#60;![endif]&#8211;&#62;   ...]]></description>
			<content:encoded><![CDATA[<p>1. &lt;!&#8211;[if !<span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/ie" title="显示IE的所有日志" target="_blank">IE</a></span>]&gt;&lt;!&#8211;&gt; 除<span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/ie" title="显示IE的所有日志" target="_blank">IE</a></span>外都可识别 &lt;!&#8211;&lt;![endif]&#8211;&gt;   <br />2. &lt;!&#8211;[if IE]&gt; 所有的IE可识别 &lt;![endif]&#8211;&gt;    <br />3. &lt;!&#8211;[if IE 5.0]&gt; 只有IE5.0可以识别 &lt;![endif]&#8211;&gt;    <br />4. &lt;!&#8211;[if IE 5]&gt; 仅IE5.0与IE5.5可以识别 &lt;![endif]&#8211;&gt;    <br />5. &lt;!&#8211;[if gt IE 5.0]&gt; IE5.0以及IE5.0以上版本都可以识别 &lt;![endif]&#8211;&gt;    <br />6. &lt;!&#8211;[if IE 6]&gt; 仅IE6可识别 &lt;![endif]&#8211;&gt;    <br />7. &lt;!&#8211;[if lt IE 6]&gt; IE6以及IE6以下版本可识别 &lt;![endif]&#8211;&gt;    <br />8. &lt;!&#8211;[if gte IE 6]&gt; IE6以及IE6以上版本可识别 &lt;![endif]&#8211;&gt;    <br />9. &lt;!&#8211;[if IE 7]&gt; 仅IE7可识别 &lt;![endif]&#8211;&gt;    <br />10. &lt;!&#8211;[if lt IE 7]&gt; IE7以及IE7以下版本可识别 &lt;![endif]&#8211;&gt;    <br />11. &lt;!&#8211;[if gte IE 7]&gt; IE7以及IE7以上版本可识别 &lt;![endif]&#8211;&gt;</p>
<p> <span id="more-592"></span>
</p>
<p>&lt;!&#8211;[if lte IE 6]&gt;……&lt;![endif]&#8211;&gt;</p>
<p>Ite：less than or equal to意思是小于或等于IE6浏览器，用于IE浏览器的条件注释，常用于CSShack，针对IE的JS等。</p>
<p>在进行WEB标准网页的学习和应用过程中，网页对浏览器的兼容性是经常接触到的一个问题。其中因微软公司的Internet Explorer(简称IE)占据浏览器市场的大半江山，此外还有Firefox、Opera等。需要对这些浏览器进行兼容。</p>
<p>同时，单就IE而言，因IE版本的升级更替，目前浏览者使用的主要停留在 IE5(IE5.5)、IE6和IE7这三个版本中。而这3个版本对于我们制作的WEB标准网页（XHTML+CSS）解释执行的显示状况不尽相同。并且，其他非IE浏览器与IE对某些CSS解释也不一样。所以，通过IE浏览器中的专有条件注释可有针对性的进行相关属性的定义。</p>
<p>条件注释只能用于Explorer 5+ Windows(以下简称IE)(条件注释从IE5开始被支持)。如果你安装了多个IE，条件注释（Conditional comments）将会以最高版本的IE为标准（目前为IE 7）。</p>
<p>条件注释只能在windows Internet Explorer(以下简称IE)下使用，因此我们可以通过条件注释来为IE添加特别的指令。</p>
<p>通俗点，条件注释就是一些if判断，但这些判断不是在脚本里执行的，而是直接在<span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/html" title="显示html的所有日志" target="_blank">html</a></span>代码里执行的，比如：</p>
<p>&lt;!&#8211;[if IE]&gt;</p>
<p>这里是正常的<span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/html" title="显示html的所有日志" target="_blank">html</a></span>代码</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>1，条件注释的基本结构和HTML的注释(&lt;!&#8211; &#8211;&gt;)是一样的。因此IE以外的浏览器将会把它们看作是普通的注释而完全忽略它们。</p>
<p>2，IE将会根据if条件来判断是否如解析普通的页面内容一样解析条件注释里的内容。</p>
<p>3，条件注释使用的是HTML的注释结构，因此他们只能使用在HTML文件里，而不能在CSS文件中使用。</p>
<p>可使用如下代码检测当前IE浏览器的版本（注意：在非IE浏览器中是看不到效果的）</p>
<p>&lt;!&#8211;[if IE]&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;h1&gt;您正在使用IE浏览器&lt;/h1&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;!&#8211;[if IE 5]&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;h2&gt;版本 5&lt;/h2&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;![endif]&#8211;&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;!&#8211;[if IE 5.0]&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;h2&gt;版本 5.0&lt;/h2&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;![endif]&#8211;&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;!&#8211;[if IE 5.5]&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;h2&gt;版本 5.5&lt;/h2&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;![endif]&#8211;&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;!&#8211;[if IE 6]&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;h2&gt;版本 6&lt;/h2&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;![endif]&#8211;&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;!&#8211;[if IE 7]&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;h2&gt;版本 7&lt;/h2&gt;</p>
<p>&#160;&#160;&#160;&#160;&#160; &lt;![endif]&#8211;&gt;</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>那如果当前的浏览器是IE，但版本比IE5还低，该怎么办呢，可以使用&lt;!&#8211;[if ls IE 5]&gt;，当然，根据条件注释只能在IE5+的环境之下，所以&lt;!&#8211;[if ls IE 5]&gt;根本不会被执行。</p>
<p>lte：就是Less than or equal to的简写，也就是小于或等于的意思。</p>
<p>lt ：就是Less than的简写，也就是小于的意思。</p>
<p>gte：就是Greater than or equal to的简写，也就是大于或等于的意思。</p>
<p>gt ：就是Greater than的简写，也就是大于的意思。</p>
<p>! ：就是不等于的意思，跟javascript里的不等于判断符相同</p>
<p>Conditional comments属于CSS hack? 条件判断属于CSS hack吗？</p>
<p>严格地说是属于CSS hack。因为就好象其他真正的<span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/css" title="显示css的所有日志" target="_blank">css</a></span> hack一样，它使得我们可以给一些浏览器赋予特殊的样式，再则它不依赖于某个浏览器的BUG来控制另外一个浏览器（的样式）。除此之外，条件判断还能用来做一些超出CSS HACK范围的事情(虽然这种情况很少发生)。</p>
<p>因为条件判断不依赖于某个浏览器的hack,而是一个经过深思熟虑的特色功能，所以我相信它是可以被放心地使用的。当然，其他浏览器也有可能支持条件判断（到目前为止还没有），但是看起来，他们应该不会使用如&lt;!&#8211;[if IE]&gt;这样的语法。</p>
<p>应该如何应用条件注释</p>
<p>本文一开始就说明了，因为IE各版本的浏览器对我们制作的WEB标准的页面解释不一样，具体就是对CSS的解释不同，我们为了兼容这些，可运用条件注释来各自定义，最终达到兼容的目的。比如：</p>
<p>&lt;!&#8211; 默认先调用<span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/css" title="显示css的所有日志" target="_blank">css</a></span>.css样式表 &#8211;&gt;</p>
<p>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.zhmy.com/css.css&quot; /&gt;</p>
<p>&lt;!&#8211;[if IE 7]&gt;</p>
<p>&lt;!&#8211; 如果IE浏览器版是7,调用ie7.css样式表 &#8211;&gt;</p>
<p>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.zhmy.com/ie7.css&quot; /&gt;</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>&lt;!&#8211;[if lte IE 6]&gt;</p>
<p>&lt;!&#8211; 如果IE浏览器版本小于等于6,调用ie.css样式表 &#8211;&gt;</p>
<p>&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://www.zhmy.com/ie.css&quot; /&gt;</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>这其中就区分了IE7和IE6向下的浏览器对CSS的执行，达到兼容的目的。同时，首行默认的css.css还能与其他非IE浏览器实现兼容。</p>
<p>注意：默认的CSS样式应该位于HTML文档的首行，进行条件注释判断的所有内容必须位于该默认样式之后。</p>
<p>比如如下代码，在IE浏览器下执行显示为红色，而在非IE浏览器下显示为黑色。如果把条件注释判断放在首行，则不能实现。该例题很能说明网页对IE浏览器和非IE浏览器间的兼容性问题解决。</p>
<p>&lt;style type=&quot;text/css&quot;&gt;</p>
<p>body{</p>
<p>background-color: #000;</p>
<p>}</p>
<p>&lt;/style&gt;</p>
<p>&lt;!&#8211;[if IE]&gt;</p>
<p>&lt;style type=&quot;text/css&quot;&gt;</p>
<p>body{</p>
<p>background-color: #F00;</p>
<p>}</p>
<p>&lt;/style&gt;</p>
<p>&lt;![endif]&#8211;&gt;</p>
<p>同时，有人会试图使用&lt;!&#8211;[if !IE]&gt;来定义非IE浏览器下的状况，但注意：条件注释只有在IE浏览器下才能执行，这个代码在非IE浏览下非单不是执行该条件下的定义，而是当做注释视而不见。</p>
<p>正常就是默认的样式，对IE浏览器需要特殊处理的，才进行条件注释。</p>
<p>在HTML文件里，而不能在CSS文件中使用。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.xixis.net/archives/browser-tab-selected.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让 Firefox比Google Chrome更快</title>
		<link>http://www.xixis.net/archives/let-google-chrome-faster-than-firefox.html</link>
		<comments>http://www.xixis.net/archives/let-google-chrome-faster-than-firefox.html#comments</comments>
		<pubDate>Sat, 22 May 2010 10:07:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.xixis.net/archives/%e8%ae%a9-firefox%e6%af%94google-chrome%e6%9b%b4%e5%bf%ab.html</guid>
		<description><![CDATA[Google Chrome使Mozilla  Firefox在速度方面黯然失色。然而，我依然在使用Firefox作为主浏览器，因为在某些方面，它比Chrome更好。
最近，我通过一些调整和测试，大大的提升了Firefox的速度，使其在网页浏览方面比最新版的Chrome还要快一些。
下面就是我的一些操作步骤：
1.  在Firefox的URL/地址栏输入about:config并回车。在这里您会看到一个警告：修改这些高级设置可能会对本应用的稳定性、安全性以及性 能造成不良影响。请仅在您十分清楚的情况下继续操作。但是请继续并相信我。
2. 在Firefox的配置页面，滚动页面并找到下面两项：
network.http.pipelining
network.http.proxy.pipelining
通过双击将它们的值设置为true。
3. 下一步，找到这一项：
network.http.pipelining.maxrequests
双击并将值设置为8。
4. 右键点击配置页并选择新建&#8211;&#62;整数（I）。命名为
nglayout.initialpaint.delay并将值设置为0。
5. 右键点击配置页并选择新建&#8211;&#62;整数（I）。命名为content.notify.interval并将值设置为500000。
6. 右键点击配置页并选择新建&#8211;&#62;布尔（B）。命名为content.notify.ontimer并将值设置为true。
7. 右键点击配置页并选择新建&#8211;&#62;整数（I）。命名为content.switch.threshold并将值设置为250000。
8. 右键点击配置页并选择新建&#8211;&#62;布尔（B）。命名为content.interrupt.parsing并将值设置为false。
在接受上述调整之后，您应该可以立即感受到速度的提升。
禁用那些不常用的Firefox插件，阻止Flash内容，并使用一个轻量级的主题都有助于加快Firefox的速度。
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-
查看原文：Hacks to Make Firefox Faster than Google
]]></description>
			<content:encoded><![CDATA[<p>Google <span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/chrome" title="显示Chrome的所有日志" target="_blank">Chrome</a></span>使Mozilla  Firefox在速度方面黯然失色。然而，我依然在使用Firefox作为主浏览器，因为在某些方面，它比<span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/chrome" title="显示Chrome的所有日志" target="_blank">Chrome</a></span>更好。</p>
<p>最近，我通过一些调整和测试，大大的提升了Firefox的速度，使其在网页浏览方面比最新版的Chrome还要快一些。</p>
<p>下面就是我的一些操作步骤：<span id="more-517"></span></p>
<p>1.  在Firefox的URL/地址栏输入about:config并回车。在这里您会看到一个警告：修改这些高级设置可能会对本应用的稳定性、安全性以及性 能造成不良影响。请仅在您十分清楚的情况下继续操作。但是请继续并相信我。</p>
<p>2. 在Firefox的配置页面，滚动页面并找到下面两项：</p>
<blockquote><p>network.http.pipelining</p></blockquote>
<blockquote><p>network.http.proxy.pipelining</p></blockquote>
<p>通过双击将它们的值设置为true。</p>
<p>3. 下一步，找到这一项：</p>
<blockquote><p>network.http.pipelining.maxrequests</p></blockquote>
<p>双击并将值设置为8。</p>
<p>4. 右键点击配置页并选择新建&#8211;&gt;整数（I）。命名为</p>
<p>nglayout.initialpaint.delay并将值设置为0。</p>
<p>5. 右键点击配置页并选择新建&#8211;&gt;整数（I）。命名为content.notify.interval并将值设置为500000。</p>
<p>6. 右键点击配置页并选择新建&#8211;&gt;布尔（B）。命名为content.notify.ontimer并将值设置为true。</p>
<p>7. 右键点击配置页并选择新建&#8211;&gt;整数（I）。命名为content.switch.threshold并将值设置为250000。</p>
<p>8. 右键点击配置页并选择新建&#8211;&gt;布尔（B）。命名为content.interrupt.parsing并将值设置为false。</p>
<p>在接受上述调整之后，您应该可以立即感受到速度的提升。</p>
<p>禁用那些不常用的Firefox插件，阻止Flash内容，并使用一个轻量级的主题都有助于加快Firefox的速度。<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<h4>查看原文：<a rel="bookmark" href="http://www.junauza.com/2010/05/hacks-to-make-firefox-faster-than.html" target="_blank">Hacks to Make Firefox Faster than Google</a></h4>
]]></content:encoded>
			<wfw:commentRss>http://www.xixis.net/archives/let-google-chrome-faster-than-firefox.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>总结:CSS在IE与Firefox下的兼容性</title>
		<link>http://www.xixis.net/archives/summary-css-in-ie-and-firefox-compatibility-under-the.html</link>
		<comments>http://www.xixis.net/archives/summary-css-in-ie-and-firefox-compatibility-under-the.html#comments</comments>
		<pubDate>Thu, 06 Dec 2007 14:26:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://127.0.0.1/wp7/?p=68</guid>
		<description><![CDATA[ &#160; &#160; 1.DOCTYPE 影响 CSS 处理 　　2.FF: div 设置 margin-left, margin-right 为 auto 时已经居中, IE 不行 　　3.FF: body 设置 text-align 时, div 需要设置 margin: auto(主要是 margin-left,margin-right) 方可居中 　　4.FF: 设置 padding 后, div 会增加 height 和 width, 但 IE 不会, 故需要用 !important 多设一个 height 和 width 　　5.FF: 支持 !important, IE 则忽略, 可用 !important 为 FF 特别设置样式，值得注意的是，一定要将xxxx !important 这句放置在另一句之上 　　6.div 的垂直居中问题: vertical-align:middle; 将行距增加到和整个DIV一样高 line-height:200px; 然后插入文字，就垂直居中了。缺点是要控制内容不要换行 　　7.cursor: pointer 可以同时在 IE FF 中显示游标手指状， hand 仅 IE 可以 　　8.FF: 链接加边框和背景色，需设置 display: block, 同时设置 float: left 保证不换行。参照 menubar, 给 a 和 menubar 设置高度是为了避免底边显示错位, 若不设 height, ...]]></description>
			<content:encoded><![CDATA[<p><span id="more-68"></span><br/> &nbsp; &nbsp; 1.DOCTYPE 影响 CSS 处理 <br/>　　2.FF: div 设置 margin-left, margin-right 为 auto 时已经居中, <span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/ie" title="显示IE的所有日志" target="_blank">IE</a></span> 不行 <br/>　　3.FF: body 设置 text-align 时, div 需要设置 margin: auto(主要是 margin-left,margin-right) 方可居中 <br/>　　4.FF: 设置 padding 后, div 会增加 height 和 width, 但 <span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/ie" title="显示IE的所有日志" target="_blank">IE</a></span> 不会, 故需要用 !important 多设一个 height 和 width <br/><br/>　　5.FF: 支持 !important, <span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/ie" title="显示IE的所有日志" target="_blank">IE</a></span> 则忽略, 可用 !important 为 FF 特别设置样式，值得注意的是，一定要将xxxx !important 这句放置在另一句之上 <br/><br/><br/>　　6.div 的垂直居中问题: vertical-align:middle; 将行距增加到和整个DIV一样高 line-height:200px; 然后插入文字，就垂直居中了。缺点是要控制内容不要换行 <br/><br/>　　7.cursor: pointer 可以同时在 IE FF 中显示游标手指状， hand 仅 IE 可以 <br/><br/><br/>　　8.FF: 链接加边框和背景色，需设置 display: block, 同时设置 float: left 保证不换行。参照 menubar, 给 a 和 menubar 设置高度是为了避免底边显示错位, 若不设 height, 可以在 menubar 中插入一个空格。 <br/><br/>　　9.在mozilla <span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/firefox" title="显示firefox的所有日志" target="_blank">firefox</a></span>和IE中的BOX模型解释不一致导致相差2px解决方法：div{margin:30px!important;margin:28px;} <br/><br/>　　注意这两个margin的顺序一定不能写反，据阿捷的说法!important这个属性IE不能识别，但别的浏览器可以识别。所以在IE下其实解释成这样：div{maring:30px;margin:28px} bitsCN.nET中国网管博客 <br/><br/>　　重复定义的话按照最后一个来执行，所以不可以只写margin:XXpx!important; bitsCN.nET中国网管博客 <br/><br/>　　10.IE5 和IE6的BOX解释不一致 <br/><br/>　　IE5下div{width:300px;margin:0 10px 0 10px;} <br/><br/>　　div的宽度会被解释为300px-10px(右填充)-10px(左填充)最终div的宽度为 280px，而在IE6和其他浏览器上宽度则是以300px+10px(右填充)+10px(左填充)=320px来计算的。这时我们可以做如下修改 div{width:300px!important;width /**/:340px;margin:0 10px 0 10px} bitsCN.Com <br/><br/>　　关于这个/**/是什么我也不太明白，只知道IE5和<span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/firefox" title="显示firefox的所有日志" target="_blank">firefox</a></span>都支持但IE6不支持，如果有人理解的话，请告诉我一声，谢了！：） <br/><br/>　　11.ul标签在Mozilla中默认是有padding值的,而在IE中只有margin有值所以先定义ul{margin:0;padding:0;} &nbsp;<br/><br/>　　就能解决大部分问题 <br/><br/>　　注意事项： <br/><br/>　　1、float的div一定要闭合。 <br/><br/>　　例如：(其中floatA、floatB的属性已经设置为 float:left;)<br/><#div id=&#92;"floatA&#92;" > <br/><br/>　　<#div id=&#92;"floatB&#92;" > <br/><br/>　　<#div id=&#92;"NOTfloatC&#92;" > <br/><br/>　　这里的NOTfloatC并不希望继续平移，而是希望往下排。 <br/><br/>　　这段代码在IE中毫无问题，问题出在FF。原因是NOTfloatC并非float标签，必须将 float标签闭合。 DL.bitsCN.com网管软件下载 <br/><br/>　　在<#div class=&#92;"floatB&#92;"> <br/><br/>　　<#div class=&#92;"NOTfloatC&#92;"> <br/><br/>　　之间加上<#div class=&#92;"clear&#92;"> <br/><br/>　　这个div一定要注意声明位置，一定要放在最恰当的地方，而且必须与两个具有float属性的div同级，之间不能存在嵌套关系，否则会产生异常。 <br/>　　并且将clear这种样式定义为为如下即可：.clear{clear:both;} <br/><br/>　　此外，为了让高度能自动适应，要在wrapper里面加上overflow:hidden; bitsCN.nET中国网管博客 <br/><br/>　　当包含float的box的时候，高度自动适应在IE下无效，这时候应该触发IE的layout私有属性(万恶的IE啊！)用zoom:1;可以做到，这样就达到了兼容。 <br/><br/><br/>　　例如某一个wrapper如下定义：.colwrapper{ 　　<br/>verflow:hidden; <br/><br/>zoom:1; <br/><br/>margin:5px auto;} <br/><br/>2、margin加倍的问题。<br/><br/>　　设置为float的div 在ie下设置的margin会加倍。这是一个ie6都存在的bug。<br/>　　解决方案是在这个div里面加上 display:inline;<br/>例如：<br/><#div id=&#92;"imfloat&#92;"> <br/><br/>　　相应的<span class='wp_keywordlink_affiliate'><a href="http://www.xixis.net/archives/tag/css" title="显示css的所有日志" target="_blank">css</a></span>为<br/>#IamFloat{<br />float:left;<br/>margin:5px;/*IE下理解为10px*/<br />display:inline;/*IE下再理解为5px*/} <br/><br/>　　3、关于容器的包涵关系 <br/><br/>　　很多时候，尤其是容器内有平行布局，例如两、三个float的div时，宽度很容易出现问题。在IE 中，外层的宽度会被内层更宽的div挤破。一定要用Photoshop或者Firework量取像素级的精度。<br/><br />　　4、关于高度的问题 <br/><br/>　　如果是动态地添加内容，高度最好不要定义。浏览器可以自动伸缩，然而如果是静态的内容，高度最好定好。（似乎有时候不会自动往下撑开，不知道具体怎么回事） <br/><br/>　　5、最狠的手段 &#8211; !important; <br/><br/><br/>　　如果实在没有办法解决一些细节问题,可以用这个方法.FF对于&#8221;!important&#8221;会自动优先解析,然而IE则会忽略.如下.tabd1{<br/>background:url(/res /images/up/tab1.gif) no-repeat 0px 0px !important; /*Style for FF*/<br/>background:url(/res/images/up/tab1.gif) no-repeat 1px 0px; /* Style for IE */} 中国网管联盟 <br/><br/>　　值得注意的是，一定要将xxxx !important 这句放置在另一句之上，上面已经提过. <br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.xixis.net/archives/summary-css-in-ie-and-firefox-compatibility-under-the.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

