<?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>pzling &#187; HTML &amp; CSS</title>
	<atom:link href="http://pzling.com/category/html-css/feed/" rel="self" type="application/rss+xml" />
	<link>http://pzling.com</link>
	<description></description>
	<lastBuildDate>Sun, 08 Apr 2012 02:20:51 +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>不常见的前端BUG收集</title>
		<link>http://pzling.com/2011/11/collection-of-rare-bug/</link>
		<comments>http://pzling.com/2011/11/collection-of-rare-bug/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 14:41:06 +0000</pubDate>
		<dc:creator>pzling</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[DD_belatedPNG背景偏移]]></category>
		<category><![CDATA[IE6绝对定位消失]]></category>
		<category><![CDATA[前端BUG收集]]></category>

		<guid isPermaLink="false">http://pzling.com/?p=819</guid>
		<description><![CDATA[无聊~别人都发常见的，我就在这记录些平时比较少遇到的BUG吧(不定时更新)，以下提到的方法不是唯一解决办法或者一定有效。 IE6绝对定位层消失 当相邻标签有浮动可能出现该问题，对绝对定位的层加清除浮动 IE6下DD_belatedPNG背景位置偏移 有时会发现背景图偏移了1px，你+/-1px它还是老样子，+/-2px它就老实的动了2px，解决办法是修改一下背景图(sprite)的位置1px，好像纵横度坐标都是一样是双数或者单数的原因。 IE7下正负内外边距实现等高的方法，高度没有以最高列为准 可能是没有浮动导致。我遇到的就是一边左浮动，右边不浮动，结果高度总以右边的高度为准，加上浮动后问题解决。]]></description>
			<content:encoded><![CDATA[<p class="box">无聊~别人都发常见的，我就在这记录些平时比较少遇到的BUG吧(不定时更新)，<strong>以下提到的方法不是唯一解决办法或者一定有效</strong>。</p>
<ul style="margin-bottom:50px;">
<li>
<h2>IE6绝对定位层消失</h2>
<p>当相邻标签有浮动可能出现该问题，对绝对定位的层加清除浮动</p>
</li>
<li>
<h2>IE6下DD_belatedPNG背景位置偏移</h2>
<p>有时会发现背景图偏移了1px，你+/-1px它还是老样子，+/-2px它就老实的动了2px，解决办法是修改一下背景图(sprite)的位置1px，好像纵横度坐标都是一样是双数或者单数的原因。</p>
</li>
<li>
<h2>IE7下正负内外边距实现等高的方法，高度没有以最高列为准</h2>
<p>可能是没有浮动导致。我遇到的就是一边左浮动，右边不浮动，结果高度总以右边的高度为准，加上浮动后问题解决。</p>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://pzling.com/2011/11/collection-of-rare-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5入门-离线存储初探</title>
		<link>http://pzling.com/2011/06/html5-offline-application-caching/</link>
		<comments>http://pzling.com/2011/06/html5-offline-application-caching/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 11:29:18 +0000</pubDate>
		<dc:creator>pzling</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[html5入门]]></category>
		<category><![CDATA[manifest]]></category>
		<category><![CDATA[离线存储]]></category>

		<guid isPermaLink="false">http://pzling.com/?p=695</guid>
		<description><![CDATA[这已不是什么新东西了，也没什么技术含量，只适合新手当作入门，如果您已了解过就没必要往下看了，哈哈！！ 两周多前了解了一下并试作了一个DEMO，一直人懒没有把文章整理出来。昨天给自己的要求是今天一定要整理出来，接下来的两周好好看下书，为之后的路作准备。虽然还没确定下来，但还是得先作下准备，多积累点东西。 “离线存储”顾名思义，使得你的web应用可以在用户离线的状况下进行访问。这个技术至少有3个好处： 最重要的一个好处当然是用户可以离线访问你的web应用； 文件已被缓存在本地，使得web页面加载速度有显著提升； 离线应用只加载被修改过的已缓存资源与不缓存的文件，因此也降低了服务器的负载压力 如何实现文件离线存储？ 首先，我们需要给页面的标签添加manifest属性，作用是设置缓存配置文件的路径(绝对、相对路径都可以)。 &#60;!DOCTYPE HTML&#62; &#60;html manifest=&#34;setting.manifest&#34;&#62; ... 接下来我们看一下manifest文件的大概格式，具体什么意思已在注释中注明: CACHE MANIFEST #app v20110616 &#160; # 指明要被缓存的文件，可省略&#34;CACHE:&#34;，文件路径直接跟在&#34;CACHE MANIFEST&#34;后面 CACHE: index.html images/logo.png css/main.css js/offline-app.js &#160; # 可选节点，以下资源必须在线访问 NETWORK: show.php &#160; # 可选节点，如果index.php无法访问则用404.html代替 FALLBACK: /index.php /404.html manifest文件主要包括CACHE、NETWORK与FALLBACK三个节点(无先后顺序)。以井号(#)开头作为代码注释，注释还有另一个作用，web离线应用只有当manifest文件被修改才会更新被缓存的文件，单独修改要缓存的文件是起不到作用的，所以我们利用注释功能给manifest文件加个版本号之类的标记。 #app v20110616 我们也可以通过javascript的api去实现更新，具体请到这里查看 最后，你还需要设置一下服务器manifest文件的mime-type为text/cache-manifest（具体如何设置，请自行网上搜索对应的设置方法），这步没设置好是实现不了离线功能的。 到这里离线存储需要设置的都已完成，你可以把你做的DEMO放到服务器上，打开DEMO后断开网络，再刷新看看是否可以正常浏览。 下面是我做的一个简单的小DEMO，最好是用android或IOS手机打开后断网试试看。有些朋友用chrome执行删除操作未能看到列表马上刷新，我也不知道为什么，我自己电脑上还有手机上测试都是正常的。DEMO里还涉及到WebSQL，这两天我再抽时间写个简单的入门吧。 View Demo]]></description>
			<content:encoded><![CDATA[<p class="box">这已不是什么新东西了，也没什么技术含量，只适合新手当作入门，如果您已了解过就没必要往下看了，哈哈！！</p>
<p class="box">两周多前了解了一下并试作了一个DEMO，一直人懒没有把文章整理出来。昨天给自己的要求是今天一定要整理出来，接下来的两周好好看下书，为之后的路作准备。虽然还没确定下来，但还是得先作下准备，多积累点东西。</p>
<p>“离线存储”顾名思义，使得你的web应用可以在用户离线的状况下进行访问。这个技术至少有3个好处：</p>
<ul>
<li>最重要的一个好处当然是用户可以离线访问你的web应用；</li>
<li>文件已被缓存在本地，使得web页面加载速度有显著提升；</li>
<li>离线应用只加载被修改过的已缓存资源与不缓存的文件，因此也降低了服务器的负载压力</li>
</ul>
<div class="more-wrap"><span id="more-695"></span></div>
<h2>如何实现文件离线存储？</h2>
<p class="box">首先，我们需要给页面的<html>标签添加manifest属性，作用是设置缓存配置文件的路径(绝对、相对路径都可以)。</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> manifest<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;setting.manifest&quot;</span>&gt;</span>
...</pre></div></div>

<p class="box">接下来我们看一下manifest文件的大概格式，具体什么意思已在注释中注明:</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">CACHE MANIFEST
#app v20110616
&nbsp;
# 指明要被缓存的文件，可省略<span style="color: #933;">&quot;CACHE:&quot;</span>，文件路径直接跟在<span style="color: #933;">&quot;CACHE MANIFEST&quot;</span>后面
CACHE:
index.html
images/logo.png
css/main.css
js/offline-app.js
&nbsp;
# 可选节点，以下资源必须在线访问
NETWORK:
show.php
&nbsp;
# 可选节点，如果index.php无法访问则用<span style="">404</span>.html代替
FALLBACK:
/index.php /<span style="">404</span>.html</pre></div></div>

<p class="box">manifest文件主要包括CACHE、NETWORK与FALLBACK三个节点(无先后顺序)。以井号(#)开头作为代码注释，注释还有另一个作用，web离线应用只有当manifest文件被修改才会更新被缓存的文件，单独修改要缓存的文件是起不到作用的，所以我们利用注释功能给manifest文件加个版本号之类的标记。</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">#app v20110616</pre></div></div>

<p class="box">我们也可以通过javascript的api去实现更新，具体请到<a href="http://www.whatwg.org/specs/web-apps/current-work/#applicationcache">这里查看</a></p>
<p class="box">最后，你还需要<strong>设置一下服务器manifest文件的mime-type为text/cache-manifest（具体如何设置，请自行网上搜索对应的设置方法），这步没设置好是实现不了离线功能的</strong>。</p>
<p>到这里离线存储需要设置的都已完成，你可以把你做的DEMO放到服务器上，打开DEMO后断开网络，再刷新看看是否可以正常浏览。</p>
<p>下面是我做的一个简单的小DEMO，最好是用android或IOS手机打开后断网试试看。有些朋友用chrome执行删除操作未能看到列表马上刷新，我也不知道为什么，我自己电脑上还有手机上测试都是正常的。DEMO里还涉及到WebSQL，这两天我再抽时间写个简单的入门吧。</p>
<div><a href="http://demo.pzling.com/html5/offstore/index.html" title="offline application caching" class="demo-view">View Demo</a></div>
]]></content:encoded>
			<wfw:commentRss>http://pzling.com/2011/06/html5-offline-application-caching/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS的解析规则</title>
		<link>http://pzling.com/2011/05/css-parsingrules/</link>
		<comments>http://pzling.com/2011/05/css-parsingrules/#comments</comments>
		<pubDate>Fri, 27 May 2011 15:54:20 +0000</pubDate>
		<dc:creator>pzling</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[css解析规则]]></category>

		<guid isPermaLink="false">http://pzling.com/?p=686</guid>
		<description><![CDATA[对CSS有一定了解的人，应该都知道CSS是从右往左解析的。最近在网上看到一张关于CSS解析规则的图片，挺有趣的，也挺直观的，废话不多说，直接上图。]]></description>
			<content:encoded><![CDATA[<p>对CSS有一定了解的人，应该都知道CSS是从右往左解析的。最近在网上看到一张关于CSS解析规则的图片，挺有趣的，也挺直观的，废话不多说，直接上图。</p>
<div><img src="http://pzling.com/wp-content/uploads/2011/05/descendant.png" /></div>
]]></content:encoded>
			<wfw:commentRss>http://pzling.com/2011/05/css-parsingrules/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>用css3实现高光渐变边线</title>
		<link>http://pzling.com/2011/04/highlight-border-by-css3/</link>
		<comments>http://pzling.com/2011/04/highlight-border-by-css3/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 15:21:10 +0000</pubDate>
		<dc:creator>pzling</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[高光渐变]]></category>

		<guid isPermaLink="false">http://pzling.com/?p=606</guid>
		<description><![CDATA[皮肤终于搞定，每年春节左右都会换新皮肤，因为这博客也是在09年春节前不久开通的。去年换了两次皮肤，所以今年拖到这段时间才在再制作。这次与之前的皮肤差不多，算是前两个皮肤的合体吧。本来打算用亮点的颜色，但颜色配得不好，也不喜欢，最后还是用回了这种暗暗的色调。依然屏蔽所有IE（IE9还是有点小杯具，所以一样屏蔽）与FF2，测试浏览器chromium12、Firefox 4、Safari 5、Opera 11。 好了，下面进入正题，实现方法与box-shadow原理一样，所以没看过的请先看一下。 我们就直接拿头部的导航来举例说明。因为只有FF才支持border的渐变而且只能是自内向外或者内外向内，所以用border去处理是不靠谱的。背景就可以渐变，所以我们利用背景来作边框的渐变。首先看下面这段样式： #header .page_item:before&#123; position:absolute; left:-1px; top:0; width:87px; height:55px; background:-webkit-gradient&#40;linear,0 0,0 100%,from&#40;#1f1f1f&#41;,to&#40;#333&#41;&#41;;background:-moz-linear-gradient&#40;top,#1f1f1f,#333&#41;;background:-o-linear-gradient&#40;top,#1f1f1f,#333&#41;; content:''; z-index:-1;&#125; 同样是用绝对定位加z-index:-1，记住content属性很重要。但在实际应用中，可能会发现看不到效果，那是因为被有设置背景的父级元素给遮挡了，所以只能视情况把某个父级元素也设置为绝对定位，例如这皮肤，我是对下面这个设置的： #header nav&#123; position:absolute; top:0; left:200px; width:510px; text-align:right; z-index:999&#125; 其实用这方法也挺无奈的，而且不是什么布局都能这样弄。不过要提醒的是，上面是针对双边线高光渐变，如果你是单边线，直接用1px宽或高分别放到需要的位置既可]]></description>
			<content:encoded><![CDATA[<p>皮肤终于搞定，每年春节左右都会换新皮肤，因为这博客也是在09年春节前不久开通的。去年换了两次皮肤，所以今年拖到这段时间才在再制作。这次与之前的皮肤差不多，算是前两个皮肤的合体吧。本来打算用亮点的颜色，但颜色配得不好，也不喜欢，最后还是用回了这种暗暗的色调。依然屏蔽所有IE（IE9还是有点小杯具，所以一样屏蔽）与FF2，测试浏览器chromium12、Firefox 4、Safari 5、Opera 11。</p>
<p>好了，下面进入正题，实现方法与<a href="http://pzling.com/2011/02/css-box-shadow/">box-shadow</a>原理一样，所以没看过的请先看一下。</p>
<p>我们就直接拿头部的导航来举例说明。因为只有FF才支持border的渐变而且只能是自内向外或者内外向内，所以用border去处理是不靠谱的。背景就可以渐变，所以我们利用背景来作边框的渐变。首先看下面这段样式：</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#header</span> <span style="color: #6666ff;">.page_item</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">-1px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">87px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">55px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #3333ff;">:-webkit-</span>gradient<span style="color: #00AA00;">&#40;</span>linear<span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">100%</span><span style="color: #00AA00;">,</span>from<span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#1f1f1f</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">,</span>to<span style="color: #00AA00;">&#40;</span><span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>background<span style="color: #3333ff;">:-moz-linear-</span>gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#1f1f1f</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>background<span style="color: #3333ff;">:-o-linear-</span>gradient<span style="color: #00AA00;">&#40;</span><span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#1f1f1f</span><span style="color: #00AA00;">,</span><span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">''</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span>-<span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>同样是用绝对定位加z-index:-1，记住<strong>content属性很重要</strong>。但在实际应用中，可能会发现看不到效果，那是因为被有设置背景的父级元素给遮挡了，所以只能视情况把某个父级元素也设置为绝对定位，例如这皮肤，我是对下面这个设置的：</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#header</span> nav<span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">510px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">999</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>其实用这方法也挺无奈的，而且不是什么布局都能这样弄。<strong>不过要提醒的是，上面是针对双边线高光渐变，如果你是单边线，直接用1px宽或高分别放到需要的位置既可</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://pzling.com/2011/04/highlight-border-by-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iphone、ipad Web开发小技巧(知识)</title>
		<link>http://pzling.com/2011/02/iphone-mobile-web-development-tips/</link>
		<comments>http://pzling.com/2011/02/iphone-mobile-web-development-tips/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 16:34:41 +0000</pubDate>
		<dc:creator>pzling</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Mobile Dev]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://pzling.com/?p=550</guid>
		<description><![CDATA[iphone、ipad都水果家的，区别也不是很大(别和我提屏幕!!!)，所以放一起不作过多区分，基本都通用。资料都网上收集来的，很多我也还没条件测试，可能有些知识点已经更新了。 如何隐藏iPhone Safari的地址栏 使用meta标签，看一些资料说的，不过我在iphone4下测试没反应，不清楚iphone3是否有效或者是有什么限制。 &#60;meta name=&#34;apple-mobile-web-app-capable&#34; content=&#34;yes&#34; /&#62; 第二个方法就是通过JS处理。原理就是当我们往下滚动时，地址栏会往上收起，所以我们重围一下默认位置就可以了。也因为是使用系统自身的特性，当内容小于可视区域时(没有滚动条)，地址栏是不能隐藏的。 window.addEventListener&#40;&#34;load&#34;, function&#40;&#41; &#123; setTimeout&#40;hideURLbar, 0&#41;; &#125;, false&#41;; function hideURLbar&#40;&#41;&#123; window.scrollTo&#40;0,1&#41;; &#125; 不同的方向对应不同的样式表 &#60;link rel=&#34;stylesheet&#34; media=&#34;all and (orientation:portrait)&#34; href=&#34;portrait.css&#34;&#62; &#60;link rel=&#34;stylesheet&#34; media=&#34;all and (orientation:landscape)&#34; href=&#34;landscape.css&#34;&#62; 设置可视窗的大小 &#60;meta name=&#34;viewport&#34; content=&#34;width=device-width,minimum-scale=1.0,maximum-scale=1.0&#34;/&#62; /*width - viewport的宽度 height - viewport的高度*/ /*initial-scale - 初始的缩放比例*/ /*minimum-scale - 允许用户缩放到的最小比例*/ /*maximum-scale - 允许用户缩放到的最大比例*/ /*user-scalable - 用户是否可以手动缩放*/ [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom:20px">iphone、ipad都水果家的，区别也不是很大(别和我提屏幕!!!)，所以放一起不作过多区分，基本都通用。资料都网上收集来的，很多我也还没条件测试，可能有些知识点已经更新了。</p>
<h2>如何隐藏iPhone Safari的地址栏</h2>
<p>使用meta标签，看一些资料说的，不过我在iphone4下测试没反应，不清楚iphone3是否有效或者是有什么限制。</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apple-mobile-web-app-capable&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;yes&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>第二个方法就是通过JS处理。原理就是当我们往下滚动时，地址栏会往上收起，所以我们重围一下默认位置就可以了。也因为是使用系统自身的特性，<strong>当内容小于可视区域时(没有滚动条)，地址栏是不能隐藏的</strong>。</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;load&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> setTimeout<span style="color: #009900;">&#40;</span>hideURLbar<span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">function</span> hideURLbar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
window.<span style="color: #660066;">scrollTo</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>不同的方向对应不同的样式表</h2>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;all and (orientation:portrait)&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;portrait.css&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;all and (orientation:landscape)&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;landscape.css&quot;</span>&gt;</span></pre></div></div>

<div class="more-wrap"><span id="more-550"></span></div>
<h2>设置可视窗的大小</h2>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;viewport&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width=device-width,minimum-scale=1.0,maximum-scale=1.0&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
/*width - viewport的宽度 height - viewport的高度*/
/*initial-scale - 初始的缩放比例*/
/*minimum-scale - 允许用户缩放到的最小比例*/
/*maximum-scale - 允许用户缩放到的最大比例*/
/*user-scalable - 用户是否可以手动缩放*/</pre></div></div>

<p>这里提一下机械人(android)家的关于user-scalable的问题，2.1有效，但2.2是无效的</p>
<h2>设置网页的桌面快捷方式图标</h2>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apple-touch-icon&quot;</span>  sizes<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;72x72&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apple-touch-icon.png&quot;</span><span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;apple-touch-startup-image&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;startup.png&quot;</span><span style="color: #66cc66;">/</span>&gt;</span></pre></div></div>

<p>第一行是设置桌面快捷方式图标的，没有sizes属性默认57*57像素的图片，圆角和高亮效果系统会自动帮你搞定，放在网页根目录会作用于下面的全部网页，当然也可以为每个页面设置单独的图标。</p>
<p>第二行是设置启动画面。</p>
<p><a href="http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html" title="Configuring Web Applications">相关资料</a></p>
<h2>单独给iphone设置样式</h2>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">media</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;only screen and (max-device-width: 480px)&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;iphone.css&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span>&gt;</span></pre></div></div>

<p><a href="http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/OptimizingforSafarioniPhone.html" title="Optimizing Web Content">相关资料</a></p>
<h2>特殊链接</h2>
<p>当你浏览一个有电话号码的页面时，可以直接按号码就可以打出电话，这时电话号码自动变成链接，当然它们遵循电话号码的格式，但有时你可能要手工创建一个电话号码链接，这时你可以使用tel:前缀(URI模式)，如：</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;tel:03545770051&quot;</span>&gt;</span>海健<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sms:03545770051&quot;</span>&gt;</span>短信<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>

<h2>在网页中检测屏幕的方向</h2>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">switch</span><span style="color: #009900;">&#40;</span>window.<span style="color: #660066;">orientation</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">:</span>
    <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #CC0000;">90</span><span style="color: #339933;">:</span>
    <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">90</span><span style="color: #339933;">:</span>
    <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">case</span> <span style="color: #CC0000;">180</span><span style="color: #339933;">:</span>
    <span style="color: #000066; font-weight: bold;">break</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>手势事件(guesture)</h2>
<p>在iPhone上，手势是两个手指的行为：缩放(放大和缩小)和旋转。iPhone支持如下几种手势事件：</p>
<ul>
<li>gesturestart</li>
<li>gestureend</li>
<li>gesturechange</li>
</ul>
<p>下面的例子中我们将监听gesturechange事件，然后使用webkitTransform样式属性缩放和旋转一个div，像往常一样，事件监听器接收event对象参数，event对象包含以下属性：</p>
<ul>
<li>event.scale ： 不缩放时值为1，缩小时值小于1，放大时值大于1</li>
<li>event.rotate ：旋转的角度</li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'load'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> b <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'box'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    bstyle <span style="color: #339933;">=</span> b.<span style="color: #660066;">style</span><span style="color: #339933;">;</span>
    b.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'gesturechange'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        event.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        bstyle.<span style="color: #660066;">webkitTransform</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'scale('</span> <span style="color: #339933;">+</span> event.<span style="color: #660066;">scale</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">') '</span> <span style="color: #339933;">+</span>
        <span style="color: #3366CC;">'rotate('</span><span style="color: #339933;">+</span> event.<span style="color: #660066;">rotation</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'deg)'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h2>其它小知识点</h2>
<p>iphone内置了一个调试控制台；</p>
<p>每个静态资源(*.html,*.css,*.js etc) < 10M ；</p>
<p>超过25K的资源不会被缓存(gzip前)；</p>
<p>5秒钟的javascript执行时间 [<a href="http://yuiblog.com/blog/2008/02/06/iphone-cacheability/" title="Performance Research, Part 5: iPhone Cacheability – Making it Stick">更多资料</a>]</p>
</p>
<p>-webkit-text-size-adjust设置页面文字尺寸，默认为auto，建议直接设置为none；</p>
<p>-webkit-tap-highlight-color  设置手指触发链接是的颜色</p>
<p style="margin-top:30px;">更多开发资料，请查看<a href="http://developer.apple.com/" title="Apple Developer">Apple Developer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pzling.com/2011/02/iphone-mobile-web-development-tips/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>CSS系列之&#8221;box-shadow &#8220;(阴影)</title>
		<link>http://pzling.com/2011/02/css-box-shadow/</link>
		<comments>http://pzling.com/2011/02/css-box-shadow/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 14:28:13 +0000</pubDate>
		<dc:creator>pzling</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[box-shadow]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[伪类]]></category>

		<guid isPermaLink="false">http://pzling.com/?p=531</guid>
		<description><![CDATA[使用CSS3里的box-shadow属性，我们就可以不使用图片(或额外的标签)来制作阴影效果了(费话，地球人都知道)！！不过单纯给标签定义box-shadow，可能不能完全符合我们的需要，这时伪类就派上用场了(原来这东西还可以这样用)，我们可以使用:befor、:after伪类来处理一些特殊的阴影效果。 .drop-shadow &#123; position:relative; /* 给伪类定位作准备*/ width:90%; height:80px; line-height:80px; background:#fff; border:2px solid #ddd; text-align:center; &#125; &#160; .type-1:before, .type-1:after &#123; content:&#34;&#34;; /* 这个是必须的 */ position:absolute; /* 绝对定位，调整阴影位置 */ z-index:-1; /* 使阴影置于最低层 */ bottom:15px; left:10px; width:50%; height:20%; max-width:300px; /* 这个看情况设置 */ /* 加阴影，没什么特别 */ -webkit-box-shadow:0 15px 10px rgba&#40;0, 0, 0, 0.7&#41;; -moz-box-shadow:0 15px 10px rgba&#40;0, 0, 0, [...]]]></description>
			<content:encoded><![CDATA[<p>使用CSS3里的box-shadow属性，我们就可以不使用图片(或额外的标签)来制作阴影效果了(费话，地球人都知道)！！不过单纯给标签定义box-shadow，可能不能完全符合我们的需要，这时伪类就派上用场了(原来这东西还可以这样用)，我们可以使用<strong>:befor</strong>、<strong>:after</strong>伪类来处理一些特殊的阴影效果。</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.drop-shadow</span> <span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/* 给伪类定位作准备*/</span>
   <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">90%</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">80px</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">80px</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">2px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ddd</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.type-1</span><span style="color: #3333ff;">:before</span><span style="color: #00AA00;">,</span>
<span style="color: #6666ff;">.type-1</span><span style="color: #3333ff;">:after </span><span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">&quot;&quot;</span><span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/* 这个是必须的 */</span>
   <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/* 绝对定位，调整阴影位置 */</span>
   <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span>-<span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/* 使阴影置于最低层 */</span>
   <span style="color: #000000; font-weight: bold;">bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">50%</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">20%</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">max-width</span><span style="color: #00AA00;">:</span><span style="color: #933;">300px</span><span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/* 这个看情况设置 */</span>
   <span style="color: #808080; font-style: italic;">/* 加阴影，没什么特别 */</span>
   -webkit-box-shadow<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">15px</span> <span style="color: #933;">10px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
   -moz-box-shadow<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">15px</span> <span style="color: #933;">10px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
   box-shadow<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">15px</span> <span style="color: #933;">10px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
   <span style="color: #808080; font-style: italic;">/* 旋转阴影，同样没什么特别*/</span>
   -webkit-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>-3deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
   -moz-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>-3deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
   -o-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>-3deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
   transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>-3deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* 实现右边的阴影效果，其实还是旋转加定位-_- */</span>
<span style="color: #6666ff;">.type-1</span><span style="color: #3333ff;">:after</span><span style="color: #00AA00;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
   <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span> 
   -webkit-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>3deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> 
   -moz-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>3deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
   -o-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>3deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
   transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>3deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<div class="more-wrap"><span id="more-531"></span></div>
<p>不费话，直接看代码(这是我的习惯→_→)。上面是<a href="http://demo.pzling.com/css_demo/box_shadow/index.html">DEMO</a>里第一个例子的样式，只是起一个抛砖引玉的作用，更多效果就自己发挥了！！</p>
<div><a href="http://demo.pzling.com/css_demo/box_shadow/index.html" title=""box-shadow "(阴影)" class="demo-view">View Demo</div>
</p>
<p>(PS:这文章不是讲box-shadow如何使用，主要介绍一个小技巧，对该属性完全不懂的朋友可以查阅以下地址的介绍)</p>
<p>参考资料：<a href="http://www.w3.org/TR/css3-background/#the-box-shadow">W3C_box-shadow属性介绍</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pzling.com/2011/02/css-box-shadow/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IE9对CSS3的支持情况</title>
		<link>http://pzling.com/2010/11/support-for-css3-on-ie9/</link>
		<comments>http://pzling.com/2010/11/support-for-css3-on-ie9/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 16:06:51 +0000</pubDate>
		<dc:creator>pzling</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://pzling.com/?p=477</guid>
		<description><![CDATA[IE9到目前为止已经发布到beta版本，下面简单概述一下IE9对CSS3的支持情况。 下文所有数据仅供参考，数据仅到IE9 Preview版本，等正式版出来再作更新，如果您需要比较实时权威点的数据，请点击这里查看。 IE9对CSS3的支持情况 CSS3属性 IE9支持情况 之前版本IE支持情况 opacity None multiple backgrounds None background-clip None background-size None background-origin None text-shadow — word-wrap 5-8 writing-mode 5-8 border-image — border-radius None box-shadow None overflow-x 7-8 overflow-y 7-8 multiple columns — box-sizing 8 RGBA colors None HSL colors None HSLA colors None text-stroke — gradients — transforms — transitions [...]]]></description>
			<content:encoded><![CDATA[<p>IE9到目前为止已经发布到beta版本，下面简单概述一下IE9对CSS3的支持情况。</p>
<p style="margin-bottom:20px;">下文所有数据仅供参考，<strong>数据仅到IE9 Preview版本</strong>，等正式版出来再作更新，如果您需要比较实时权威点的数据，请点击<a href="http://msdn.microsoft.com/en-us/library/cc351024(VS.85).aspx" title="CSS Compatibility and Internet Explorer" target="_blank">这里</a>查看。</p>
<h2>IE9对CSS3的支持情况</h2>
<table class="post-table pt-other">
<thead>
<tr>
<th>CSS3属性</th>
<th>IE9支持情况</th>
<th>之前版本IE支持情况</th>
</tr>
</thead>
<tbody>
<tr>
<td>opacity</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>None</td>
</tr>
<tr>
<td>multiple backgrounds</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>None</td>
</tr>
<tr>
<td>background-clip</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>None</td>
</tr>
<tr>
<td>background-size</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>None</td>
</tr>
<tr>
<td>background-origin</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>None</td>
</tr>
<tr>
<td>text-shadow</td>
<td><img src="http://pzling.com/global-img/error.gif" alt="No" width="16" height="16" /></td>
<td>—</td>
</tr>
<tr>
<td>word-wrap</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>5-8</td>
</tr>
<tr>
<td>writing-mode</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>5-8</td>
</tr>
<tr>
<td>border-image</td>
<td><img src="http://pzling.com/global-img/error.gif" alt="No" width="16" height="16" /></td>
<td>—</td>
</tr>
<tr>
<td>border-radius</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>None</td>
</tr>
<tr>
<td>box-shadow</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>None</td>
</tr>
<tr>
<td>overflow-x</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>7-8</td>
</tr>
<tr>
<td>overflow-y</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>7-8</td>
</tr>
<tr>
<td>multiple columns</td>
<td><img src="http://pzling.com/global-img/error.gif" alt="No" width="16" height="16" /></td>
<td>—</td>
</tr>
<tr>
<td>box-sizing</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>8</td>
</tr>
<tr>
<td>RGBA colors</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>None</td>
</tr>
<tr>
<td>HSL colors</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>None</td>
</tr>
<tr>
<td>HSLA colors</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>None</td>
</tr>
<tr>
<td>text-stroke</td>
<td><img src="http://pzling.com/global-img/error.gif" alt="No" width="16" height="16" /></td>
<td>—</td>
</tr>
<tr>
<td>gradients</td>
<td><img src="http://pzling.com/global-img/error.gif" alt="No" width="16" height="16" /></td>
<td>—</td>
</tr>
<tr>
<td>transforms</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>—</td>
</tr>
<tr>
<td>transitions</td>
<td><img src="http://pzling.com/global-img/error.gif" alt="No" width="16" height="16" /></td>
<td>—</td>
</tr>
<tr>
<td>outline-offset</td>
<td><img src="http://pzling.com/global-img/error.gif" alt="No" width="16" height="16" /></td>
<td>—</td>
</tr>
<tr>
<td>resize</td>
<td><img src="http://pzling.com/global-img/error.gif" alt="No" width="16" height="16" /></td>
<td>—</td>
</tr>
<tr>
<td>@font-face</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>5.5-8</td>
</tr>
<tr>
<td>@media</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>None</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>CSS3属性</th>
<th>IE9支持情况</th>
<th>之前版本IE支持情况</th>
</tr>
</tfoot>
</table>
<div class="more-wrap"><span id="more-477"></span></div>
<h2>IE9对CSS3选择器支持情况</h2>
<table class="post-table pt-other" cellspacing="0" summary="CSS3 Selector Support in IE">
<thead>
<tr>
<th>CSS3选择器</th>
<th>IE9支持情况</th>
<th>之前版本IE支持情况</th>
</tr>
</thead>
<tbody>
<tr>
<td>[attribute^=value]</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>7-8</td>
</tr>
<tr>
<td>[attribute*=value]</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>7-8</td>
</tr>
<tr>
<td>[attribute$=value]</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>7-8</td>
</tr>
<tr>
<td>E ~ F (sibling)</td>
<td><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /></td>
<td>7-8</td>
</tr>
</tbody>
</table>
<p><strong style="margin-top:15px; font-size:12px; font-weight:normal;">(注意：由于有几个符号会被转成表情，下面有四个伪类冒号后加了空格！)</strong></p>
<h2><img src="http://pzling.com/global-img/ok.gif" alt="Yes" width="16" height="16" /> IE9支持的伪类 &amp; 伪元素</h2>
<ul class="two-col">
<li>:root</li>
<li>:nth-child(n)</li>
<li>:nth-last-child(n)</li>
<li>:nth-of-type(n)</li>
<li>:nth-last-of-type(n)</li>
<li>:last-child</li>
<li>:first-of-type</li>
<li>:last-of-type</li>
<li><strong>: only-child</strong></li>
<li><strong>: only-of-type</strong></li>
<li>:empty</li>
<li>:target</li>
<li>:not(s)</li>
<li>:enabled</li>
<li>:disabled</li>
<li>:checked</li>
<li>:indeterminate</li>
<li>::selection</li>
</ul>
<h2><img src="http://pzling.com/global-img/error.gif" alt="No" width="16" height="16" /> IE9不支持的伪类 &amp; 伪元素</h2>
<ul class="two-col">
<li>:default</li>
<li>:valid</li>
<li>:invalid</li>
<li>:in-range</li>
<li><strong>: out-of-range</strong></li>
<li>:required</li>
<li><strong>: optional</strong></li>
<li>:read-only</li>
<li>:read-write</li>
<li>::before</li>
<li>::after</li>
<li>::first-letter</li>
<li>::first-line</li>
<li>::value</li>
<li>::choices</li>
<li>::repeat-item</li>
<li>::repeat-index</li>
</ul>
<p>参考文章：<a href="http://www.impressivewebs.com/css3-support-ie9/" target="_blank" title="CSS3 Support in Internet Explorer 9">CSS3 Support in Internet Explorer 9</a></p>
]]></content:encoded>
			<wfw:commentRss>http://pzling.com/2010/11/support-for-css3-on-ie9/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML5-Web Workers</title>
		<link>http://pzling.com/2010/09/html5-web-workers/</link>
		<comments>http://pzling.com/2010/09/html5-web-workers/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 12:08:09 +0000</pubDate>
		<dc:creator>pzling</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[web workers]]></category>

		<guid isPermaLink="false">http://pzling.com/?p=417</guid>
		<description><![CDATA[HTML5除了标记语意的增强之外，最令人震撼的莫过于它所附属的Javascript APIs。Web Workers 是 HTML5 提供的一个多线程(Multi-Thread)的解决方案，让我们可以把需要大量运算的程序交由Web Workers去做背景执行，如此的好处就是其他的工作仍可以顺利进行。 Web Workes 目前支持的浏览器有：Firefox 3.5+ / Safari 4.0+ / Chrome 5.0+ (IE都不支持，包括目前的IE9测试版) 使用Web Worders时，首先我们需要建立一个Worker实体，并传入用于处理数据的JS路径 var worker = new Worker&#40;&#34;worker.js&#34;&#41;; 在worker.js里定义onmessage事件(前面不要加var)用于处理数据，在这里面我们可以通过postMessage()触发worker.onmessage。需要注意的是worker.js里面无法获取dom对象。 onmessage = function &#40;evt&#41; &#123; //evt.data可以获取worker.postMessage(100)传进来的数据 for &#40;var i=0; i&#60;100000; i++&#41; &#123; //执行大量循环 postMessage&#40;i&#41;; // 触发Worker.onmessage() 并传入 i &#125;; &#125;; 在work.js里调用了postMessage()后，将触发worker.onmessage这个事件，并可通过event.data获取传入的参数 worker.onmessage = function &#40;e&#41;&#123; // 在worker.js 中使用了 postMessage() [...]]]></description>
			<content:encoded><![CDATA[<p>HTML5除了标记语意的增强之外，最令人震撼的莫过于它所附属的Javascript APIs。Web Workers 是 HTML5 提供的一个多线程(Multi-Thread)的解决方案，让我们可以把需要大量运算的程序交由Web Workers去做背景执行，如此的好处就是其他的工作仍可以顺利进行。</p>
<p>Web Workes 目前支持的浏览器有：Firefox 3.5+ / Safari 4.0+ / Chrome 5.0+ (IE都不支持，包括目前的IE9测试版)</p>
<p style="margin-bottom:10px;">使用Web Worders时，首先我们需要建立一个Worker实体，并传入用于处理数据的JS路径</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> worker <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Worker<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;worker.js&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p style="margin-bottom:10px;">在worker.js里定义onmessage事件(<strong>前面不要加var</strong>)用于处理数据，在这里面我们可以通过<strong>postMessage()</strong>触发<strong>worker.onmessage</strong>。<strong>需要注意的是worker.js里面无法获取dom对象。</strong></p>
<div class="more-wrap"><span id="more-417"></span></div>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">onmessage <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>evt<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">//evt.data可以获取worker.postMessage(100)传进来的数据</span>
  <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span><span style="color: #CC0000;">100000</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">//执行大量循环</span>
    postMessage<span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// 触发Worker.onmessage() 并传入 i</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p style="margin-bottom:10px;">在work.js里调用了postMessage()后，将触发worker.onmessage这个事件，并可通过event.data获取传入的参数</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">worker.<span style="color: #660066;">onmessage</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>  
    <span style="color: #006600; font-style: italic;">// 在worker.js 中使用了 postMessage() 并传入了 i 值  </span>
    <span style="color: #006600; font-style: italic;">// 因此我们可以通过e.data获取 i 值</span>
    <span style="color: #006600; font-style: italic;">// 例如：  </span>
    console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>e.<span style="color: #660066;">data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
<span style="color: #009900;">&#125;</span></pre></div></div>

<p style="margin-bottom:10px;">最后我们调用下面这个方法，就开始执行了</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">worker.<span style="color: #660066;">postMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #006600; font-style: italic;">/*
worker.terminate()  //停止worker的执行
worker.onerror = function(e){  
  alert(&quot;于[&quot;+ e.lineno +&quot;]行发生错误: &quot; + e.message);  
} 
*/</span></pre></div></div>

<p>上面就是Web Workers最基本的使用方法，我自己做了个Demo做测试，发现输出结果还是按顺序的，并没有交差输出(也就是还是单线程)，是我理解错了还是？？望高人指教！！</p>
<div class="box"><a href="http://demo.pzling.com/html5-web-workers/" class="demo-view">View Demo</a></div>
<div>参考资料：<a href="https://developer.mozilla.org/En/Using_web_workers">Mozilla &#8211; Web Workers</a></div>
]]></content:encoded>
			<wfw:commentRss>http://pzling.com/2010/09/html5-web-workers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS屏蔽Webkit浏览器input高亮和textarea缩放</title>
		<link>http://pzling.com/2010/09/block-outline-resize-by-css/</link>
		<comments>http://pzling.com/2010/09/block-outline-resize-by-css/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 13:44:37 +0000</pubDate>
		<dc:creator>pzling</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[缩放]]></category>
		<category><![CDATA[高亮]]></category>

		<guid isPermaLink="false">http://pzling.com/?p=410</guid>
		<description><![CDATA[在Webkit浏览器(例如safari,chrom)下，默认input、textarea取得焦点时，边框会自动高亮；textarea会有个大小的控制柄，通过以下两个CSS属性可以屏蔽这两个问题 input &#123; /* 屏蔽文本框高亮 */ outline: none; &#125; &#160; textarea &#123; outline: none; /* CSS3屏蔽文本框缩放*/ resize: none; &#125;]]></description>
			<content:encoded><![CDATA[<p style="margin-bottom:10px;">在Webkit浏览器(例如safari,chrom)下，默认input、textarea取得焦点时，边框会自动高亮；textarea会有个大小的控制柄，通过以下两个CSS属性可以屏蔽这两个问题</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">input <span style="color: #00AA00;">&#123;</span>
    <span style="color: #808080; font-style: italic;">/* 屏蔽文本框高亮 */</span>
    <span style="color: #000000; font-weight: bold;">outline</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
textarea <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">outline</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
    <span style="color: #808080; font-style: italic;">/* CSS3屏蔽文本框缩放*/</span>
    resize<span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://pzling.com/2010/09/block-outline-resize-by-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>空字符串URL引起的多余请求</title>
		<link>http://pzling.com/2010/08/redundant-request-due-to-empty-string-urls/</link>
		<comments>http://pzling.com/2010/08/redundant-request-due-to-empty-string-urls/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 09:06:27 +0000</pubDate>
		<dc:creator>pzling</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[empty-string-url]]></category>

		<guid isPermaLink="false">http://pzling.com/?p=356</guid>
		<description><![CDATA[之前在群里某群友提到过空的src属性(例如img标签)，会增加请求。当时以为是.net的机制问题，不过看了这篇文章后Empty-string URLs in HTML，才知道这是浏览器问题。例如下面几种情况，在不同的浏览器，会增加不同的请求数。（PS:如果你不提供src、href这些属性，就不会有这情况，只是W3C验证不通过而已） 1 2 3 &#60;img src=&#34;&#34;&#62; &#60;script src=&#34;&#34;&#62; &#60;link rel=&#34;stylesheet&#34; href=&#34;&#34;&#62; 测试页面 img-0img-1img-2img-3script标签link标签 下面是通过几个测试页面做的几组测试数据： chrome 6.0 img&#160;&#160;&#160;&#160;1-2个 增加1个当前页面请求（不包含空的link标签情况下） &#160;&#160;&#160;&#160;3个以上（含） 增加2个当前页面请求（不包含空的link标签情况下） link&#160;&#160;&#160;&#160;1个以上（含）增加1个当前页面请求（无视多少空的img，页面只多增加1个请求） script&#160;&#160;&#160;&#160;有几个就增加几个当前页面请求 firefox 3.6 img&#160;&#160;&#160;&#160;不增加请求 link&#160;&#160;&#160;&#160;1个以上（含） 增加一个当前页面请求 script&#160;&#160;&#160;&#160;有几个就增加几个当前页面请求 IE7 img&#160;&#160;&#160;&#160;1个以上（含）增加一个当前目录根目录请求（也就是不包含页面名称） link&#160;&#160;&#160;&#160;不增加请求 script&#160;&#160;&#160;&#160;不增加请求]]></description>
			<content:encoded><![CDATA[<p>之前在群里某群友提到过空的src属性(例如img标签)，会增加请求。当时以为是.net的机制问题，不过看了这篇文章后<a href="http://www.nczonline.net/blog/2010/03/16/empty-string-urls-in-html-a-followup/">Empty-string URLs in HTML</a>，才知道这是浏览器问题。例如下面几种情况，在不同的浏览器，会增加不同的请求数。（PS:如果你不提供src、href这些属性，就不会有这情况，只是W3C验证不通过而已<img src="http://pzling.com/wp-includes/images/smilies/icon_mrgreen.gif" alt="呵呵" />）</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span>&gt;</span></pre></td></tr></table></div>

<div>测试页面</div>
<p><a href="http://pzling.com/lab/empty-string-urls/0.html" style="margin:0 5px;">img-0</a><a href="http://pzling.com/lab/empty-string-urls/1.html" style="margin:0 5px;">img-1</a><a href="http://pzling.com/lab/empty-string-urls/2.html" style="margin:0 5px;">img-2</a><a href="http://pzling.com/lab/empty-string-urls/3.html" style="margin:0 5px;">img-3</a><a href="http://pzling.com/lab/empty-string-urls/script.html" style="margin:0 5px;">script标签</a><a href="http://pzling.com/lab/empty-string-urls/link.html" style="margin:0 5px;">link标签</a></p>
<div>下面是通过几个测试页面做的几组测试数据：</div>
<div class="kw">chrome 6.0</div>
<ul>
<li>
<div>img&nbsp;&nbsp;&nbsp;&nbsp;1-2个 增加1个当前页面请求（不包含空的link标签情况下）</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;3个以上（含） 增加2个当前页面请求（不包含空的link标签情况下）</div>
<div><img class="alignleft size-full wp-image-358" title="chrome-empty-img-tag" src="http://pzling.com/wp-content/uploads/2010/08/01.png" alt="" width="474" height="82" /></div>
</li>
<li>link&nbsp;&nbsp;&nbsp;&nbsp;1个以上（含）增加1个当前页面请求（无视多少空的img，页面只多增加1个请求）</li>
<li>script&nbsp;&nbsp;&nbsp;&nbsp;有几个就增加几个当前页面请求</li>
</ul>
<div class="kw">firefox 3.6</div>
<ul>
<li>img&nbsp;&nbsp;&nbsp;&nbsp;不增加请求</li>
<li>
<div>link&nbsp;&nbsp;&nbsp;&nbsp;1个以上（含） 增加一个当前页面请求</div>
<div><img class="alignleft size-full wp-image-358" title="firefox-empty-link-tag" src="http://pzling.com/wp-content/uploads/2010/08/03.png" alt="" width="473" height="56" /></div>
</li>
<li>script&nbsp;&nbsp;&nbsp;&nbsp;有几个就增加几个当前页面请求</li>
</ul>
<div class="kw">IE7</div>
<ul>
<li>
<div>img&nbsp;&nbsp;&nbsp;&nbsp;1个以上（含）增加一个当前目录根目录请求（也就是不包含页面名称）</div>
<div><img class="alignleft size-full wp-image-358" title="ie-empty-img-tag" src="http://pzling.com/wp-content/uploads/2010/08/02.png" alt="" width="485" height="58" /></div>
<li>link&nbsp;&nbsp;&nbsp;&nbsp;不增加请求</li>
<li>script&nbsp;&nbsp;&nbsp;&nbsp;不增加请求</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://pzling.com/2010/08/redundant-request-due-to-empty-string-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

