<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.chencheng.org/styles/feedsky7.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feed.chencheng.org" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/sansan" type="application/rss+xml"></fs:self_link><lastBuildDate>Sun, 22 Aug 2010 03:17:26 GMT</lastBuildDate><title>陈成的博客</title><description>专注前端开发，关注用户体验，。。。</description><image><url>http://www.feedsky.com/feed/sansan/sc/gif</url><title>陈成的博客</title><link>http://www.chencheng.org/blog/</link></image><link>http://www.chencheng.org/blog/</link><language>zh-CN</language><pubDate>Sun, 22 Aug 2010 03:17:26 GMT</pubDate><item><title>反思我最近的工作效率问题，记下来，引以为戒</title><link>http://www.chencheng.org/blog/2010/08/22/work-efficiency-problem/</link><content:encoded xml:lang="zh-CN">&lt;p&gt;趁玉伯改bug的时间，思考了下这个问题：我的工作效率在图书馆、家里和公司差别非常大，&lt;span style=&quot;color:red;font-size:20px;&quot;&gt;图书馆 &gt;&gt; 公司 &gt; 家里&lt;/span&gt;。相关因素罗列如下：&lt;/p&gt;&lt;p&gt;&lt;b&gt;图书馆：&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[+] 有计划，知道今天要做什么&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[+] 大块时间长&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[+] 就算出会小差，也能迅速拉回来&lt;/p&gt;&lt;p&gt;&lt;b&gt;公司：&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-] 经常会被人打扰&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-] 经常看公司群和邮箱&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-] 翻墙方便，导致经常挂在 twitter 上和过度地访问墙外网站&lt;/p&gt;&lt;p&gt;&lt;b&gt;家里：&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-] 老婆时不时会和我聊几句&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-] 惦记着儿子&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-] 有吃的，容易嘴馋&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-] 看PLU&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-] 看电影&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-] 容易困&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[-] 出小差后，不容易拉回来&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/405458128/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/08/22/work-efficiency-problem/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458128/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458128/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><slash:comments>0</slash:comments><wfw:commentRss>http://www.chencheng.org/blog/feed/2010/01/06/dev-share-for-taobao-new-homepage/</wfw:commentRss><description>趁玉伯改bug的时间，思考了下这个问题：我的工作效率在图书馆、家里和公司差别非常大，图书馆 &gt;&gt; 公司 &gt; 家里。相关因素罗列如下：

