<?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>IInterest &#187; Hack</title>
	<atom:link href="http://www.iinterest.net/tag/hack/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iinterest.net</link>
	<description>关注移动互联网 &#38; HTML5</description>
	<lastBuildDate>Sat, 07 Jan 2012 08:07:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>针对IE8的HACK</title>
		<link>http://www.iinterest.net/2009/11/03/ie8-hack/</link>
		<comments>http://www.iinterest.net/2009/11/03/ie8-hack/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 09:08:42 +0000</pubDate>
		<dc:creator>Bell</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://iinterest.net/blog/?p=536</guid>
		<description><![CDATA[前段时间费了好大的劲才弄了个伪IE8&#160;hack(关于IE8的HACK)&#8230;最近发现原来IE8是存在私有hack的,真悲剧&#8230; background:#ff6600\0; /*IE8 hack*/ 测试: &#60;!DOCTYPE html&#62; &#60;head&#62; &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=gb2312&#34; /&#62; &#60;title&#62;CSS阴影&#60;/title&#62; &#60;style type=&#34;text/css&#34;&#62; div{ width:100px; height:100px; background:#f1f1f1; background:#ff6600\0;} &#60;/style&#62; &#60;/head&#62; &#60;body&#62; &#60;div&#62;这个盒子的背景在IE8下是橙色的&#60;/div&#62; &#60;/body&#62; &#60;/html&#62; 提示：你可以先修改部分代码再运行。]]></description>
			<content:encoded><![CDATA[<p>前段时间费了好大的劲才弄了个伪IE8&nbsp;hack(<a href="http://iinterest.net/blog/2009/10/20/about-ie8-hack/">关于IE8的HACK</a>)&#8230;最近发现原来IE8是存在私有hack的,真悲剧&#8230;</p>
<blockquote><p>background:#ff6600\0; /*IE8 hack*/</p></blockquote>
<p>测试:</p>
<div class="runcode">
<p><textarea name="runcode" class="runcode_text" id="runcode_j3_ov4">
&lt;!DOCTYPE html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot; /&gt;
&lt;title&gt;CSS阴影&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
div{ width:100px; height:100px; background:#f1f1f1; background:#ff6600\0;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div&gt;这个盒子的背景在IE8下是橙色的&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="runcode_open_new('runcode_j3_ov4');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_j3_ov4');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.iinterest.net/2009/11/03/ie8-hack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[转]Firefox\Opera\Safari CSS Hack</title>
		<link>http://www.iinterest.net/2009/10/27/firefox-opera-safari-css-hack/</link>
		<comments>http://www.iinterest.net/2009/10/27/firefox-opera-safari-css-hack/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 02:37:40 +0000</pubDate>
		<dc:creator>Bell</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Hack]]></category>

		<guid isPermaLink="false">http://iinterest.net/blog/?p=527</guid>
		<description><![CDATA[能够为 Firefox、Opera、Safari 专写一个 Hack 的情况非常之少，所以以下 Hack 方式在我看来特别新奇。So，做个记录，不做火星人=.=! normal .sampleCss{ height:10px; } 1.Firefox 1-2 body:empty .sampleCss{ height:10px; } 2.Firefox @-moz-document url-prefix(){ .sampleCss{height:10px;} } 3.Safari @media screen and (-webkit-min-device-pixel-ratio:0){ .sampleCss{height:10px;} } 4.Opera @media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0){ head~body .sampleCss{ height:10px;} } 来源:http://www.silentash.com/blog/2009/147.html]]></description>
			<content:encoded><![CDATA[<p>能够为 Firefox、Opera、Safari 专写一个 Hack 的情况非常之少，所以以下 Hack  方式在我看来特别新奇。So，做个记录，不做火星人=.=!<br />
<strong>normal</strong></p>
<p><code>.sampleCss{<br />
height:10px;<br />
}</code></p>
<p><strong>1.Firefox  1-2</strong></p>
<p><code>body:empty .sampleCss{<br />
height:10px;<br />
}</code></p>
<p><strong>2.Firefox</strong></p>
<p><code>@-moz-document url-prefix(){<br />
.sampleCss{height:10px;}<br />
}</code><br />
<span id="more-527"></span><br />
<strong>3.Safari</strong></p>
<p><code>@media screen and (-webkit-min-device-pixel-ratio:0){<br />
.sampleCss{height:10px;}<br />
}</code></p>
<p><strong>4.Opera</strong></p>
<p><code>@media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0){<br />
head~body .sampleCss{ height:10px;}<br />
}</code></p>
<p>来源:http://www.silentash.com/blog/2009/147.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iinterest.net/2009/10/27/firefox-opera-safari-css-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>关于IE8的HACK</title>
		<link>http://www.iinterest.net/2009/10/20/about-ie8-hack/</link>
		<comments>http://www.iinterest.net/2009/10/20/about-ie8-hack/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 15:01:38 +0000</pubDate>
		<dc:creator>Bell</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://iinterest.net/blog/?p=515</guid>
		<description><![CDATA[这篇文章悲剧了&#8230;请移步针对IE8的HACK 这里介绍的IE8 hack其实名不副实,因为目前我还未找IE8的私有hack,记得beta时期有过,但那些hack在随后的正式版中被修复了,囧.所以IE8的hack其实就是其他浏览器hack的集合&#8230;看个例子: select{ left:-57px; left:4px\9; #left:-57px; _left:-57px;} left:-57px;  全局定义,所有浏览器都识别 [FF,chrome] left:4px\9;  IE hack,非IE浏览器无法识别 [IE8] #left:-57px;  IE7,6 识别  [IE7] _left:-57px;  IE6 识别  [IE6] 从例子可以看出,先是通过②定义全部IE的样式,再通过③④覆盖定义IE7,6的样式,这样使得IE8的最终解析为 left:4px\9; 虽然复杂了点,但还是可以达到预期的效果&#8230;不过最后还是啰嗦一句:Hack就像是止痛药,必要的时候还是可以救急,但滥用的话后果很严重&#8230;]]></description>
			<content:encoded><![CDATA[<p><strong>这篇文章悲剧了&#8230;请移步<a href="http://iinterest.net/blog/2009/11/03/ie8-hack/">针对IE8的HACK</a></strong></p>
<p>这里介绍的IE8 hack其实名不副实,因为目前我还未找IE8的私有hack,记得beta时期有过,但那些hack在随后的正式版中被修复了,囧.所以IE8的hack其实就是其他浏览器hack的集合&#8230;看个例子:</p>
<blockquote><p>select{ left:-57px; left:4px\9; #left:-57px; _left:-57px;}</p></blockquote>
<ol>
<li>left:-57px;  全局定义,所有浏览器都识别 [FF,chrome]</li>
<li>left:4px\9;  IE hack,非IE浏览器无法识别 [IE8]</li>
<li>#left:-57px;  IE7,6 识别  [IE7]</li>
<li>_left:-57px;  IE6 识别  [IE6]</li>
</ol>
<p>从例子可以看出,先是通过②定义全部IE的样式,再通过③④覆盖定义IE7,6的样式,这样使得IE8的最终解析为 left:4px\9;</p>
<p>虽然复杂了点,但还是可以达到预期的效果&#8230;不过最后还是啰嗦一句:Hack就像是止痛药,必要的时候还是可以救急,但滥用的话后果很严重&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.iinterest.net/2009/10/20/about-ie8-hack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hack:区分IE6/IE7/IE8/FF的一些常用的方法(1)</title>
		<link>http://www.iinterest.net/2009/05/09/hack-ie6-ie7-ie8-ff/</link>
		<comments>http://www.iinterest.net/2009/05/09/hack-ie6-ie7-ie8-ff/#comments</comments>
		<pubDate>Sat, 09 May 2009 07:47:11 +0000</pubDate>
		<dc:creator>Bell</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Hack]]></category>

		<guid isPermaLink="false">http://iinterest.net/blog/?p=266</guid>
		<description><![CDATA[CSS Hack法:写在样式表文件或HTML文档中,运用浏览器的HACK来达到解析不同样式表的目的~注意书写的顺序. .selector{ color:#ff0000; /* 所有浏览器 */ color:#ff66009; /* 所有IE浏览器 */ +color:#0044dd; /* IE7 */ _color:#000; /* IE6 */ } 看看演示: &#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#34;&#62; &#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62; &#60;head&#62; &#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=gb2312&#34; /&#62; &#60;title&#62;iinterest-hack&#60;/title&#62; &#60;style type=&#34;text/css&#34;&#62; &#8230; <a href="http://www.iinterest.net/2009/05/09/hack-ie6-ie7-ie8-ff/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>CSS Hack法:</strong>写在样式表文件或HTML文档中,运用浏览器的HACK来达到解析不同样式表的目的~注意书写的顺序.</p>
<blockquote><p><strong></strong> .selector{<br />
 color:#ff0000; /* 所有浏览器 */<br />
 color:#ff66009; /* 所有IE浏览器 */<br />
 +color:#0044dd; /* IE7 */<br />
 _color:#000; /* IE6 */<br />
}</p></blockquote>
<p>看看演示:</p>
<div class="runcode">
<p><textarea name="runcode" class="runcode_text" id="runcode_HQ_S9T">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot; /&gt;
&lt;title&gt;iinterest-hack&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
.selector{
	color:#ff0000; /* 所有浏览器 */
	color:#ff66009; /* 所有IE浏览器 */
	+color:#0044dd; /* IE7 */
	_color:#000; /* IE6 */
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;selector&quot;&gt;
	这是一个例子,不同的浏览器看到的颜色不同^_^
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="runcode_open_new('runcode_HQ_S9T');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_HQ_S9T');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
<p><span id="more-266"></span><br />
<br/><br />
<strong>IE注释法:</strong>写在HTML文档中,只适用于IE浏览器,可以让各版本的IE解析不同的HTML.<br />
<span style="color: #57a435;">语法:</span></p>
<blockquote><p> <span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!&#8211;[if <span style="color: #ff0000;">lt</span> IE 7]&gt;</span></span><br />
code here<br />
<span style="color: #888888;">&lt;![endif]&#8211;&gt;</span></p></blockquote>
<p>    <span style="color: #ff0000;">可以做一些高级点的判断：</span></p>
<ul>
<li>gt = selects greater than(高于)</li>
<li><span style="color: #ff0000;">lt</span> = selects less than(低于)</li>
<li>gte = selects greater than or equal to(&gt;=)</li>
<li>lte = selects less than or equal to(&lt;=)</li>
<li>! = selects everything except what directly follows the “!”(选择所有,除了!)</li>
</ul>
<p>看看演示:</p>
<div class="runcode">
<p><textarea name="runcode" class="runcode_text" id="runcode_3aXTjt">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot; /&gt;
&lt;title&gt;iinterest-hack&lt;/title&gt;
&lt;style type=&quot;text/css&quot;&gt;
div{ background:#F0FBFF;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div&gt;全部浏览器都可以看到这句话~=.=&lt;/div&gt;
&lt;br /&gt;
&lt;!--[if gte IE 7]&gt;&lt;div&gt;IE7或以上版本可以看到:)&lt;/div&gt;&lt;![endif]--&gt;
&lt;!--[if IE 6]&gt;&lt;div&gt;IE6浏览器可以看到,囧&lt;/div&gt;&lt;![endif]--&gt;
&lt;div style=&quot;display:none\9; background:#FFC;&quot;&gt;结合上面的例子,只让非IE浏览器看到~FF、Opera、chrome~&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</textarea></p>
<p><input type="button" value="运行" class="runcode_button" onclick="runcode_open_new('runcode_3aXTjt');"/> <input type="button" value="复制" class="runcode_button" onclick="runcode_copy('runcode_3aXTjt');"/> 提示：你可以先修改部分代码再运行。</p>
</div>
<p><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.iinterest.net/2009/05/09/hack-ie6-ie7-ie8-ff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chrome谷歌浏览器的CSS hack</title>
		<link>http://www.iinterest.net/2008/12/18/chrome-css-hack/</link>
		<comments>http://www.iinterest.net/2008/12/18/chrome-css-hack/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 05:31:35 +0000</pubDate>
		<dc:creator>Bell</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Hack]]></category>

		<guid isPermaLink="false">http://iinterest.net/blog/?p=32</guid>
		<description><![CDATA[Google于9月3号推出了浏览器Google Chrome，写前端效果的同志们又有得辛苦了，IE/FF/Opera/Safari/Google Chrome本来不太平的世界更混乱了。 　所幸Google Chrome用的是与Safari一样的Webkit引擎，我们可以使用对safari相似的方式作css hack，写法为： @media screen and (-webkit-min-device-pixel-ratio:0) { .selector{/* 针对Google Chrome、Safari 3.0 的CSS样式 */} } 　　另有一种通过附加#的Css hack对chrome无效，可能是Webkit版本不同。 　　此css hack无效 p.callout { color:#FF0000; font-weight:normal; } p.callout { color:#000000; font-weight:bold;# } 附：各种常见浏览器使用的内核 (Rendering Engine) Mozilla Firefox ( Gecko ) &#8230; <a href="http://www.iinterest.net/2008/12/18/chrome-css-hack/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Google于9月3号推出了浏览器Google Chrome，写前端效果的同志们又有得辛苦了，IE/FF/Opera/Safari/Google Chrome本来不太平的世界更混乱了。</p>
<p>　所幸Google Chrome用的是与Safari一样的Webkit引擎，我们可以使用对safari相似的方式作css hack，写法为：</p>
<div class="UBBPanel">
<div class="UBBContent">@media screen and (-webkit-min-device-pixel-ratio:0) {<br />
.selector{/* 针对Google Chrome、Safari 3.0 的CSS样式 */}<br />
}</div>
</div>
<p>　　另有一种通过附加#的Css hack对chrome无效，可能是Webkit版本不同。<br />
　　此css hack无效</p>
<div class="UBBPanel">
<div class="UBBContent">p.callout { color:#FF0000; font-weight:normal; }<br />
p.callout { color:#000000; font-weight:bold;# }</div>
</div>
<p>附：各种常见浏览器使用的内核 (Rendering Engine)</p>
<div class="UBBPanel">
<div class="UBBContent">Mozilla Firefox ( Gecko )<br />
Internet Explorer ( Trident )<br />
Opera ( Presto )<br />
Konqueror ( KHTML )<br />
Safari ( WebKit )<br />
Google Chrome ( WebKit )</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.iinterest.net/2008/12/18/chrome-css-hack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

