<?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>WEB前端开发 &#187; css hack</title>
	<atom:link href="http://www.css88.com/archives/tag/css-hack/feed" rel="self" type="application/rss+xml" />
	<link>http://www.css88.com</link>
	<description>专注前端开发，关注用户体验</description>
	<lastBuildDate>Mon, 06 Feb 2012 13:31:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>IE9的css hack</title>
		<link>http://www.css88.com/archives/3746</link>
		<comments>http://www.css88.com/archives/3746#comments</comments>
		<pubDate>Wed, 22 Jun 2011 07:54:43 +0000</pubDate>
		<dc:creator>愚人码头</dc:creator>
				<category><![CDATA[html+css]]></category>
		<category><![CDATA[css hack]]></category>
		<category><![CDATA[ie9]]></category>

		<guid isPermaLink="false">http://www.css88.com/?p=3746</guid>
		<description><![CDATA[以前写过《IE8的css hack》，ie9一出css hack也该更新，以前一直没关注，今天在内部参考群mxclion分享了IE9的css hack，拿出来也分享一下： select { background-color:red\0; /* ie 8/9*/ background-color:blue\9\0; /* ie 9*/ *background-color:#dddd00; /* ie 7*/ _background-color:#CDCDCD; /* ie 6*/ } 注意写hack的顺序，其中： background-color:red\0;IE8和IE9都支持； background-color:blue\9\0; 仅IE9支持； 更多其他hack关注：http://www.css88.com/archives/1681。 感谢mxclion，感谢内部参考群！ ===============华丽的分割线=============== 今天在http://blog.vervestudios.co/blog/post/2011/05/13/IE9-Only-CSS-Hack.aspx上看到另一种hack： #element { color:orange; } #element { *color: white; /* IE6+7, doesn&#039;t work in IE8/9 as IE7 */ } #element { _color: red; /* IE6 [...]]]></description>
		<wfw:commentRss>http://www.css88.com/archives/3746/feed</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>专属 CSS Hack</title>
		<link>http://www.css88.com/archives/2128</link>
		<comments>http://www.css88.com/archives/2128#comments</comments>
		<pubDate>Wed, 27 Jan 2010 09:46:38 +0000</pubDate>
		<dc:creator>愚人码头</dc:creator>
				<category><![CDATA[html+css]]></category>
		<category><![CDATA[css hack]]></category>

		<guid isPermaLink="false">http://www.css88.com/?p=2128</guid>
		<description><![CDATA[转载：浏览器专属 CSS Hack:区分 Firefox / Opera / Safari / Internet Explorer /* Opera */ html:first-child #opera { display: block; } /* IE 7 */ html &#62; body #ie7 { *display: block; } /* IE 6 */ body #ie6 { _display: block; } /* Firefox 1 - 2 */ body:empty #firefox12 { display: block; } /* [...]]]></description>
		<wfw:commentRss>http://www.css88.com/archives/2128/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>IE8的css hack</title>
		<link>http://www.css88.com/archives/1681</link>
		<comments>http://www.css88.com/archives/1681#comments</comments>
		<pubDate>Sat, 18 Jul 2009 04:47:20 +0000</pubDate>
		<dc:creator>愚人码头</dc:creator>
				<category><![CDATA[html+css]]></category>
		<category><![CDATA[css hack]]></category>
		<category><![CDATA[IE8]]></category>

		<guid isPermaLink="false">http://www.css88.com/?p=1681</guid>
		<description><![CDATA[首先感谢“丸子”提供的这个IE8的css hack； 关注过IE8的css hack的人相信大家都在使用这个hack，就是“\9”的css hack： .test{ color:#000000;                  /* FF,OP支持 */ color:#0000FF\9;       /* 所有IE浏览器(ie6+)支持 ；但是IE8不能识别“*”和“_”的css hack；所以我们可以这样写hack */ [color:#000000;color:#00FF00;      /* SF,CH支持 */ *color:#FFFF00;                 /* IE7支持 */ _color:#FF0000;               /* IE6支持 */ } 包括我自己也是使用这种的，这是我前段时间整理的《主流浏览器的一些CSS hack》。(转载请注明出处：WEB前端开发 http://www.css88.com/) 很多人再研究color:#0000FF\9;中的为什么IE6-IE8支持“\9”写法，和它的原理，我只是个工程师，不是科学家，我不懂为什么和它的真正原理，真的！很惭愧！ 昨天在某个群里也看到部分前端工程师或网页重构师势利的一面，同样的一个解决方案，大公司有名的前端工程师或网页重构师写的东西都追捧，而小公司没名气的前端工程师或网页重构师写的解决方案却被反问：“css有这种写法吗？看来你连最基本的css的几个属性和属性值都没搞懂；就算你解决了问题你写的css也是不规范的，就是规范你跟我讲讲你解决方案的原理；”同样的一个解决方案，大公司有名的前端工程师或网页重构师写的这些反问质疑就全都没了，拼命的去研究他这个解决方案，呵呵，我觉得那些人很可笑。还有很多人问问题只有得到大公司有名的前端工程师或网页重构师的肯定回答后才放心而又开心的走了，甚至不留一句谢谢。当然没人（包括我）否认大公司有名的前端工程师或网页重构师在业界的影响力，他们为前端和重构业界做的贡献大家都是看得到的，只是觉得做人（特别是我们做技术的）不能太势利，多一点技术共享和探讨，多一点感激，学习成长才是最重要的。我承认我以前经常骂人，骂人家SB，内参国王说的对，骂人家SB就等于骂自己SB，我以前是很SB。不想探讨就看着呗，骂人是不对的！(转载请注明出处：WEB前端开发 http://www.css88.com/) 扯远了，回到IE8的CSS hack，讲讲color:#0000FF\9： color:#0000FF\9的hack支持IE6-IE8（其他版本没有测试），但是IE8不能识别“*”和“_”的css hack，所以我们可以使用 color:#0000FF\9; ;/*ie6,ie7,ie8*/ *color:#FFFF00;/*ie7*/ _color:#FF0000;/*ie6*/ 来区分IE的各个版本。 至于为什么使用“\9”我真的不清楚原因，但是“丸子”测试了其他0-13的数字，最终结果如下： 其中：OP表示Opera，SA表示Safari，Ch表示Chrome；当然你如果还有耐心可以测试“\14”，“\15”，“\16”。。。 从上面测试结果我们可以看出“\0”的写法只被IE8识别，ie6，ie7都不能识别，那么“\0”应该是IE8的真正hack。主流浏览器的CSS hack这样更好一些： (转载请注明出处：WEB前端开发 http://www.css88.com/) .test{ color:#000000;                  /* FF,OP支持 */ color:#0000FF\0;       [...]]]></description>
		<wfw:commentRss>http://www.css88.com/archives/1681/feed</wfw:commentRss>
		<slash:comments>51</slash:comments>
		</item>
		<item>
		<title>主流浏览器的一些CSS hack</title>
		<link>http://www.css88.com/archives/1265</link>
		<comments>http://www.css88.com/archives/1265#comments</comments>
		<pubDate>Sat, 16 May 2009 17:56:54 +0000</pubDate>
		<dc:creator>愚人码头</dc:creator>
				<category><![CDATA[html+css]]></category>
		<category><![CDATA[css hack]]></category>

		<guid isPermaLink="false">http://www.css88.com/?p=1265</guid>
		<description><![CDATA[前段时间刚刚专门研究了的针对IE8的CSS hack(原文地址： http://www.css88.com/archives/1210 ),不过很多朋友还是问我一些其他浏览器的css hack，其实我还真的没有去研究过，今天有个朋友又问我了，我也称这个机会学习了一下。 主要hack如下：(转载请注明出处：WEB前端开发 http://www.css88.com/) .test{  color:#000000;                  /* FF,OP支持 */  color:#0000FF\9;       /* 所有浏览器IE浏览器(ie6+)支持 ；但是IE8不能识别“*”和“_”的css hack；所以我们可以这样写hack */  [color:#000000;color:#00FF00;      /* SF,CH支持 */  *color:#FFFF00;                 /* IE7支持 */  _color:#FF0000;                 /* IE6支持 */ } 另外随着google Chrome和Safari浏览器的流行，找google Chrome和Safari CSS hack的人也不少。我也找了一下： (转载请注明出处：WEB前端开发 http://www.css88.com/) body:nth-of-type(1) .CH{    color: #FF0000;/* 这是专门针对Chrome和Safari的CSS hack */ }   做了个简单的页面，大家可以使用各个浏览器测试一下：http://www.css88.com/demo/csshack/csshack.html 其中：OP表示Opera，SA表示Safari，Ch表示Chrome； (转载请注明出处：WEB前端开发 http://www.css88.com/) 声明: 本文采用 BY-NC-SA [...]]]></description>
		<wfw:commentRss>http://www.css88.com/archives/1265/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>针对IE8正式版的CSS hack</title>
		<link>http://www.css88.com/archives/1210</link>
		<comments>http://www.css88.com/archives/1210#comments</comments>
		<pubDate>Mon, 27 Apr 2009 10:43:06 +0000</pubDate>
		<dc:creator>愚人码头</dc:creator>
				<category><![CDATA[html+css]]></category>
		<category><![CDATA[css hack]]></category>
		<category><![CDATA[IE8]]></category>

		<guid isPermaLink="false">http://www.css88.com/?p=1210</guid>
		<description><![CDATA[IE8正式版出来有一段日志了，但是针对ie8正式版的CSS hack却很少，其实这是值得庆幸的，因为ie8修复了很多IE6和IE7的一些BUG，更加接近W3C标准。 针对IE8正式版的CSS hack目前可以找到的分为2种：(转载请注明出处：WEB前端开发 http://www.css88.com/) 第一种：”\9&#8243;： 基本的写法: .test { color/*\**/: blue\9 } 这个IE6、IE7、IE8都能识别；但是IE8不能识别“*”和“_”的css hack；所以我们可以这样写hack：(转载请注明出处：WEB前端开发 http://www.css88.com/) .header {width:300px;} /* 所有浏览器*/ .header {width/*\**/:330px\9;} /* 所有浏览器IE浏览器 */ .header {*width:310px;} /* IE7和IE6能识别,IE8和FF不能识别*/ .header {_width:290px;} /* IE6能识别，IE7、IE8和FF不能识别*/ 第二种：就是使用IE的条件注释 具体可以查看这里：http://www.css88.com/archives/705； (转载请注明出处：WEB前端开发 http://www.css88.com/)  其他一些css hack的测试： .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”和“/*\**/”之间有个空格*/ [...]]]></description>
		<wfw:commentRss>http://www.css88.com/archives/1210/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

