<?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>safari &#8211; WL</title>
	<atom:link href="https://wwl3.com/tag/safari/feed/" rel="self" type="application/rss+xml" />
	<link>https://wwl3.com</link>
	<description>越来越好，越好越来</description>
	<lastBuildDate>Thu, 18 Sep 2014 14:15:29 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://wwl-1316477995.cos.ap-shanghai.myqcloud.com/uploads/2023/01/logo-188x188.jpg</url>
	<title>safari &#8211; WL</title>
	<link>https://wwl3.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Safari/Chorme/Webkit-based Browsers CSS hack redux</title>
		<link>https://wwl3.com/2009/07/safarichormewebkit-based-browsers-css-hack-redux/</link>
		
		<dc:creator><![CDATA[王万林]]></dc:creator>
		<pubDate>Thu, 23 Jul 2009 01:21:52 +0000</pubDate>
				<category><![CDATA[WEB规范]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[safari]]></category>
		<category><![CDATA[Xhtml CSS]]></category>
		<guid isPermaLink="false">http://wwl3.com/?p=453</guid>

					<description><![CDATA[Safari CSS Hack写法。
@media screen and (-webkit-min-device-pixel-ratio:0) {
/* Safari 3.0 and Chrome rules here */
}]]></description>
										<content:encoded><![CDATA[<p>In March 2007, I wrote about a <a href="http://themechanism.com/blog/2007/03/28/safari-css-hack/">Safari <abbr title="Cascading Style Sheets">CSS</abbr> hack</a> called the &#8220;Pound Safari Post Semicolon&#8221; hack (coined by Tony at <a rel="external" href="http://www.simiandesign.com/blog-fu/2005/11/safari_css_hack.php">Simian Design</a>). As of Safari 3.0, this hack no longer works. However, there <em>is</em> a way to target Safari 3.0:</p>
<blockquote><p>@media screen and (-webkit-min-device-pixel-ratio:0) {<br />
/* Safari 3.0 and Chrome rules here */<br />
}</p></blockquote>
<p>As always, the disclaimer: nobody condones the use of hacks, but we all (well, most of us) have to make use of them at least once in a while. The above code targets both Safari 3.0 and Google&#8217;s Chrome. Hopefully, it will be a future-proof hack, since the -webkit part of the selector will probably not be adopted by other browsers.</p>
<p>Example: The following code set the background color of the &lt;body&gt; element red in all browsers and then resets it to blue in Safari 3.0 and Chrome.<br />
<code>body { background-color: red; }<br />
@media screen and (-webkit-min-device-pixel-ratio:0) {<br />
body { background-color: blue; }<br />
}</code><br />
[<a href="https://wwl3.com/wp-content/sample/safari-css-hack-redux/safari-css-hack.html">demo</a>]</p>
<p><em>Tested on Mac OS X version 10.5.1 with Safari version 3.0.4 (5523.10.6) and Mozilla Firefox version 2.0.0.11. Tested on Windows XP Professional Version 2002 SP 2 with Mozilla Firefox version 2.0.0.11, Opera 9.10, and Microsoft Internet Explorer 6. Hack from <a rel="external" href="http://www.evotech.net/blog/2007/06/targeting-safari-30-with-css/">CSS, JavaScript and XHTML Explained</a>.</em></p>
<p><strong>Update 2008-11-26:</strong> Since this hack targets Webkit-based browsers, Chrome is also affected. At the original time of writing, it also affected Opera (9.10); it hasn&#8217;t since 9.50. The post copy has been updated to reflect these developments.</p>
<p>This article comes from :<a title="Permanent Link to Safari CSS hack redux" rel="bookmark" href="http://themechanism.com/blog/2008/01/08/safari-css-hack-redux/">Safari CSS hack redux</a> <a href="http://themechanism.com/blog/2008/01/08/safari-css-hack-redux/" target="_blank">http://themechanism.com/blog/2008/01/08/safari-css-hack-redux/</a></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