图书馆：
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;...&lt;img src=&quot;http://www1.feedsky.com/t1/405458128/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/08/22/work-efficiency-problem/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458128/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458128/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 22 Aug 2010 11:17:26 +0800</pubDate><author>chencheng</author><comments>http://www.chencheng.org/blog/2010/08/22/work-efficiency-problem/#comments</comments><guid isPermaLink="false">http://www.chencheng.org/blog/2010/08/22/work-efficiency-problem/</guid><dc:creator>chencheng</dc:creator><fs:srclink>http://www.chencheng.org/blog/2010/08/22/work-efficiency-problem/</fs:srclink><fs:srcfeed>http://www.chencheng.org/blog/feed/</fs:srcfeed><fs:itemid>feedsky/sansan/~7194847/405458128/4785724</fs:itemid></item><item><title>让前端忍不住喊爽的设计元素</title><link>http://www.chencheng.org/blog/2010/08/04/cool-design-elements/</link><content:encoded xml:lang="zh-CN">&lt;p&gt;&lt;img src=&quot;http://www.chencheng.org/img/shuang.jpg&quot; /&gt;&lt;br /&gt;(此文目标对象为：设计师)&lt;/p&gt;&lt;h2&gt;现状&lt;/h2&gt;&lt;ol&gt;&lt;li&gt;视觉效果太复杂，前端一看就傻眼了，实现成本太大；&lt;/li&gt;&lt;li&gt;界面太简陋，仅采用一些简单元素比如直角、实色填充等实现设计。&lt;/li&gt;&lt;/ol&gt;&lt;h2&gt;其实可以尽情地使用这些设计元素&lt;/h2&gt;&lt;ol&gt;&lt;li&gt;水平或垂直的线性渐变&lt;/li&gt;
&lt;li&gt;箭头及各种箭头的变型&lt;/li&gt;
&lt;li&gt;单像素圆角&lt;/li&gt;
&lt;li&gt;简单阴影&lt;/li&gt;
&lt;li&gt;半透明背景&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;以上这些设计元素对于前端实现来说有个相同的特点：即可以通过添加少量标签或完全利用CSS特性完成，&lt;strong style=&quot;color:red;&quot;&gt;实现成本和后期维护成本低&lt;/strong&gt;，&lt;strong style=&quot;color:red;&quot;&gt;扩展性高&lt;/strong&gt;，且&lt;strong style=&quot;color:red;&quot;&gt;不需要任何图片&lt;/strong&gt;。图片对前端来说就是个难搞的事情，尤其是现在关注性能的同学还需要进行sprites合并。(真的，我宁愿多加几个tag，也不愿多加一张图片)&lt;/p&gt;&lt;h2&gt;如果您认可优雅降级，还可针对高级浏览器选择以下设计元素&lt;/h2&gt;&lt;p&gt;当然，IE用户是看不到的。&lt;/p&gt;&lt;ol&gt;&lt;li&gt;圆角&lt;/li&gt;
&lt;li&gt;复杂的阴影&lt;/li&gt;
&lt;li&gt;文字阴影&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;此外，设计师们还可以为Chrome、Safari浏览器设计一些小动画，比如鼠标移上去icon旋转下之类的。&lt;/p&gt;&lt;p&gt;只有让设计师更了解前端，才能实现设计效果和前端开发成本的双赢。&lt;/p&gt;&lt;p&gt;欢迎补充。&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/405458129/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/08/04/cool-design-elements/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458129/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458129/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><slash:comments>5</slash:comments><wfw:commentRss>http://www.chencheng.org/blog/feed/2010/01/06/dev-share-for-taobao-new-homepage/</wfw:commentRss><description>(此文目标对象为：设计师)现状视觉效果太复杂，前端一看就傻眼了，实现成本太大；界面太简陋，仅采用一些简单元素比如直角、实色填充等实现设计。其实可以尽情地使用这些设计元素水平或垂直的线性渐变
箭头及各...&lt;img src=&quot;http://www1.feedsky.com/t1/405458129/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/08/04/cool-design-elements/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458129/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458129/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 04 Aug 2010 17:26:09 +0800</pubDate><author>chencheng</author><comments>http://www.chencheng.org/blog/2010/08/04/cool-design-elements/#comments</comments><guid isPermaLink="false">http://www.chencheng.org/blog/2010/08/04/cool-design-elements/</guid><dc:creator>chencheng</dc:creator><fs:srclink>http://www.chencheng.org/blog/2010/08/04/cool-design-elements/</fs:srclink><fs:srcfeed>http://www.chencheng.org/blog/feed/</fs:srcfeed><fs:itemid>feedsky/sansan/~7194847/405458129/4785724</fs:itemid></item><item><title>[mac] 代理切换利器 - ProxySwitcher (v0.1.0) 发布</title><link>http://www.chencheng.org/blog/2010/08/01/proxy-switcher-release/</link><content:encoded xml:lang="zh-CN">&lt;p&gt;上周群里在讨论代理的问题，然后发现现在每次切换代理或更新pac都要这样来一遍：&quot;偏好设置 - 网络 - 高级 - 代理 - 设置好 - 应用”，很是费鼠标，决定利用周末的时间写个代理切换的小程序，将以上重复步骤简化为点一下鼠标。&lt;/p&gt;&lt;p&gt;&lt;strong&gt;更新0.1.1版本，自动检查网络的函数不对，暂时没找到好方法，先加入手动选择网络。&lt;/strong&gt;&lt;/p&gt;&lt;h2&gt;图：&lt;/h2&gt;&lt;p&gt;&lt;img src=&quot;http://www.chencheng.org/img/proxyswitcher.png&quot; /&gt;&lt;/p&gt;&lt;h2&gt;功能介绍：&lt;/h2&gt;&lt;p&gt;1) 在Socks, Pac, Http, None代理之间进行切换&lt;/p&gt;&lt;p&gt;2) 刷新Pac&lt;/p&gt;&lt;h2&gt;安装：&lt;/h2&gt;&lt;p&gt;&lt;b:0010/&gt;&lt;/p&gt;&lt;p&gt;下载后解压缩到Application目录后打开即可。&lt;/p&gt;&lt;h2&gt;反馈：&lt;/h2&gt;&lt;p&gt;如果您有任何建议或意见，请发邮件到 sorrycc#gmail.com，谢谢：）&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/405458130/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/08/01/proxy-switcher-release/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458130/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458130/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><slash:comments>3</slash:comments><wfw:commentRss>http://www.chencheng.org/blog/feed/2010/01/06/dev-share-for-taobao-new-homepage/</wfw:commentRss><description>上周群里在讨论代理的问题，然后发现现在每次切换代理或更新pac都要这样来一遍：&quot;偏好设置 - 网络 - 高级 - 代理 - 设置好 - 应用”，很是费鼠标，决定利用周末的时间写个代理切换的小程序，将以...&lt;img src=&quot;http://www1.feedsky.com/t1/405458130/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/08/01/proxy-switcher-release/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458130/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458130/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sun, 01 Aug 2010 13:59:17 +0800</pubDate><author>chencheng</author><comments>http://www.chencheng.org/blog/2010/08/01/proxy-switcher-release/#comments</comments><guid isPermaLink="false">http://www.chencheng.org/blog/2010/08/01/proxy-switcher-release/</guid><dc:creator>chencheng</dc:creator><fs:srclink>http://www.chencheng.org/blog/2010/08/01/proxy-switcher-release/</fs:srclink><fs:srcfeed>http://www.chencheng.org/blog/feed/</fs:srcfeed><fs:itemid>feedsky/sansan/~7194847/405458130/4785724</fs:itemid></item><item><title>IE6下百分比宽高设置原理</title><link>http://www.chencheng.org/blog/2010/02/04/percent-set-principle-under-ie6/</link><content:encoded xml:lang="zh-CN">&lt;h2&gt;结构&lt;/h2&gt;&lt;pre&gt;&amp;lt;div id=&amp;quot;A&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;B&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;C&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt; &lt;/pre&gt;&lt;h2&gt;情景&lt;/h2&gt;&lt;ol&gt;   &lt;li&gt;A 的 position 为 relative 或 absolute，或者 A 为 body (定位元素)&lt;/li&gt;    &lt;li&gt;B 的 position 不为 relative 或 absolute (非定位元素)&lt;/li&gt;    &lt;li&gt;C 的 position 为 absolute (绝对定位元素)&lt;/li&gt; &lt;/ol&gt;&lt;h2&gt;问题&lt;/h2&gt;&lt;ol&gt;   &lt;li&gt;C 的百分比宽度受以下影响：&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;B 的 margin, padding&lt;/li&gt;      &lt;li&gt;A 的 padding&lt;/li&gt;   &lt;/ul&gt;    &lt;p:0012/&gt;    &lt;p:0014/&gt;    &lt;li&gt;B 设置 layout 后，C的百分比宽高即以B为参照。&lt;/li&gt; &lt;/ol&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/405458131/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/02/04/percent-set-principle-under-ie6/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458131/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458131/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><slash:comments>1</slash:comments><wfw:commentRss>http://www.chencheng.org/blog/feed/2010/01/06/dev-share-for-taobao-new-homepage/</wfw:commentRss><description>结构&amp;lt;div id=&amp;quot;A&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;B&amp;quot;&amp;gt;&amp;lt;div id=&amp;quot;C&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;l...&lt;img src=&quot;http://www1.feedsky.com/t1/405458131/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/02/04/percent-set-principle-under-ie6/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458131/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458131/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Thu, 04 Feb 2010 17:58:55 +0800</pubDate><comments>http://www.chencheng.org/blog/2010/02/04/percent-set-principle-under-ie6/#comments</comments><guid isPermaLink="false">http://www.chencheng.org/blog/2010/02/04/percent-set-principle-under-ie6/</guid><fs:srclink>http://www.chencheng.org/blog/2010/02/04/percent-set-principle-under-ie6/</fs:srclink><fs:srcfeed>http://www.chencheng.org/blog/feed/</fs:srcfeed><fs:itemid>feedsky/sansan/~7194847/405458131/4785724</fs:itemid></item><item><title>Favicon图标小常识</title><link>http://www.chencheng.org/blog/2010/02/04/favicon-test/</link><content:encoded xml:lang="zh-CN">&lt;p&gt;&lt;strong&gt;tips：&lt;/strong&gt;如果根目录下有favicon.ico，可省去：&lt;pre&gt;&amp;lt;link rel=&amp;quot;shortcut icon&amp;quot; ...&amp;gt;&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;==&lt;/p&gt;&lt;p&gt;各浏览器下favicon的请求情况Google上搜过没找到，自己动手整理了下：&lt;/p&gt;&lt;table id=&quot;tb-12345&quot; style=&quot;table-layout: fixed; border-collapse: collapse; border:1px solid #ccc;&quot;&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;th rowspan=&quot;3&quot;&gt;&amp;#160;&lt;/th&gt;        &lt;th colspan=&quot;4&quot;&gt;icon文件实际存在&lt;/th&gt;        &lt;th colspan=&quot;2&quot; rowspan=&quot;2&quot;&gt;icon文件不存在(404)&lt;/th&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;th rowspan=&quot;2&quot;&gt;空Cache&lt;/th&gt;        &lt;th colspan=&quot;3&quot;&gt;有Cache且Cache没有过期&lt;/th&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;p:0012/&gt;        &lt;p:0013/&gt;        &lt;p:0014/&gt;        &lt;th&gt;Ctrl+F5/F5&lt;/th&gt;        &lt;th&gt;地址栏按回车&lt;/th&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;th&gt;Chrome&lt;/th&gt;        &lt;td&gt;发送请求&lt;/td&gt;        &lt;td colspan=&quot;3&quot;&gt;不发送请求&lt;/td&gt;        &lt;td colspan=&quot;2&quot;&gt;发送404请求&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;th&gt;Firefox&lt;/th&gt;        &lt;td&gt;发送请求&lt;/td&gt;        &lt;td colspan=&quot;3&quot;&gt;不发送请求&lt;/td&gt;        &lt;td colspan=&quot;2&quot;&gt;如果两次都返回404，第三次开始不再请求&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;th&gt;IE8/7&lt;/th&gt;        &lt;td&gt;发送请求&lt;/td&gt;        &lt;td colspan=&quot;3&quot;&gt;不发送请求&lt;/td&gt;        &lt;td colspan=&quot;2&quot;&gt;如果一次都返回404，第二次开始不再请求&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;th&gt;IE6/5x&lt;/th&gt;        &lt;td colspan=&quot;6&quot;&gt;只在加入收藏夹时，会请求icon，且cache过期前不再请求&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;th&gt;Safari&lt;/th&gt;        &lt;td&gt;发送请求&lt;/td&gt;        &lt;td&gt;/&lt;/td&gt;        &lt;td&gt;发送请求&lt;/td&gt;        &lt;td&gt;不发送请求&lt;/td&gt;        &lt;td&gt;发送404请求&lt;/td&gt;        &lt;td&gt;不发送请求&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;th&gt;Opera&lt;/th&gt;        &lt;td&gt;发送请求&lt;/td&gt;        &lt;td&gt;/&lt;/td&gt;        &lt;td&gt;发送lastModified请求&lt;/td&gt;        &lt;td&gt;不发送请求&lt;/td&gt;        &lt;td&gt;发送404请求&lt;/td&gt;        &lt;td&gt;不发送请求&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;==&lt;/p&gt;&lt;p&gt;rel：&lt;/p&gt;&lt;ol&gt;   &lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms537656(VS.85).aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/ms537656(VS.85).aspx&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://annevankesteren.nl/2010/01/optimizing-html&quot;&gt;http://annevankesteren.nl/2010/01/optimizing-html&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/405458132/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/02/04/favicon-test/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458132/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458132/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><slash:comments>4</slash:comments><wfw:commentRss>http://www.chencheng.org/blog/feed/2010/01/06/dev-share-for-taobao-new-homepage/</wfw:commentRss><description>tips：如果根目录下有favicon.ico，可省去：&amp;lt;link rel=&amp;quot;shortcut icon&amp;quot; ...&amp;gt;  ==  各浏览器下favicon的请求情况Goo...&lt;img src=&quot;http://www1.feedsky.com/t1/405458132/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/02/04/favicon-test/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458132/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458132/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Thu, 04 Feb 2010 17:16:16 +0800</pubDate><comments>http://www.chencheng.org/blog/2010/02/04/favicon-test/#comments</comments><guid isPermaLink="false">http://www.chencheng.org/blog/2010/02/04/favicon-test/</guid><fs:srclink>http://www.chencheng.org/blog/2010/02/04/favicon-test/</fs:srclink><fs:srcfeed>http://www.chencheng.org/blog/feed/</fs:srcfeed><fs:itemid>feedsky/sansan/~7194847/405458132/4785724</fs:itemid></item><item><title>IE6 Jump Bug</title><link>http://www.chencheng.org/blog/2010/02/04/ie6-jump-bug/</link><content:encoded xml:lang="zh-CN">&lt;p&gt;记性太差，写下来备忘。&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Bug 演示：&lt;/strong&gt;&lt;br /&gt;&lt;a title=&quot;http://f2ee.googlecode.com/svn/trunk/lab/2010/css/ie6-jump-bug.html&quot; href=&quot;http://f2ee.googlecode.com/svn/trunk/lab/2010/css/ie6-jump-bug.html&quot; target=&quot;_blank&quot;&gt;http://f2ee.googlecode.com/svn/trunk/lab/2010/css/ie6-jump-bug.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;b:0004/&gt;&lt;br /&gt;relative元素(A) &amp;gt; haslayout元素(B) &amp;gt; relative|absolute元素(C)&lt;/p&gt;&lt;p&gt;&lt;b:0006/&gt;&lt;br /&gt;&lt;s&gt;避免给B加layout，或者让C直接是A的子节点&lt;/s&gt;&lt;br /&gt;Update: 给A添加layout可解决此bug (relative元素顺手添加layout可以避免很多bug，多谢ytzong提醒)&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/405458133/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/02/04/ie6-jump-bug/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458133/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458133/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><slash:comments>8</slash:comments><wfw:commentRss>http://www.chencheng.org/blog/feed/2010/01/06/dev-share-for-taobao-new-homepage/</wfw:commentRss><description>记性太差，写下来备忘。  Bug 演示：     http://f2ee.googlecode.com/svn/trunk/lab/2010/css/ie6-jump-bug.html  触发此bug...&lt;img src=&quot;http://www1.feedsky.com/t1/405458133/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/02/04/ie6-jump-bug/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458133/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458133/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Thu, 04 Feb 2010 14:00:56 +0800</pubDate><comments>http://www.chencheng.org/blog/2010/02/04/ie6-jump-bug/#comments</comments><guid isPermaLink="false">http://www.chencheng.org/blog/2010/02/04/ie6-jump-bug/</guid><fs:srclink>http://www.chencheng.org/blog/2010/02/04/ie6-jump-bug/</fs:srclink><fs:srcfeed>http://www.chencheng.org/blog/feed/</fs:srcfeed><fs:itemid>feedsky/sansan/~7194847/405458133/4785724</fs:itemid></item><item><title>Flash的Fallback Content等</title><link>http://www.chencheng.org/blog/2010/02/04/flash-fallback-content/</link><content:encoded xml:lang="zh-CN">&lt;p&gt;看youa的源码发现的，原来flash可以有fallback content：&lt;/p&gt;&lt;pre&gt;&amp;lt;object type=&amp;quot;application/x-shockwave-flash&amp;quot; data=&amp;quot;...ny2010.swf&amp;quot; width=&amp;quot;300&amp;quot; height=&amp;quot;100&amp;quot; &amp;gt;
	&amp;lt;param name=&amp;quot;movie&amp;quot; value=&amp;quot;...ny2010.swf&amp;quot; wmode=&amp;quot;transparent&amp;quot;&amp;gt;
	&amp;lt;param name=&amp;quot;menu&amp;quot; value=&amp;quot;false&amp;quot;&amp;gt;
	&amp;lt;param name=&amp;quot;wmode&amp;quot; value=&amp;quot;transparent&amp;quot;&amp;gt;
	&lt;span style=&quot;color: red&quot;&gt;&amp;lt;a href=&amp;quot;...&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;.../ny2010.png&amp;quot; alt=&amp;quot;...&amp;quot; width=&amp;quot;300&amp;quot; height=&amp;quot;100&amp;quot;&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&amp;lt;/object&amp;gt;&lt;/pre&gt;&lt;p&gt;测试了Safari 4, Firefox 3, IE6/7/8禁用Flash插件的访问，均无兼容问题。&lt;/p&gt;&lt;p&gt;但是却有另外两个问题，都是IE下的：&lt;/p&gt;&lt;ol&gt;
  &lt;li&gt;Flash文件会被请求两次；&lt;/li&gt;

  &lt;li&gt;Flash要等全部下载好才播放；(尚未仔细验证)&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;==&lt;/p&gt;&lt;p&gt;所以最终采各家(见文末rel)所长后用了这种写法：&lt;/p&gt;&lt;pre&gt;&amp;lt;object classid=&amp;quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&amp;quot; width=&amp;quot;300&amp;quot; height=&amp;quot;68&amp;quot;&amp;gt;
	&amp;lt;param name=&amp;quot;movie&amp;quot; value=&amp;quot;.../T1isRtXlNEXXXXXXXX.swf&amp;quot;&amp;gt;
	&amp;lt;param name=&amp;quot;wmode&amp;quot; value=&amp;quot;transparent&amp;quot;&amp;gt;
	&lt;span style=&quot;color: #999&quot;&gt;&amp;lt;!--[if !IE]&amp;gt;--&amp;gt;&lt;/span&gt;
	&amp;lt;object type=&amp;quot;application/x-shockwave-flash&amp;quot; data=&amp;quot;.../T1isRtXlNEXXXXXXXX.swf&amp;quot; width=&amp;quot;300&amp;quot; height=&amp;quot;68&amp;quot;&amp;gt;
	&amp;lt;param name=&amp;quot;wmode&amp;quot; value=&amp;quot;transparent&amp;quot;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #999&quot;&gt;&amp;lt;!-- for firefox --&amp;gt;&lt;/span&gt;
	&lt;span style=&quot;color: #999&quot;&gt;&amp;lt;!--&amp;lt;![endif]--&amp;gt;
		&lt;span style=&quot;color: red&quot;&gt;&amp;lt;a href=&amp;quot;http://www.taobao.com/&amp;quot; target=&amp;quot;_top&amp;quot; style=&amp;quot;height:43px;margin-left:56px;&amp;quot;&amp;gt;
			淘宝网
			&amp;lt;img width=&amp;quot;167&amp;quot; height=&amp;quot;110&amp;quot; src=&amp;quot; alt=&amp;quot;淘宝网&amp;quot; title=&amp;quot;Taobao.com - 阿里巴巴旗下网站&amp;quot;&amp;gt;
		&amp;lt;/a&amp;gt;&lt;/span&gt;
	&lt;span style=&quot;color: #999&quot;&gt;&amp;lt;!--[if !IE]&amp;gt;--&amp;gt;&lt;/span&gt;&lt;/span&gt;
	&amp;lt;/object&amp;gt;
	&lt;span style=&quot;color: #999&quot;&gt;&amp;lt;!--&amp;lt;![endif]--&amp;gt;&lt;/span&gt;
