<?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>嘟嘟鱼 &#187; hack</title>
	<atom:link href="http://www.duduyu.net/tag/hack/feed" rel="self" type="application/rss+xml" />
	<link>http://www.duduyu.net</link>
	<description>嘟嘟鱼的个人博客</description>
	<lastBuildDate>Thu, 15 Dec 2011 07:54:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>CSS hack:区分IE6，IE7，firefox</title>
		<link>http://www.duduyu.net/css-hack-distinction-between-ie6-ie7-firefox</link>
		<comments>http://www.duduyu.net/css-hack-distinction-between-ie6-ie7-firefox#comments</comments>
		<pubDate>Fri, 29 Jun 2007 16:58:00 +0000</pubDate>
		<dc:creator>嘟嘟鱼</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[ie7]]></category>

		<guid isPermaLink="false">http://www.kuaixiang.net/?p=309</guid>
		<description><![CDATA[区别不同浏览器，CSS hack写法： 形象的总结一下Firefox 、IE6、IE7三种浏览器的CSS Hack写法：（其中橙色代表FF、蓝色代表IE6、绿色代表IE7） 区别IE6与FF： background: orange; *background: blue; 区别IE6与IE7... ]]></description>
			<content:encoded><![CDATA[<h3>区别不同浏览器，CSS hack写法：</h3>
<p>形象的总结一下Firefox 、IE6、IE7三种浏览器的CSS Hack写法：（其中橙色代表FF、蓝色代表IE6、绿色代表IE7）<br />
区别IE6与FF：<br />
background: <span style="color: #ff8c00">orange</span>; *background: <span style="color: #0000ff">blue</span>;</p>
<p>区别IE6与IE7：<br />
background: <span style="color: #006400">green</span> !important; background: <span style="color: #0000ff">blue</span>;</p>
<p>区别IE7与FF：<br />
Background: <span style="color: #ff8c00">orange</span>; * background: <span style="color: #006400">green</span>;</p>
<p>区别FF，IE7，IE6：<br />
background: <span style="color: #ff8c00">orange</span>; *background: <span style="color: #006400">green</span> !important; *background: <span style="color: #0000ff">blue</span>;</p>
<p>备注：<br />
IE都能识别*，标准浏览器（如FF）不能识别*；<br />
IE6能识别*，但不能识别 !important；<br />
IE7能识别*，也能识别 !important；<br />
FF不能识别*，但能识别 !important；<br />
不管是什么方法，书写的顺序都是Firefox的写在前面，IE7写在中间，IE6写在最后面。</p>
<table border="1" cellPadding="0" cellSpacing="1" borderColor="#000000" style="width: 272px; height: 54px">
<tr>
<td>
<p align="center">IE6</p>
</td>
<td>
<p align="center">IE7</p>
</td>
<td>
<p align="center">FF</p>
</td>
</tr>
<tr>
<td>*</td>
<td>
<p align="center">√</p>
</td>
<td>
<p align="center">√</p>
</td>
<td>
<p align="center">×</p>
</td>
</tr>
<tr>
<td>!important</td>
<td>
<p align="center">×</p>
</td>
<td>
<p align="center">√</p>
</td>
<td>
<p align="center">√</p>
</td>
</tr>
</table>
<hr />另外再补充一个，下划线"<span class="red">_</span>",<br />
IE6支持下划线，IE7和firefox均不支持下划线。于是大家还可以这样来区分<span class="blue">IE6</span>，<span class="green">IE7</span>，<span class="orange">firefox</span><br />
: background:<span class="orange">orange</span>;<span class="red">*</span>background:<span class="green">green</span>;<span class="red">_</span>background:<span class="blue">blue</span>;</p>
<p>注：不管是什么方法，书写的顺序都是firefox的写在前面，IE7的写在中间，IE6的写在最后面。<br />
现在写一个CSS可以参照如下定义:<br />
#menu { padding-right: 150px }/* Moz */<br />
* html ＃menu { padding-right: 50px; } /* IE6 */<br />
*+html ＃menu { padding-right: 150px; }/* IE7*/</p>
<h3  class="related_post_title">您可能也对这些文章感兴趣</h3><ul class="related_post"><li><a href="http://www.duduyu.net/119" title="资讯进化 清爽风格发布 for  DedeCms OX V4.0">资讯进化 清爽风格发布 for  DedeCms OX V4.0</a></li><li><a href="http://www.duduyu.net/at-the-same-time-running-ie6-and-green-version-ie7" title="同时运行 IE6 和 IE7 绿色版">同时运行 IE6 和 IE7 绿色版</a></li><li><a href="http://www.duduyu.net/use-php-to-download-css-file-picture" title="利用PHP下载CSS文件中的图片">利用PHP下载CSS文件中的图片</a></li><li><a href="http://www.duduyu.net/shtml-file-under-the-firefox-browser-source-code-is-the-solution" title="FireFox下浏览shtml文件是源代码的解决">FireFox下浏览shtml文件是源代码的解决</a></li><li><a href="http://www.duduyu.net/13-pages-of-must-have-firefox-extension-of-the-design" title="13个网页设计必备的Firefox扩展">13个网页设计必备的Firefox扩展</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.duduyu.net/css-hack-distinction-between-ie6-ie7-firefox/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

