<?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>13RD的博客道 &#187; hack</title>
	<atom:link href="http://blog.13rd.com/tag/hack/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.13rd.com</link>
	<description>A WordPress Blog?!</description>
	<lastBuildDate>Wed, 28 Dec 2011 04:58:02 +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>[转载]css hack简易的“独享”与“交集”</title>
		<link>http://blog.13rd.com/2008/08/31/css-hack/</link>
		<comments>http://blog.13rd.com/2008/08/31/css-hack/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 17:12:35 +0000</pubDate>
		<dc:creator>13rd</dc:creator>
				<category><![CDATA[网站]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://blog.13rd.com/?p=285</guid>
		<description><![CDATA[以下内容转载自：http://www.1sight.cn/?p=152 最近正在做首页，处理很棘手的浏览器兼容的问题，主要调试的浏览器为 IE6 ,IE7 ,FF3 ,Opera9.5 ,Safari3.1.2 兼容浏览器是一种很费神的工作，和前期的页面设计也是很有关系的。如何合理设计出易制作，易维护，易扩展的页面可是非常具有水准的工作，这个可是我的努力目标，当然除了个人努力之外，还有点很直接的关系就是BOSS们是否肯花时间让你去分析目前网站的架构和布局，好了，话不多说了，应该谈谈我这些日子碰到的兼容性问题了。 我制作页面完成之后，首先的工作一定会是去检验下页面是否通过 w3c 和 css 的2个标准，当然，并不是说，一定要通过这个标准，其实去检测页面的目的应该是看一下自己写的页面，是否合理？是否有一些不合标准的标签的运用，这个对之后进行的工作有很大的帮助。 其次就是关于浏览器的兼容性问题了，关于这个什么浏览器为什么不能兼容我就不多提了，我就罗列一下，我常用的css hack吧，不考虑ie6以下版本了。。 各大浏览器独享hack ie6： “_“下划线是它的独享，例如: _background-color:#000; ie7： “+!important” 复杂了点，但是为了效果… ，例如: + background-color:#000 !important; FF： “!important“,他和ie7有很多类似，如果想要区分开ie和FF,只要把FF的代码写在ie的前面即可（下面会写到） ，例如: background-color:#000 !important; 各大浏览器交集hack 以下段落出自CSS hack:区分IE6，IE7，firefox 区别不同浏览器，CSS hack写法： 区别IE6与FF： background:orange; *background:blue; 区别IE6与IE7： &#8230; <a href="http://blog.13rd.com/2008/08/31/css-hack/">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>以下内容转载自：http://www.1sight.cn/?p=152<br />
最近正在做首页，处理很棘手的浏览器兼容的问题，主要调试的浏览器为 IE6 ,IE7 ,FF3 ,Opera9.5 ,Safari3.1.2</p>
<p>兼容浏览器是一种很费神的工作，和前期的页面设计也是很有关系的。如何合理设计出易制作，易维护，易扩展的页面可是非常具有水准的工作，这个可是我的努力目标，当然除了个人努力之外，还有点很直接的关系就是BOSS们是否肯花时间让你去分析目前网站的架构和布局，好了，话不多说了，应该谈谈我这些日子碰到的兼容性问题了。</p>
<p>我制作页面完成之后，首先的工作一定会是去检验下页面是否通过 <a href="http://validator.w3.org/" target="_blank">w3c</a> 和 <a href="http://jigsaw.w3.org/css-validator/" target="_blank">css</a> 的2个标准，当然，并不是说，一定要通过这个标准，其实去检测页面的目的应该是看一下自己写的页面，是否合理？是否有一些不合标准的标签的运用，这个对之后进行的工作有很大的帮助。</p>
<p>其次就是关于浏览器的兼容性问题了，关于这个什么浏览器为什么不能兼容我就不多提了，我就罗列一下，我常用的<a class="st_tag internal_tag" title="标签 css 下的日志" href="http://www.1sight.cn/?tag=css">css</a> hack吧，不考虑ie6以下版本了。。</p>
<p><span style="text-decoration: underline;"><strong>各大浏览器独享hack</strong></span></p>
<p><strong><span style="color: #ff00ff;">ie6</span></strong>： “<strong><span style="color: #ff0000;">_</span></strong>“下划线是它的独享，例如: <strong><span style="color: #ff0000;">_</span></strong>background-color:#000;</p>
<p><strong><span style="color: #ff6600;">ie7</span></strong>： “<span style="color: #008000;"><strong>+!importan</strong>t</span>” 复杂了点，但是为了效果… ，例如:  <span style="color: #008000;">+</span> background-color:#000 <strong><span style="color: #008000;">!important</span></strong>;</p>
<p><strong><span style="color: #0000ff;">FF</span></strong>： “<strong><span style="color: #008000;">!important</span></strong>“,他和ie7有很多类似，如果想要区分开ie和FF,只要把FF的代码写在ie的前面即可（下面会写到）  ，例如: background-color:#000<span style="color: #008000;"> <strong>!important</strong></span>;</p>
<p><span style="text-decoration: underline;"><strong>各大浏览器交集hack</strong></span><br />
以下段落出自<a href="http://www.div-css.com/html/XHTML-CSS/hack/1136667.html" target="_blank">CSS  hack:区分IE6，IE7，firefox</a></p>
<blockquote style="padding: 5px 20px 10px; background-color: #f4f4f4;"><p>区别不同浏览器，<a class="st_tag internal_tag" title="标签 css 下的日志" href="http://www.1sight.cn/?tag=css">CSS</a> hack写法：</p>
<p>区别<strong><span style="color: #ff00ff;">IE6</span></strong>与<strong><span style="color: #0000ff;">FF</span></strong>：<br />
background:orange; <strong><span style="color: #ff0000;">*</span></strong>background:blue;</p>
<p>区别<strong><span style="color: #ff00ff;">IE6</span></strong>与<span style="color: #ff6600;"><strong>IE7</strong></span>：<br />
background:green<span style="color: #ff0000;"> <strong>!important</strong></span>; background:blue;</p>
<p>区别<strong><span style="color: #ff6600;">IE7</span></strong>与<strong><span style="color: #0000ff;">FF</span></strong>：<br />
background:orange; <strong><span style="color: #ff0000;">*</span></strong>background:green;</p>
<p>区别<strong><span style="color: #0000ff;">FF</span></strong>，<strong><span style="color: #ff6600;">IE7</span></strong>，<strong><span style="color: #ff00ff;">IE6</span></strong>：<br />
background:orange;<span style="color: #ff0000;"> <strong>*</strong></span>background:green <strong><span style="color: #ff0000;">!important</span></strong>; <strong><span style="color: #ff0000;">*</span></strong>background:blue;</p>
<p>注：IE都能识别*;标准浏览器(如FF)不能识别*；<br />
<strong><span style="color: #ff00ff;">IE6能识别*，但不能识别  !important,</span></strong><br />
<strong><span style="color: #ff6600;">I</span><span style="color: #ff6600;">E7能识别*，也能识别!important;</span></strong><br />
<strong><span style="color: #0000ff;">FF不能识别*，但能识别!important</span></strong></p>
<table style="border: 1px solid #cccccc; width: 80%;" border="0" cellspacing="1" cellpadding="0">
<tbody>
<tr>
<td style="border: 1px solid #cccccc;"></td>
<td style="border: 1px solid #cccccc;">IE6</td>
<td style="border: 1px solid #cccccc;">IE7</td>
<td style="border: 1px solid #cccccc;">FF</td>
</tr>
<tr>
<td style="border: 1px solid #cccccc;">*</td>
<td style="border: 1px solid #cccccc;">√</td>
<td style="border: 1px solid #cccccc;">√</td>
<td style="border: 1px solid #cccccc;">×</td>
</tr>
<tr>
<td style="border: 1px solid #cccccc;">!important</td>
<td style="border: 1px solid #cccccc;">×</td>
<td style="border: 1px solid #cccccc;">√</td>
<td style="border: 1px solid #cccccc;">√</td>
</tr>
</tbody>
</table>
<p><strong><span style="text-decoration: underline;"><span style="color: #800080;">IE6支持下划线，IE7和firefox均不支持下划线。</span></span></strong></p>
<p>于是大家还可以这样来区分IE6，IE7，firefox<br />
background:orange;<strong><span style="color: #ff0000;">*</span></strong>background:green;<strong><span style="color: #008000;">_</span></strong>background:blue;</p>
<p><span style="text-decoration: underline;"><strong><span style="color: #800080;">这个很重要：<span style="color: #ff6600;">不管是什么方法，书写的顺序都是firefox的写在前面，IE7的写在中间，IE6的写在最后面。</span></span></strong></span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.13rd.com/2008/08/31/css-hack/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