&amp;lt;/object&amp;gt;&lt;/pre&gt;&lt;p&gt;==&lt;/p&gt;&lt;p&gt;在HTML5 Spec中找到下面两段相关文字：&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Some embedded content elements can have &lt;dfn&gt;fallback content&lt;/dfn&gt;: content that is to be used when the external resource cannot be used (e.g. because it is of an unsupported format). The element definitions state what the fallback is, if any.&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;Due to the algorithm above, the contents of &lt;code&gt;&lt;a href=&quot;http://www.w3.org/#the-object-element&quot;&gt;object&lt;/a&gt;&lt;/code&gt; elements act as &lt;b:0016/&gt;, used only when referenced resources can't be shown (e.g. because it returned a 404 error). This allows multiple &lt;code&gt;&lt;a href=&quot;http://www.w3.org/#the-object-element&quot;&gt;object&lt;/a&gt;&lt;/code&gt; elements to be nested inside each other, targeting multiple user agents with different capabilities, with the user agent picking the first one it supports.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;但测试证明，没有浏览器在swf文件404时启用fallback content。&lt;/p&gt;&lt;p&gt;==&lt;/p&gt;&lt;p&gt;&lt;b:0022/&gt;在浏览器支持flash的情况下(99%+?)，除IE家族外，其他浏览器均会发起对替换图片的请求。&lt;/p&gt;&lt;p&gt;==&lt;/p&gt;&lt;p&gt;rel:&lt;/p&gt;&lt;ol&gt;
  &lt;li&gt;&lt;b:0026/&gt;&lt;/li&gt;

  &lt;li&gt;&lt;b:0028/&gt;&lt;/li&gt;

  &lt;li&gt;&lt;b:0030/&gt;&lt;/li&gt;

  &lt;li&gt;&lt;b:0032/&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/405458134/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/02/04/flash-fallback-content/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458134/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458134/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><slash:comments>2</slash:comments><wfw:commentRss>http://www.chencheng.org/blog/feed/2010/01/06/dev-share-for-taobao-new-homepage/</wfw:commentRss><description>看youa的源码发现的，原来flash可以有fallback content：  &amp;lt;object type=&amp;quot;application/x-shockwave-flash&amp;quot; d...&lt;img src=&quot;http://www1.feedsky.com/t1/405458134/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/02/04/flash-fallback-content/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458134/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458134/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Thu, 04 Feb 2010 11:30:58 +0800</pubDate><comments>http://www.chencheng.org/blog/2010/02/04/flash-fallback-content/#comments</comments><guid isPermaLink="false">http://www.chencheng.org/blog/2010/02/04/flash-fallback-content/</guid><fs:srclink>http://www.chencheng.org/blog/2010/02/04/flash-fallback-content/</fs:srclink><fs:srcfeed>http://www.chencheng.org/blog/feed/</fs:srcfeed><fs:itemid>feedsky/sansan/~7194847/405458134/4785724</fs:itemid></item><item><title>新首页开发PPT详解 —— Sprites(1)</title><link>http://www.chencheng.org/blog/2010/01/16/ppt-detail-on-sprites-1/</link><content:encoded xml:lang="zh-CN">&lt;p&gt;因&lt;a href=&quot;http://www.chencheng.org/blog/2010/01/05/dev-share-for-taobao-new-homepage/&quot;&gt;PPT&lt;/a&gt;写得过于简短，此文对PPT里的第二部分详细说明下，可以对照着看。&lt;/p&gt;&lt;h2&gt;占位标签&lt;/h2&gt;&lt;blockquote&gt;&lt;p&gt;“The biggest problem with CSS sprites is memory usage.” —— vladimir，a leader in the Mozilla community&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;内存占用高是CSS Sprites的一大缺点，因为通常他会包含非常多的空白。&lt;b:0005/&gt;这个网站曾经用了张1299 * 15000的Sprites图，虽然压缩后只有26K，但这张图的内存占用达75M+之多。&lt;/p&gt;&lt;p&gt;所以为了更好地应用Sprites，我们要减少Sprites里空白所占的比例。&lt;/p&gt;&lt;p&gt;搜索&lt;b:0008/&gt;源码，可以发现共有38处&amp;lt;s&amp;gt;&amp;lt;/s&amp;gt;，42处&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;，他们都是用来占位的。s和b是两个废弃的标签，因为废弃，所以用起来既安全又环保。(经人提醒，b标签并没有被废弃，只是推荐优先选择strong和em)&lt;/p&gt;&lt;p&gt;个人觉得通过利用占位标签，可以更好地组织CSS Sprites，随心所欲地安排进行内部组织，使得Sprite图片尺寸尽可能地小，也使得空白位尽可能地少。&lt;/p&gt;&lt;p&gt;这里权衡下优缺点：&lt;/p&gt;&lt;ul&gt;   &lt;li&gt;优点：性能(内存占用少)、工作效率(省去精心计算)、成就感(图美)&lt;/li&gt;    &lt;li&gt;缺点：DOM数增加&lt;/li&gt; &lt;/ul&gt;&lt;p&gt;(ps: 此法绝非我原创，此前王爷和&lt;b:0015/&gt;就一直在用。)&lt;/p&gt;&lt;h2&gt;Image Sprites&lt;/h2&gt;&lt;p&gt;以下代码可以帮助理解什么是Image Sprites：&lt;/p&gt;&lt;pre&gt;&amp;lt;div style=&amp;quot;width:100px;height:100px;&lt;span style=&quot;color: red&quot;&gt;overflow:hidden;&lt;/span&gt;&amp;quot;&amp;gt;
    &amp;lt;img src=&amp;quot;&amp;quot; width=&amp;quot;400&amp;quot; height=&amp;quot;400&amp;quot; style=&amp;quot;&lt;span style=&quot;color: red&quot;&gt;margin:-50px 0 0 –50px;&lt;/span&gt;&amp;quot; /&amp;gt;
