<?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>蝎子's life &#187; hack</title>
	<atom:link href="http://ohblue.com/tag/hack/feed/" rel="self" type="application/rss+xml" />
	<link>http://ohblue.com</link>
	<description>蜘蛛般生活 -_-!</description>
	<lastBuildDate>Thu, 06 May 2010 13:01:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>针对IE8正式版的CSS hack</title>
		<link>http://ohblue.com/ie8-css-hack/</link>
		<comments>http://ohblue.com/ie8-css-hack/#comments</comments>
		<pubDate>Tue, 12 May 2009 21:50:14 +0000</pubDate>
		<dc:creator>蝎子</dc:creator>
				<category><![CDATA[笔记]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[ie8]]></category>

		<guid isPermaLink="false">http://ohblue.com/ie8-css-hack</guid>
		<description><![CDATA[IE8正式版出来有一段日志了，但是针对ie8正式版的CSS hack却很少，其实这是值得庆幸的，因为ie8修复了很多IE6和IE7的一些BUG，更加接近W3C标准。针对IE8正式版的CSS hack目前可以找到的分为2种。]]></description>
			<content:encoded><![CDATA[<h3>第一种：”\9″：</h3>
<pre class="brush:css;light: true">.test { color/*\**/: blue\9 }</pre>
<p>这个IE6、IE7、IE8都能识别；但是IE8不能识别“*”和“_”的css hack；所以我们可以这样写hack：</p>
<pre class="brush:css">.color1{ color:#F00; color/*\**/:#00F /*\**/}/*IE6,IE7,IE8,FF,OP,SA识别*/
.color2{ color:#F00; color /*\**/:#00F /*\9**/}/*IE7,IE8,FF,OP,SA识别*/
.color3{ color:#F00; color/*\**/:#00F \9}/*IE6,IE7,IE8识别*/
.color4{ color:#F00; color /*\**/:#00F\9}/*IE7,IE8识别*//*“color”和“/*\**/”之间有个空格*/</pre>
<h3>第二种：就是使用IE的条件注释</h3>
<p>条件注释是IE特有的一种功能，能对IE系列产品进行单独的XHTML代码处理，注意，主要是针对XHTML,而非CSS。<br />
条件注释功能非常强大，可以进行true和false判断。<br />
<span id="more-378"></span><br />
例如：</p>
<pre class="brush:html;light:true"><!--–[if IE]-->此内容只有IE可见<!--[endif]-->
<!--–[if IE 6.0]-->此内容只有IE6.0可见<!--[endif]--></pre>
<p>条件注释能被IE判断是什么版本的浏览器，并在符合条件的情况下显示其中的内容，从IE5.0到7.0都支持注释功能，而且版本号精确到小数点后4位：</p>
<pre class="brush:html;light:true"><!--–[if IE 6.1000]-->此内容只有IE6.1可见<!--[endif]--></pre>
<p>IE条件注释还支持感叹号非操作：</p>
<pre class="brush:html;light:true"><!--–[if !IE 6.0]-->此内容除了IE6.0版本之外都可见<!--[endif]--></pre>
<p>并且支持前缀，用于判断更高版本或是更低版本：</p>
<pre class="brush:html;light:true"><!--–[if gt IE 5.0]-->此内容只有IE5.0以上版本可见<!--[endif]--></pre>
<p>这里的gt全称为greater than表示当前条件版本以上版本，但不包含当前版本。<br />
还有其它几个前缀：<br />
lt 表示less than 当前条件版本以下的版本，不包含当前版本。<br />
gte 表示greeter than or equal 当前版本以上版本，并包含当前版本。<br />
lte 表示less than or equal 当前版本以下版本，并包含当前版本。</p>
<p>(转自WEB前端开发 http://www.css88.com/)</p>
]]></content:encoded>
			<wfw:commentRss>http://ohblue.com/ie8-css-hack/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