&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;p&gt;&lt;b:0020/&gt; (Google搜索结果页的Sprites图)&lt;/p&gt;&lt;p&gt;Image Sprites最经典的例子当然是Google搜索结果页的logo了，logo和CSS Sprites公用一张图。但这种做法也需要权衡，并不是在所有场景都适用：&lt;/p&gt;&lt;h5&gt;优点&lt;/h5&gt;&lt;ol&gt;
  &lt;li&gt;省去logo的HTTP请求&lt;/li&gt;

  &lt;li&gt;提升Sprites图的在请求序列中的位置&lt;br /&gt;有种情况我们可能都看到过：页面载入后，先是看到一个框架全好但没有背景图的页面，然后背景图一下子全部展现出来。这是因为通常背景图的请求发生在CSS载入并解析完成且HTML解析器遭遇到对应的节点时。应用此方法后，可以减缓这种情况的发生。因为1)不需要等待CSS载入，2)logo一般在HTML文档顶部，所以请求发起时间会有所提前。&lt;/li&gt;
&lt;/ol&gt;&lt;h5&gt;缺点&amp;amp;问题&lt;/h5&gt;&lt;ol&gt;
  &lt;li&gt;logo不可复制&lt;br /&gt;logo作为品牌的象征，有些用户可能会希望把这张图片复制或另存下来做某些用途，但应用这种方法后会使用户得不到他们想要的。&lt;/li&gt;

  &lt;li&gt;可替换(alt)文本显示问题&lt;br /&gt;使用负值定位后，alt文本会跟着img的位置一起变化，这样我们可能在图片未载入时就看不到希望看到的替换文本了。如图：&lt;br /&gt;&lt;img src=&quot;http://img02.taobaocdn.com/tps/i2/T1hdXsXl8DXXXXXXXX-409-280.png&quot; /&gt;&lt;br /&gt;(推荐阅读：&lt;b:0029/&gt;，&lt;b:0030/&gt;)&lt;/li&gt;

  &lt;li&gt;IE渐进渲染PNG的bug(只测试IE6，IE7/8待考证)&lt;br /&gt;我们知道，默认存储的图片在浏览器中是渐进渲染的。但IE在处理PNG的渐进渲染时表现地很怪异，一张13.8K的图片，在载入11K时才渲染这么一点(如下图)，然后到13.8K时全部展现，这个问题会导致Logo的展现缓慢。&lt;br /&gt;&lt;img src=&quot;http://img03.taobaocdn.com/tps/i3/T1OJ4sXbRkXXXXXXXX-320-550.png&quot; /&gt;&amp;#160;&lt;br /&gt;(感兴趣的朋友可自行用Network Simulator打开&lt;b:0032/&gt;看效果)&lt;/li&gt;
&lt;/ol&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/405458135/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/01/16/ppt-detail-on-sprites-1/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458135/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458135/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><slash:comments>8</slash:comments><wfw:commentRss>http://www.chencheng.org/blog/feed/2010/01/06/dev-share-for-taobao-new-homepage/</wfw:commentRss><description>因PPT写得过于简短，此文对PPT里的第二部分详细说明下，可以对照着看。  占位标签     “The biggest problem with CSS sprites is memory usage...&lt;img src=&quot;http://www1.feedsky.com/t1/405458135/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/01/16/ppt-detail-on-sprites-1/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458135/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458135/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Sat, 16 Jan 2010 12:44:14 +0800</pubDate><comments>http://www.chencheng.org/blog/2010/01/16/ppt-detail-on-sprites-1/#comments</comments><guid isPermaLink="false">http://www.chencheng.org/blog/2010/01/16/ppt-detail-on-sprites-1/</guid><fs:srclink>http://www.chencheng.org/blog/2010/01/16/ppt-detail-on-sprites-1/</fs:srclink><fs:srcfeed>http://www.chencheng.org/blog/feed/</fs:srcfeed><fs:itemid>feedsky/sansan/~7194847/405458135/4785724</fs:itemid></item><item><title>新首页开发PPT详解 &amp;mdash;&amp;mdash; HTML规范</title><link>http://www.chencheng.org/blog/2010/01/15/ppt-detail-on-html-spec/</link><content:encoded xml:lang="zh-CN">&lt;p&gt;因&lt;a href=&quot;http://www.chencheng.org/blog/2010/01/05/dev-share-for-taobao-new-homepage/&quot; target=&quot;_blank&quot;&gt;PPT&lt;/a&gt;写得过于简短，此文对PPT里的第一部分详细说明下，可以对照着看。&lt;/p&gt;&lt;h3&gt;一、Doctype&lt;/h3&gt;&lt;blockquote&gt;&lt;p&gt;A DOCTYPE is a mostly useless, but required, header. —— 《HTML5 Spec》&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Doctype最大的作用是让浏览器用来选择渲染模式，或者说是用来触发标准模式。具体点说，就是设置正确的Doctype进入(准)标准模式，设置了错误的或者没设置Doctype则进入怪癖模式。(附：&lt;b:0005/&gt;)&lt;/p&gt;&lt;p&gt;&lt;b:0007/&gt;，标准模式和准标准模式的区别仅在于非IE6/7浏览器对于&lt;strike&gt;单元格里&lt;/strike&gt;(原文说法可能有误，经测试所有图片均受影响)图片布局的不同处理。同事&lt;b:0009/&gt;做了细致地测试并给出了解决方案。&lt;br /&gt;&lt;font color=&quot;#ff0000&quot;&gt;Update 20100203：发现iframe的布局也受到影响，解决方法和图片一致。&lt;/font&gt;&lt;/p&gt;&lt;p&gt;还有个次要的作用是校验HTML时自动判断选择哪种规范。&lt;/p&gt;&lt;p&gt;另外，对于Doctype可能还存在的一些误解：&lt;/p&gt;&lt;ol&gt;   &lt;li&gt;认为设置了xhtml的Doctype，使用自闭合标签，通过xhtml验证，文档就成xhtml了，浏览器会以xhtml的引擎来解析。&lt;br /&gt;事实上，浏览器还是会以HTML引擎来解析文档。目前网上通过xhtml验证(页面下方贴xhtml验证通过图标)的其实都不是真正的XHTML，而是“HTML-Compatible XHTML”。因为XHTML刚出来时，浏览器都不支持他，然后W3C为了推广XHTML语法就搞了这么个东西。 (附：&lt;a href=&quot;http://hixie.ch/advocacy/xhtml&quot; target=&quot;_blank&quot;&gt;给HTML文档设置XHTML Doctype是有害的&lt;/a&gt;)&lt;/li&gt;    &lt;li&gt;认为strict的doctype即进入了“严格解析模式”，比如认为严格模式下标签一定要全部小写，该自闭合的元素一定要自闭合，否则页面会出错。&lt;br /&gt;事实上，doctype没有这个功能。&lt;/li&gt; &lt;/ol&gt;&lt;p&gt;说到兼容问题，大家可能会奇怪IE6/7居然也支持HTML5 Doctype，难道是因为他的“预见性”。其实不是的，IE是只要doctype符合 &lt;code&gt;&amp;lt;!doctype html xxxxxxxxxxx&amp;gt;&lt;/code&gt; 这种格式，都进入标准模式。个人猜测可能是W3C为了推广HTML5，利用了IE的这一点。&lt;/p&gt;&lt;h3&gt;二、Charset的Meta标签&lt;/h3&gt;&lt;pre&gt;&amp;lt;meta &lt;span style=&quot;color: red&quot;&gt;http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html;&lt;/span&gt; charset=gbk&amp;quot; /&amp;gt; 
&lt;br /&gt;&amp;lt;meta charset=&amp;quot;gbk&amp;quot; /&amp;gt;&lt;/pre&gt;&lt;p&gt;以上两种写法(均为兼容问题)的区别在于前者声明了mime-type为text/html。&lt;/p&gt;&lt;p&gt;所以主要问题就是这个mime-type声明能不能省去。据说，页面是text/html还是application/xhtml+xml还是其他什么的唯一决定权在于服务端的mime-type设置，所以页面上是否设置了mime-type完全没有意义。玉伯有另一种说法是mime-type有优先级，会先从取服务端，再取页面，因目前服务端基本都有设置，所以省去。(待测试考证)&lt;/p&gt;&lt;h3&gt;三、CSS和JavaScript的引入方式&lt;/h3&gt;&lt;pre&gt;&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;&amp;quot; &lt;span style=&quot;text-decoration: line-through&quot;&gt;type=&amp;quot;text/css&amp;quot; media=&amp;quot;all&amp;quot;&lt;/span&gt; /&amp;gt;
&amp;lt;style &lt;span style=&quot;text-decoration: line-through&quot;&gt;type=&amp;quot;text/css&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/style&amp;gt;
&amp;lt;script &lt;span style=&quot;text-decoration: line-through&quot;&gt;type=&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&amp;quot;&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;p&gt;这几个加删除线的属性都是默认值，故省去，详见&lt;b:0029/&gt;。&lt;/p&gt;&lt;p&gt;======&lt;/p&gt;&lt;p&gt;今天看了&lt;b:0032/&gt;后想到的两点：&lt;/p&gt;&lt;ol&gt;
  &lt;li&gt;&lt;b:0034/&gt;&lt;br /&gt;经测试，没设置的页面，Chrome/FF/Safari/Opera则会请求favicon.ico，&lt;strike&gt;而IE6/7/8不会请求。如果不想放弃IE下的这个icon，还是不要学&lt;/strike&gt;&lt;b:0037/&gt;&lt;strike&gt;省去这个标签。 &lt;/strike&gt;&lt;br /&gt;&lt;font color=&quot;#ff0000&quot;&gt;Update 20100130：可以省去，会写文章详细地说明下。&lt;/font&gt;&lt;/li&gt;

  &lt;li&gt;&lt;b:0041/&gt;&lt;br /&gt;一直在纠结这个问题。HTML解析器不认识XML的自闭合语法，会认为 / 是一个属性，然后因为 / 不是个合法的属性而过滤掉。省去？一直都有的，去掉可能会不适应。不省去？怎么看怎么不像HTML。&lt;/li&gt;
&lt;/ol&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/405458136/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/01/15/ppt-detail-on-html-spec/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458136/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458136/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><slash:comments>13</slash:comments><wfw:commentRss>http://www.chencheng.org/blog/feed/2010/01/06/dev-share-for-taobao-new-homepage/</wfw:commentRss><description>因PPT写得过于简短，此文对PPT里的第一部分详细说明下，可以对照着看。  一、Doctype     A DOCTYPE is a mostly useless, but required, hea...&lt;img src=&quot;http://www1.feedsky.com/t1/405458136/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/01/15/ppt-detail-on-html-spec/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458136/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458136/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Fri, 15 Jan 2010 17:27:16 +0800</pubDate><comments>http://www.chencheng.org/blog/2010/01/15/ppt-detail-on-html-spec/#comments</comments><guid isPermaLink="false">http://www.chencheng.org/blog/2010/01/15/ppt-detail-on-html-spec/</guid><fs:srclink>http://www.chencheng.org/blog/2010/01/15/ppt-detail-on-html-spec/</fs:srclink><fs:srcfeed>http://www.chencheng.org/blog/feed/</fs:srcfeed><fs:itemid>feedsky/sansan/~7194847/405458136/4785724</fs:itemid></item><item><title>淘宝新首页开发实践PPT分享</title><link>http://www.chencheng.org/blog/2010/01/06/dev-share-for-taobao-new-homepage/</link><content:encoded xml:lang="zh-CN">&lt;div id=&quot;__ss_2838236&quot; style=&quot;width: 425px; text-align: left&quot;&gt;&lt;a title=&quot;淘宝新首页开发实践&quot; style=&quot;display: block; margin: 12px 0px 3px; font: 14px helvetica,arial,sans-serif; text-decoration: underline&quot; href=&quot;http://www.slideshare.net/sorrycc/ss-2838236&quot; target=&quot;_blank&quot;&gt;淘宝新首页开发实践&lt;/a&gt;&lt;object style=&quot;margin:0px&quot; width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=random-100105231521-phpapp01&amp;amp;stripped_title=ss-2838236&quot; /&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;always&quot; /&gt;&lt;embed src=&quot;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=random-100105231521-phpapp01&amp;amp;stripped_title=ss-2838236&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style=&quot;font-size: 11px; padding-top: 2px; font-family: tahoma,arial; height: 26px&quot;&gt;View more &lt;a style=&quot;text-decoration: underline&quot; href=&quot;http://www.slideshare.net/&quot; target=&quot;_blank&quot;&gt;presentations&lt;/a&gt; from &lt;b:0004/&gt;.&lt;/div&gt;&lt;/div&gt;&lt;p&gt;详解：&lt;/p&gt;&lt;ol&gt;   &lt;li&gt;&lt;b:0008/&gt;&lt;/li&gt;    &lt;li&gt;&lt;b:0010/&gt;&lt;/li&gt;    &lt;li&gt;To be continued…&lt;/li&gt; &lt;/ol&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/405458137/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/01/06/dev-share-for-taobao-new-homepage/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458137/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458137/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><slash:comments>20</slash:comments><wfw:commentRss>http://www.chencheng.org/blog/feed/2010/01/06/dev-share-for-taobao-new-homepage/</wfw:commentRss><description>淘宝新首页开发实践    View more presentations from sorrycc.   详解：     HTML规范     Sprites(上)    To be continue...&lt;img src=&quot;http://www1.feedsky.com/t1/405458137/sansan/feedsky/s.gif?r=http://www.chencheng.org/blog/2010/01/06/dev-share-for-taobao-new-homepage/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;&lt;p class=&quot;fswww1&quot;&gt;&lt;a href=&quot;http://www1.feedsky.com/r/l/feedsky/sansan/405458137/art01.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; ismap=&quot;ismap&quot; src=&quot;http://www1.feedsky.com/r/i/feedsky/sansan/405458137/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Wed, 06 Jan 2010 13:38:39 +0800</pubDate><comments>http://www.chencheng.org/blog/2010/01/06/dev-share-for-taobao-new-homepage/#comments</comments><guid isPermaLink="false">http://www.chencheng.org/blog/2010/01/06/dev-share-for-taobao-new-homepage/</guid><fs:srclink>http://www.chencheng.org/blog/2010/01/06/dev-share-for-taobao-new-homepage/</fs:srclink><fs:srcfeed>http://www.chencheng.org/blog/feed/</fs:srcfeed><fs:itemid>feedsky/sansan/~7194847/405458137/4785724</fs:itemid></item></channel></rss>