<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.feedsky.com/styles/feedsky0.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:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feed.happinesz.cn" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/sofish" type="application/rss+xml"></fs:self_link><lastBuildDate>Tue, 17 Aug 2010 12:21:24 GMT</lastBuildDate><title>幸福收藏夹</title><description>在这里,存IT的理性,掺夹文学的浪漫…</description><image><url>http://www.feedsky.com/feed/sofish/sc/gif</url><title>幸福收藏夹</title><link>http://www.happinesz.cn</link></image><link>http://www.happinesz.cn</link><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><language>en</language><pubDate>Tue, 17 Aug 2010 12:28:22 GMT</pubDate><item><title>跨浏览器实现投影(box-shadow)那点事</title><link>http://www.happinesz.cn/archives/1426/</link><content:encoded>&lt;p&gt;对于投影的实现，其实有一个很好的方式，那就是利用 PNG 半透明效果。可惜，IE6 他不会让你这么做。当然，要实现的话，还是有可能的，只是，可能要绕很多圈。可是今天不是来绕圈的，而是来提供一个跨浏览器投影解决方案的。LOL。先来看一下效果：&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;box-shadow&quot; src=&quot;http://www.happinesz.cn/wp-content/uploads/2010/08/%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7-2010-08-17-%E4%B8%8B%E5%8D%8807.38.04.png&quot; /&gt;&lt;/p&gt;
&lt;p&gt;我想，你可能首先想到的是 CSS 3 的 box-shadow。我也一样。对于 Gecko /&amp;nbsp; Webkit / Opera 的实现，想象中来说，有一个很理想的方案是一个表达式即可实现。像：&lt;/p&gt;
&lt;pre class=&quot;code_bg&quot;&gt;
&lt;ol class=&quot;dp-css&quot;&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span&gt;box-shadow:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;1px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;3px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;12px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;#aaa&lt;/span&gt;&lt;span&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/pre&gt;
&lt;p&gt;一句话，这就是CSS 3 提供给我们的。多漂亮。可惜，可惜，可惜，目前来说也只有 Opera 能显示正常。FT。想到 -moz -webkit 这了前缀了没？没错，这一句需要变成：&lt;/p&gt;
&lt;pre class=&quot;code_bg&quot;&gt;
&lt;ol class=&quot;dp-css&quot;&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span&gt;-moz-box-shadow:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;1px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;3px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;12px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;#aaa&lt;/span&gt;&lt;span&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;-webkit-box-shadow:&amp;nbsp;&lt;span class=&quot;value&quot;&gt;1px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;3px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;12px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;#aaa&lt;/span&gt;&lt;span&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;box-shadow:&amp;nbsp;&lt;span class=&quot;value&quot;&gt;1px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;3px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;12px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;#aaa&lt;/span&gt;&lt;span&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/pre&gt;
&lt;p&gt;看看。代码看起来就一坨坨的，多恶心。不过，至少实现了我们的效果。而且，还是比较好的效果。最囧的是，IE，甚至 IE 9，都没有 box-shadow。废话少说，抱怨并不会让你上面那几行代码在 IE 下正常显示。那，我们有什么好的方法来实现一个 fallback 吗? FILTER！！很多时候我都会想，至少是找到解决方法了，即使代码并不好看。是吧，比如这里使用 Glow 和 Shadow 来实现。&lt;/p&gt;
&lt;pre class=&quot;code_bg&quot;&gt;
&lt;ol class=&quot;dp-xml&quot;&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span&gt;/*&amp;nbsp;gte&amp;nbsp;ie8&amp;nbsp;*/&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;-ms-filter:&amp;nbsp;&amp;quot;progid:DXImageTransform.Microsoft.Glow(&lt;span class=&quot;attribute&quot;&gt;color&lt;/span&gt;&lt;span&gt;=#eeeeee,&lt;/span&gt;&lt;span class=&quot;attribute&quot;&gt;strength&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class=&quot;attribute-value&quot;&gt;3&lt;/span&gt;&lt;span&gt;)&amp;nbsp;progid:DXImageTransform.Microsoft.Shadow(&lt;/span&gt;&lt;span class=&quot;attribute&quot;&gt;color&lt;/span&gt;&lt;span&gt;=#bbbbbb,&lt;/span&gt;&lt;span class=&quot;attribute&quot;&gt;direction&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class=&quot;attribute-value&quot;&gt;135&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span class=&quot;attribute&quot;&gt;strength&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class=&quot;attribute-value&quot;&gt;6&lt;/span&gt;&lt;span&gt;)&amp;quot;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;/*&amp;nbsp;lte&amp;nbsp;ie7&amp;nbsp;*/&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;*filter:&amp;nbsp;progid:DXImageTransform.Microsoft.Glow(&lt;span class=&quot;attribute&quot;&gt;color&lt;/span&gt;&lt;span&gt;=#eeeeee&amp;nbsp;,&lt;/span&gt;&lt;span class=&quot;attribute&quot;&gt;strength&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class=&quot;attribute-value&quot;&gt;3&lt;/span&gt;&lt;span&gt;)&amp;nbsp;progid:DXImageTransform.Microsoft.Shadow(&lt;/span&gt;&lt;span class=&quot;attribute&quot;&gt;color&lt;/span&gt;&lt;span&gt;=#bbbbbb,&lt;/span&gt;&lt;span class=&quot;attribute&quot;&gt;direction&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class=&quot;attribute-value&quot;&gt;135&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span class=&quot;attribute&quot;&gt;strength&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span class=&quot;attribute-value&quot;&gt;6&lt;/span&gt;&lt;span&gt;);&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/pre&gt;
&lt;p&gt;好了，投影投下来了，但结果却是这样的：&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.happinesz.cn/wp-content/uploads/2010/08/%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7-2010-08-17-%E4%B8%8B%E5%8D%8807.59.20.png&quot; alt=&quot;text-shadow&quot; /&gt;&lt;/p&gt;
&lt;p&gt;我们要的是 box-shadow，可不是 text-shadow 呢。杯具。改 Doctype、层级、XX 都不行。这整个都是个杯具。然后， 好吧。其实，你一定不耐烦了。给你一个方案吧。那就是给加个背景色。比如：&lt;/p&gt;
&lt;pre class=&quot;code_bg&quot;&gt;
&lt;ol class=&quot;dp-xml&quot;&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span&gt;//&amp;nbsp;hack&amp;nbsp;for&amp;nbsp;ie&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;background:&amp;nbsp;#fff;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/pre&gt;
&lt;p&gt;这样，终于，显示了。当然，如下图。这依然是个杯具。这样的澡点，我们又不是搞艺术的。我的目的很简单。只是为了实现跨浏览器的投影，一样的投影，为什么就这么麻烦呢？&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.happinesz.cn/wp-content/uploads/2010/08/%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7-2010-08-17-%E4%B8%8B%E5%8D%8807.57.28.png&quot; alt=&quot;box-shadow&quot; /&gt;&lt;/p&gt;
&lt;p&gt;囧。继续继续。既然 PNG 半透明对于 IE6 本身来说就是一个杯具，就让我们从这个有澡点的结果入手吧。其实，这个，Glow 是有那么点问题。那么&amp;#8230; 这个 Shadow 不是显示挺好么。??? 明白了没？对，对，就是这样，利用 Shadow 的方向。不使用 Glow，直接投向 0 、 90 、180 、270 四个面，不就行了么？哦哈哈，先让我们来写下代码：&lt;/p&gt;
&lt;pre class=&quot;code_bg&quot;&gt;
&lt;ol class=&quot;dp-css&quot;&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span class=&quot;comment&quot;&gt;/*&amp;nbsp;gte&amp;nbsp;ie8&amp;nbsp;*/&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;-ms-filter:&lt;span class=&quot;string&quot;&gt;&amp;quot;progid:DXImageTransform.Microsoft.Shadow(color=#eeeeee,direction=0,strength=6)&amp;nbsp;progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=90,strength=10)&amp;nbsp;progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=180,strength=10)&amp;nbsp;progid:DXImageTransform.Microsoft.Shadow(color=#eeeeee,direction=270,strength=6)&amp;quot;&lt;/span&gt;&lt;span&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;span class=&quot;comment&quot;&gt;/*&amp;nbsp;lte&amp;nbsp;ie7&amp;nbsp;*/&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;*filter:&amp;nbsp;progid:DXImageTransform.Microsoft.Shadow(color=&lt;span class=&quot;value&quot;&gt;#eeeeee&lt;/span&gt;&lt;span&gt;,direction=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;0&lt;/span&gt;&lt;span&gt;,strength=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;6&lt;/span&gt;&lt;span&gt;)&amp;nbsp;progid:DXImageTransform.Microsoft.Shadow(color=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;#dddddd&lt;/span&gt;&lt;span&gt;,direction=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;90&lt;/span&gt;&lt;span&gt;,strength=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;10&lt;/span&gt;&lt;span&gt;)&amp;nbsp;progid:DXImageTransform.Microsoft.Shadow(color=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;#dddddd&lt;/span&gt;&lt;span&gt;,direction=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;180&lt;/span&gt;&lt;span&gt;,strength=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;10&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span&gt;progid:DXImageTransform.Microsoft.Shadow(color=&lt;span class=&quot;value&quot;&gt;#eeeeee&lt;/span&gt;&lt;span&gt;,direction=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;270&lt;/span&gt;&lt;span&gt;,strength=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;6&lt;/span&gt;&lt;span&gt;);&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/pre&gt;
&lt;p&gt;结果，哈哈，自己测试吧。也附上全部代码：&lt;/p&gt;
&lt;p class=&quot;idownload&quot;&gt;测试页面：&lt;a href=&quot;/file/demo/dropshadow.html&quot;&gt;box-shadow demo&lt;/a&gt;&lt;/p&gt;
&lt;pre class=&quot;code_bg&quot;&gt;
&lt;ol class=&quot;dp-css&quot;&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span class=&quot;comment&quot;&gt;/*&amp;nbsp;hack&amp;nbsp;for&amp;nbsp;ie&amp;nbsp;*/&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;span class=&quot;keyword&quot;&gt;background&lt;/span&gt;&lt;span&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;#fff&lt;/span&gt;&lt;span&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;span class=&quot;comment&quot;&gt;/*&amp;nbsp;sane&amp;nbsp;web&amp;nbsp;browsers&amp;nbsp;*/&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;-moz-box-shadow:&lt;span class=&quot;value&quot;&gt;1px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;3px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;12px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;#bbb&lt;/span&gt;&lt;span&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;-webkit-box-shadow:&lt;span class=&quot;value&quot;&gt;1px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;3px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;12px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;#bbb&lt;/span&gt;&lt;span&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;box-shadow:&lt;span class=&quot;value&quot;&gt;1px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;3px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;12px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;#bbb&lt;/span&gt;&lt;span&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span class=&quot;comment&quot;&gt;/*&amp;nbsp;gte&amp;nbsp;ie8&amp;nbsp;*/&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;-ms-filter:&lt;span class=&quot;string&quot;&gt;&amp;quot;progid:DXImageTransform.Microsoft.Shadow(color=#eeeeee,direction=0,strength=6)&amp;nbsp;progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=90,strength=10)&amp;nbsp;progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=180,strength=10)&amp;nbsp;progid:DXImageTransform.Microsoft.Shadow(color=#eeeeee,direction=270,strength=6)&amp;quot;&lt;/span&gt;&lt;span&gt;;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;&lt;span class=&quot;comment&quot;&gt;/*&amp;nbsp;lte&amp;nbsp;ie7&amp;nbsp;*/&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;*filter:&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;progid:DXImageTransform.Microsoft.Shadow(color=&lt;span class=&quot;value&quot;&gt;#eeeeee&lt;/span&gt;&lt;span&gt;,direction=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;0&lt;/span&gt;&lt;span&gt;,strength=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;6&lt;/span&gt;&lt;span&gt;)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;progid:DXImageTransform.Microsoft.Shadow(color=&lt;span class=&quot;value&quot;&gt;#dddddd&lt;/span&gt;&lt;span&gt;,direction=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;90&lt;/span&gt;&lt;span&gt;,strength=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;10&lt;/span&gt;&lt;span&gt;)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;progid:DXImageTransform.Microsoft.Shadow(color=&lt;span class=&quot;value&quot;&gt;#dddddd&lt;/span&gt;&lt;span&gt;,direction=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;180&lt;/span&gt;&lt;span&gt;,strength=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;10&lt;/span&gt;&lt;span&gt;)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;progid:DXImageTransform.Microsoft.Shadow(color=&lt;span class=&quot;value&quot;&gt;#eeeeee&lt;/span&gt;&lt;span&gt;,direction=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;270&lt;/span&gt;&lt;span&gt;,strength=&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;6&lt;/span&gt;&lt;span&gt;);&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/pre&gt;
&lt;p&gt;话说，本来一句 box-shadow 就可以搞定的东西，竟然要写这么一坨很恶心的代码来实现。囧。同时，期待更好的方案！&lt;/p&gt;
&lt;p&gt;&lt;hr&gt;&amp;copy;2010 &lt;a href=&quot;http://www.happinesz.cn&quot;&gt;幸福收藏夹&lt;/a&gt;. 版权所有,转载务必注明.&lt;a href=&quot;http://www.happinesz.cn/archives/1292/&quot;&gt;&lt;strong style=&quot;color:#f30;&quot;&gt;招聘: &lt;/strong&gt;支付宝前端开发，此地钱多，人少，速来&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/403827391/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1426/&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/sofish/403827391/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/sofish/403827391/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=b5e4bca37207f12dbb07e4d358408994&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=b5e4bca37207f12dbb07e4d358408994&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=3e8693e8d626023333fb76a7ac598802&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=3e8693e8d626023333fb76a7ac598802&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=01d4f096307c4db60667e5e5114f8319&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=01d4f096307c4db60667e5e5114f8319&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=cfa4f02f23a02ac5a9460300980aa0e5&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=cfa4f02f23a02ac5a9460300980aa0e5&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=2d0d3817914f7490e49ed1b5e28bf0ce&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=2d0d3817914f7490e49ed1b5e28bf0ce&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://www.happinesz.cn/archives/1426/feed/</wfw:commentRss><slash:comments>6</slash:comments><description>对于投影的实现，其实有一个很好的方式，那就是利用 PNG 半透明效果。可惜，IE6 他不会让你这么做。当然，要实现的话，还是有可能的，只是，可能要绕很多圈。可是今天不是来绕圈的，而是来提供一个跨浏览器投影解决方案的。LOL。先来看一下效果： 我想，你可能首先想到的是 CSS 3 的 box-shadow。我也一样。对于 Gecko /&amp;#160; Webkit / Opera 的实现，想象中来说，有一个很理想的方案是一个表达式即可实现。像： box-shadow:&amp;#160;1px&amp;#160;3px&amp;#160;12px&amp;#160;#aaa;&amp;#160; 一句话，这就是CSS 3 提供给我们的。多漂亮。可惜，可惜，可惜，目前来说也只有 Opera 能显示正常。FT。想到 -moz -webkit 这了前缀了没？没错，这一句需要变成： -moz-box-shadow:&amp;#160;1px&amp;#160;3px&amp;#160;12px&amp;#160;#aaa;&amp;#160; -webkit-box-shadow:&amp;#160;1px&amp;#160;3px&amp;#160;12px&amp;#160;#aaa;&amp;#160; box-shadow:&amp;#160;1px&amp;#160;3px&amp;#160;12px&amp;#160;#aaa;&amp;#160; 看看。代码看起来就一坨坨的，多恶心。不过，至少实现了我们的效果。而且，还是比较好的效果。最囧的是，IE，甚至 IE 9，都没有 box-shadow。废话少说，抱怨并不会让你上面那几行代码在 IE 下正常显示。那，我们有什么好的方法来实现一个 fallback 吗? FILTER！！很多时候我都会想，至少是找到解决方法了，即使代码并不好看。是吧，比如这里使用 Glow 和 Shadow 来实现。 /*&amp;#160;gte&amp;#160;ie8&amp;#160;*/&amp;#160; -ms-filter:&amp;#160;&amp;#34;progid:DXImageTransform.Microsoft.Glow(color=#eeeeee,strength=3)&amp;#160;progid:DXImageTransform.Microsoft.Shadow(color=#bbbbbb,direction=135,strength=6)&amp;#34;;&amp;#160; &amp;#160; /*&amp;#160;lte&amp;#160;ie7&amp;#160;*/&amp;#160;&amp;#160; *filter:&amp;#160;progid:DXImageTransform.Microsoft.Glow(color=#eeeeee&amp;#160;,strength=3)&amp;#160;progid:DXImageTransform.Microsoft.Shadow(color=#bbbbbb,direction=135,strength=6);&amp;#160; 好了，投影投下来了，但结果却是这样的： 我们要的是 box-shadow，可不是 text-shadow 呢。杯具。改 Doctype、层级、XX 都不行。这整个都是个杯具。然后， 好吧。其实，你一定不耐烦了。给你一个方案吧。那就是给加个背景色。比如： //&amp;#160;hack&amp;#160;for&amp;#160;ie&amp;#160;&amp;#160; background:&amp;#160;#fff;&amp;#160; [...]&lt;img src=&quot;http://www1.feedsky.com/t1/403827391/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1426/&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/sofish/403827391/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/sofish/403827391/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=b5e4bca37207f12dbb07e4d358408994&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=b5e4bca37207f12dbb07e4d358408994&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=3e8693e8d626023333fb76a7ac598802&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=3e8693e8d626023333fb76a7ac598802&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=01d4f096307c4db60667e5e5114f8319&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=01d4f096307c4db60667e5e5114f8319&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=cfa4f02f23a02ac5a9460300980aa0e5&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=cfa4f02f23a02ac5a9460300980aa0e5&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=2d0d3817914f7490e49ed1b5e28bf0ce&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=2d0d3817914f7490e49ed1b5e28bf0ce&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</description><category>box-shadow</category><category>CSS 相关</category><category>filter</category><category>css</category><pubDate>Tue, 17 Aug 2010 20:21:24 +0800</pubDate><author>sofish</author><comments>http://www.happinesz.cn/archives/1426/#comments</comments><guid isPermaLink="false">http://www.happinesz.cn/?p=1426</guid><dc:creator>sofish</dc:creator><fs:srclink>http://www.happinesz.cn/archives/1426/</fs:srclink><fs:srcfeed>http://www.happinesz.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/sofish/~1329654/403827391/1334283</fs:itemid></item><item><title>标签 &lt;li /&gt; 是不是块级元素</title><link>http://www.happinesz.cn/archives/1416/</link><content:encoded>&lt;p&gt;块级元素：block-level，相信大家都知道吧（or Google it）。以前在写代码的时候，面对 &lt;code&gt;&amp;lt;li /&amp;gt;&lt;/code&gt; 标签总觉得很奇怪。为什么它可以设定高度，但又不像 &lt;code&gt;&amp;lt;h1 /&amp;gt;&lt;/code&gt; 这些元素，那种感觉就像它是个&amp;ldquo;半内联&amp;quot;的（内联：inline[text]-level）元素。HTML 4是这样描述的：&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The following elements &lt;span style=&quot;color: rgb(204, 51, 0); text-decoration: underline;&quot;&gt;&lt;strong&gt;may also be considered&lt;/strong&gt;&lt;/span&gt; block-level elements since they may contain block-level elements:&lt;/p&gt;
&lt;ul class=&quot;elements&quot;&gt;
&lt;li&gt;&lt;a href=&quot;http://htmlhelp.com/reference/html40/lists/dd.html&quot;&gt;DD&lt;/a&gt; &amp;#8211; Definition description&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://htmlhelp.com/reference/html40/lists/dt.html&quot;&gt;DT&lt;/a&gt; &amp;#8211; Definition term&lt;/li&gt;
&lt;li class=&quot;frameset&quot;&gt;&lt;a href=&quot;http://htmlhelp.com/reference/html40/frames/frameset.html&quot;&gt;FRAMESET&lt;/a&gt; &amp;#8211; Frameset&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://htmlhelp.com/reference/html40/lists/li.html&quot;&gt;LI&lt;/a&gt; &amp;#8211; List item&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://htmlhelp.com/reference/html40/tables/tbody.html&quot;&gt;TBODY&lt;/a&gt; &amp;#8211; Table body&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://htmlhelp.com/reference/html40/tables/td.html&quot;&gt;TD&lt;/a&gt; &amp;#8211; Table data cell&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://htmlhelp.com/reference/html40/tables/tfoot.html&quot;&gt;TFOOT&lt;/a&gt; &amp;#8211; Table foot&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://htmlhelp.com/reference/html40/tables/th.html&quot;&gt;TH&lt;/a&gt; &amp;#8211; Table header cell&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://htmlhelp.com/reference/html40/tables/thead.html&quot;&gt;THEAD&lt;/a&gt; &amp;#8211; Table head&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://htmlhelp.com/reference/html40/tables/tr.html&quot;&gt;TR&lt;/a&gt; &amp;#8211; Table row&lt;/li&gt;
&lt;/ul&gt;
&lt;p class=&quot;idownload&quot;&gt;via: &lt;a href=&quot;http://htmlhelp.com/reference/html40/block.html&quot;&gt;HTML 4 Block-Level Elements&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;这段描述中，似乎也是在说， &lt;code&gt;&amp;lt;li /&amp;gt;&lt;/code&gt; 就是一个&amp;quot;半内联&amp;quot;的元素。当然，这个列表里面的类似于 &lt;code&gt;&amp;lt;td /&amp;gt;&lt;/code&gt; 这些元素，也曾给我带来这样的疑惑。今天看了一下各浏览器的默认CSS。结果是这样的：&lt;/p&gt;
&lt;table width=&quot;500&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th width=&quot;46%&quot;&gt;Browsers&lt;/th&gt;
&lt;th width=&quot;46%&quot;&gt;CSS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;IE6/IE7&lt;/td&gt;
&lt;td&gt;&lt;code&gt;li{display:block;&lt;/code&gt;}&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IE8+ / Webkit / Firefox / Opera&lt;/td&gt;
&lt;td&gt;&lt;code&gt;li{display:list-item;&lt;/code&gt;}&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;在这里，也基本上明了了。在除 IE6/7 以外的 A-Grade 浏览器中，就是一个&amp;quot;半内联&amp;quot;的元素。提到 &lt;code&gt;display:list-item;&lt;/code&gt; ，其实，即使现在所有的 A-Grade 浏览器都支持，用的人其实不多。为什么？其实就是没什么用。在 Quirks Mode，PPK 是这样说的：&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;display: list-item&lt;/code&gt; means that the element is displayed as a list-item, which mainly means that it has a bullet in front of it (like an UL), except in IE 5 on Mac where it gets a number (like an OL). The numbers are buggy: all previous LI&amp;#8217;s in the page count as one, so this example starts with number 5 (the screenshot was made before I inserted my compatibility-LI&amp;#8217;s).&lt;/p&gt;
&lt;div style=&quot;line-height: 1.8; width: 25em;&quot;&gt;Live example:&lt;/p&gt;
&lt;div style=&quot;border: 1px solid rgb(204, 0, 0); padding: 10px; margin-bottom: 10px;&quot;&gt;display: block&lt;/p&gt;
&lt;div style=&quot;border: 1px solid rgb(0, 204, 0); padding: 10px; display: list-item; margin-bottom: 10px;&quot;&gt;display: list-item&lt;/div&gt;
&lt;div style=&quot;border: 1px solid rgb(0, 0, 204); padding: 10px; display: list-item; margin-bottom: 10px;&quot;&gt;display: list-item&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;Right。其实这个意义不大。但也算是解了自己的一个疑惑。分享出来，如果你也有这样的疑惑，或许下次 Coding 的时候出现 Bug 或者其他疑问，估计也就能很快反应过来了。&lt;/p&gt;
&lt;p&gt;&lt;hr&gt;&amp;copy;2010 &lt;a href=&quot;http://www.happinesz.cn&quot;&gt;幸福收藏夹&lt;/a&gt;. 版权所有,转载务必注明.&lt;a href=&quot;http://www.happinesz.cn/archives/1292/&quot;&gt;&lt;strong style=&quot;color:#f30;&quot;&gt;招聘: &lt;/strong&gt;支付宝前端开发，此地钱多，人少，速来&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/403827392/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1416/&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/sofish/403827392/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/sofish/403827392/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=90ab1dd69c70a5c1bfb1c447d28b868a&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=90ab1dd69c70a5c1bfb1c447d28b868a&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=73a82ab5bf38015cebbc8cd429e72fb1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=73a82ab5bf38015cebbc8cd429e72fb1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=ed0771156345cbf4de1018db51408910&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=ed0771156345cbf4de1018db51408910&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=17cbf3ded45e1ae4c4e48a8ec1f2154c&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=17cbf3ded45e1ae4c4e48a8ec1f2154c&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=d302bddb8dd455106cacb28654f5aa5f&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=d302bddb8dd455106cacb28654f5aa5f&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://www.happinesz.cn/archives/1416/feed/</wfw:commentRss><slash:comments>25</slash:comments><description>块级元素：block-level，相信大家都知道吧（or Google it）。以前在写代码的时候，面对 &amp;#60;li /&amp;#62; 标签总觉得很奇怪。为什么它可以设定高度，但又不像 &amp;#60;h1 /&amp;#62; 这些元素，那种感觉就像它是个&amp;#8220;半内联&amp;#34;的（内联：inline[text]-level）元素。HTML 4是这样描述的： The following elements may also be considered block-level elements since they may contain block-level elements: DD &amp;#8211; Definition description DT &amp;#8211; Definition term FRAMESET &amp;#8211; Frameset LI &amp;#8211; List item TBODY &amp;#8211; Table body TD &amp;#8211; Table data cell TFOOT &amp;#8211; Table foot TH &amp;#8211; [...]&lt;img src=&quot;http://www1.feedsky.com/t1/403827392/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1416/&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/sofish/403827392/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/sofish/403827392/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=90ab1dd69c70a5c1bfb1c447d28b868a&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=90ab1dd69c70a5c1bfb1c447d28b868a&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=73a82ab5bf38015cebbc8cd429e72fb1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=73a82ab5bf38015cebbc8cd429e72fb1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=ed0771156345cbf4de1018db51408910&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=ed0771156345cbf4de1018db51408910&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=17cbf3ded45e1ae4c4e48a8ec1f2154c&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=17cbf3ded45e1ae4c4e48a8ec1f2154c&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=d302bddb8dd455106cacb28654f5aa5f&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=d302bddb8dd455106cacb28654f5aa5f&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</description><category>block-level</category><category>li</category><category>css</category><category>资源共享</category><pubDate>Sun, 01 Aug 2010 16:13:31 +0800</pubDate><author>sofish</author><comments>http://www.happinesz.cn/archives/1416/#comments</comments><guid isPermaLink="false">http://www.happinesz.cn/archives/1416/</guid><dc:creator>sofish</dc:creator><fs:srclink>http://www.happinesz.cn/archives/1416/</fs:srclink><fs:srcfeed>http://www.happinesz.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/sofish/~1329654/403827392/1334283</fs:itemid></item><item><title>关于 HTML5 那点事</title><link>http://www.happinesz.cn/archives/1406/</link><content:encoded>&lt;p&gt;分享一下今天在公司&amp;ldquo;半月谈&amp;rdquo;分享会上的一个KeyNote。没现场听，可能看内容会有地方找不到头绪。无论你想简单了解，还是深入学习，强烈推荐一下《&lt;a href=&quot;../../../../../archives/1389/&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Links to 解读 HTML5：建议、技巧和技术&quot;&gt;解读  HTML5：建议、技巧和技术&lt;/a&gt;》这篇文章。&lt;/p&gt;
&lt;div style=&quot;width: 500px;&quot; id=&quot;__ss_4871839&quot;&gt;&lt;object width=&quot;500&quot; height=&quot;418&quot; id=&quot;__sse4871839&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=html5-100730061442-phpapp01&amp;amp;stripped_title=html5-4871839&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 width=&quot;500&quot; height=&quot;418&quot; name=&quot;__sse4871839&quot; src=&quot;http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=html5-100730061442-phpapp01&amp;amp;stripped_title=html5-4871839&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;
&lt;div style=&quot;padding: 5px 0pt 12px;&quot;&gt;View more &lt;a href=&quot;http://www.slideshare.net/&quot;&gt;presentations&lt;/a&gt; from &lt;a href=&quot;http://www.slideshare.net/sofish&quot;&gt;sofish&lt;/a&gt;.&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;hr&gt;&amp;copy;2010 &lt;a href=&quot;http://www.happinesz.cn&quot;&gt;幸福收藏夹&lt;/a&gt;. 版权所有,转载务必注明.&lt;a href=&quot;http://www.happinesz.cn/archives/1292/&quot;&gt;&lt;strong style=&quot;color:#f30;&quot;&gt;招聘: &lt;/strong&gt;支付宝前端开发，此地钱多，人少，速来&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/403827393/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1406/&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/sofish/403827393/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/sofish/403827393/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=378c4f406ce1c19d89d533417baf5679&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=378c4f406ce1c19d89d533417baf5679&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=8473eb4ee98c71f28a29039394d8a3fd&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=8473eb4ee98c71f28a29039394d8a3fd&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=05c0598055290bb4abf366de0c1ce49d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=05c0598055290bb4abf366de0c1ce49d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=7640c0b0f13432bbea4172e67ef7bd91&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=7640c0b0f13432bbea4172e67ef7bd91&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=e621a962163b2f1535f269d1d6c3dd3e&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=e621a962163b2f1535f269d1d6c3dd3e&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://www.happinesz.cn/archives/1406/feed/</wfw:commentRss><slash:comments>13</slash:comments><description>分享一下今天在公司&amp;#8220;半月谈&amp;#8221;分享会上的一个KeyNote。没现场听，可能看内容会有地方找不到头绪。无论你想简单了解，还是深入学习，强烈推荐一下《解读 HTML5：建议、技巧和技术》这篇文章。 View more presentations from sofish. &amp;#169;2010 幸福收藏夹. 版权所有,转载务必注明.招聘: 支付宝前端开发，此地钱多，人少，速来&lt;img src=&quot;http://www1.feedsky.com/t1/403827393/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1406/&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/sofish/403827393/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/sofish/403827393/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=378c4f406ce1c19d89d533417baf5679&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=378c4f406ce1c19d89d533417baf5679&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=8473eb4ee98c71f28a29039394d8a3fd&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=8473eb4ee98c71f28a29039394d8a3fd&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=05c0598055290bb4abf366de0c1ce49d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=05c0598055290bb4abf366de0c1ce49d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=7640c0b0f13432bbea4172e67ef7bd91&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=7640c0b0f13432bbea4172e67ef7bd91&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=e621a962163b2f1535f269d1d6c3dd3e&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=e621a962163b2f1535f269d1d6c3dd3e&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</description><category>html5</category><category>资源共享</category><pubDate>Fri, 30 Jul 2010 19:28:01 +0800</pubDate><author>sofish</author><comments>http://www.happinesz.cn/archives/1406/#comments</comments><guid isPermaLink="false">http://www.happinesz.cn/?p=1406</guid><dc:creator>sofish</dc:creator><fs:srclink>http://www.happinesz.cn/archives/1406/</fs:srclink><fs:srcfeed>http://www.happinesz.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/sofish/~1329654/403827393/1334283</fs:itemid></item><item><title>打败 IE 的葵花宝典：CSS Bug Table</title><link>http://www.happinesz.cn/archives/1400/</link><content:encoded>&lt;p&gt;原文发表于：Alipay UED Blog &amp;#8211; &lt;a href=&quot;http://ued.alipay.com/2010/07/ie-beat-the-holy-canon-css-bug-table/&quot;&gt;打败 IE 的葵花宝典：CSS Bug Table&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;作为一名前端，我们通常要做的就是让页面在各系统A-Grade浏览器，甚至网站浏览份额0.1%以上的浏览器上良好显示。当然，还有性能问题。不过，今天要说的是样式的兼容问题。在IE/Mozilla/Webkit/Opera四分天下的今天，IE6-9/Mozilla（Gecko）系列/Chrome/Safari/Opera etc. 这些浏览器的兼容，无不让前端们头痛。而在这之中，最让人头痛的当数IE，特别是IE6。搞定了IE6，基本也就能称霸半个江山了。搞定了IE，也相当于占领了7、80%的领地。你想做一个统治页面兼容的主么？反正我是想的。&lt;/p&gt;
&lt;p&gt;&lt;img width=&quot;500&quot; height=&quot;163&quot; src=&quot;http://ued.alipay.com/wp-content/uploads/2010/07/ie_bug_table.jpg&quot; alt=&quot;&quot; title=&quot;ie_bug_table&quot; class=&quot;alignnone size-full wp-image-1671&quot; /&gt;&lt;/p&gt;
&lt;p&gt;今天，趁着想完善公司的内部样式框架，把&lt;a rel=&quot;nofollow&quot; href=&quot;http://HasLayout.net&quot;&gt;HasLayout.net&lt;/a&gt;的IE CSS Bug过了一遍。整理中收获了不少东西，一些官方的不足，也根据自己的知识升级了一下。当然，也顺利地升级了框架的一些内容，感觉甚爽。随后，便将一些值得去看的Bug整理成一个列表，基于Alipay前端伟大的分享精神，分享出来以供团队工友们和大家参考。&lt;/p&gt;
&lt;p&gt;同时，由于整理仓促，有些理解和表达不当，以及其他纰漏在所难免，还请大家帮忙更正。谢谢。&lt;/p&gt;
&lt;table width=&quot;520&quot;&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th width=&quot;30&quot;&gt;&amp;nbsp;&lt;/th&gt;
&lt;th width=&quot;120&quot;&gt;问题&lt;/th&gt;
&lt;th width=&quot;60&quot;&gt;浏览器&lt;/th&gt;
&lt;th width=&quot;90&quot;&gt;DEMO&lt;/th&gt;
&lt;th width=&quot;120&quot;&gt;解决方法&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan=&quot;5&quot;&gt;&lt;strong&gt;Hacking Rules: &lt;/strong&gt;&lt;br /&gt;
            &lt;span style=&quot;font: italic 12px georgia;&quot;&gt;property:all-ie\9; property:gte-ie8\0;*property:lte-ie7; +property:ie7; _property:ie6;&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;input[button | submit] 不能用 margin:0 auto; 居中&lt;/td&gt;
&lt;td&gt;IE8&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/No-Auto-Margin-Center-on-Buttons-Inconsistency-Demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/No-Auto-Margin-Center-on-Buttons-Inconsistency-Fixed-Demo-CS.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;为input添加width&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;body{overflow:hidden;}没有去掉滚动条&lt;/td&gt;
&lt;td&gt;IE6/7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/Document-Scrollbars-Overflow-Inconsistency-Demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/Document-Scrollbars-Overflow-Inconsistency-Fixed-Demo.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;设置html{overflow:hidden;}&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;hasLayout的标签拥有高度&lt;/td&gt;
&lt;td&gt;IE6/7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/Empty-Element-Height-Bug-Demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/Empty-Element-Height-Bug-Fixed-Demo.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;*height:0;&lt;br /&gt;
            _overflow:hidden;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;form&amp;gt;[hasLayout]元素有margin-left时，子元素中的[input | textarea] 出现2&amp;times;margin-left&lt;/td&gt;
&lt;td&gt;IE6/7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/Form-Control-Double-Margin-Bug-Demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/Form-Control-Double-Margin-Bug-Fixed-Demo.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;form &amp;gt; [hasLayout 元素]{margin-left:宽度;}&lt;br /&gt;
            form div{*margin-left:宽度&amp;divide;2;}&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;当border-width有1条&amp;lt;边3条时被设置成dotted时，1px的边dotted显示成dashed&lt;/td&gt;
&lt;td&gt;IE7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/IE7-1px-Dotted-Border-Appears-As-Dashed-Bug-Demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/IE7-1px-Dotted-Border-Appears-As-Dashed-Bug-Fixed-Demo.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;不在同一个元素上使用不同宽度的 dotted&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;当子元素有position:relative的时候，父元素设置overflow:[hidden|auto]相当于给子元素设置了position:visible;&lt;/td&gt;
&lt;td&gt;IE6/7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/relative-overflow-failure-bug-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/relative-overflow-failure-bug-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;给父元素设置position:relative;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;:hover伪类不能改变有position:absolute的子级元素的left/top值&lt;/td&gt;
&lt;td&gt;IE7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/ie7-broken-hover-absolute-bug-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/ie7-broken-hover-absolute-bug-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;把top/left的值设置成除0%外的所有百分值；或添加一个margin-[所有方向]除0外的所有值，包括0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;:focus + selector {} 选择器失效&lt;/td&gt;
&lt;td&gt;IE8&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/ignored-focus-bug-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/ignored-focus-bug-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;在失效选择器后面添加一个空选择器, :focus{}&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;列表中混乱的浮动：在list中浮动图片时，图片出现溢出正常位置；或没有list-style&lt;/td&gt;
&lt;td&gt;IE8&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/image-float-bullet-chaos-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/image-float-bullet-chaos-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;用背景图片替换list-style&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;th 不会自动继承上级元素的 text-align&lt;/td&gt;
&lt;td&gt;IE8&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/non-inherited-th-text-align-bug-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/non-inherited-th-text-align-bug-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;给th添加text-align:inherit; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;样式(包括link/style/@import(link)) 最多允许个为是：32&lt;/td&gt;
&lt;td&gt;IE6-8&lt;/td&gt;
&lt;td&gt;─ 常识&lt;/td&gt;
&lt;td&gt;99.99%的情况下，不会遇到&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;:hover 时若background-color为#fff, 失效&lt;/td&gt;
&lt;td&gt;IE7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/hover-white-background-ignore-bug.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/hover-white-background-ignore-bug-fixed-demo.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;把background-color改成background。或者，非#fff || #ffffff&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;忽略&amp;#8217;&amp;gt;&amp;#8217;后有注释的选择器：selector&amp;gt; /**/ selector{}&lt;/td&gt;
&lt;td&gt;IE6&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/ie7-child-selector-comment-bug-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/ie7-child-selector-comment-bug-demo.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;官方DEMO有误&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;* html&lt;/td&gt;
&lt;td&gt;IE6&lt;/td&gt;
&lt;td&gt;─ HACK&lt;/td&gt;
&lt;td&gt;只对IE6有效&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;PNG图片中的颜色和背景颜色的值相同，但显示不同&lt;/td&gt;
&lt;td&gt;IE6-7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/png-color-mismatch-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/png-color-mismatch-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;利用 &lt;a href=&quot;http://pmt.sourceforge.net/pngcrush/&quot;&gt;pngcrush&lt;/a&gt; 去除图片中的 Gamma profiles&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;margin:0 auto; 不能让block元素水平居中&lt;/td&gt;
&lt;td&gt;IE6-8&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/no-auto-margin-center-pseudo-bug-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/no-auto-margin-center-pseudo-bug-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;给block元素添加一个width&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;使用伪类 :first-line | :first-letter, 属性的值中出现!important 会使属性失效&lt;/td&gt;
&lt;td&gt;IE8&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/ie8-first-line-important-bug.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/ie8-first-line-important-bug-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;!important is evil, don&amp;#8217;t use it anymore&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;18&lt;/td&gt;
&lt;td&gt;:first-letter 失效&lt;/td&gt;
&lt;td&gt;IE6&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/ie6-first-letter-ignore-bug.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/ie6-first-letter-ignore-bug-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;把 :first-letter 移到离{}最近的地方，如 h1, p:first-letter{}，而非 p:first-letter h1{}&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;td&gt;Position:absolute元素中，a display:block, 在非:hover时只有文本可点击&lt;/td&gt;
&lt;td&gt;IE6/7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/partial-click-v2-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/partial-click-v2-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;给a添加background, 如果背景透明，使用background:url(&amp;#8216;任何页面中已经缓存的文件链接&amp;#8217;)，不推荐background：url(#)[&lt;a href=&quot;http://haslayout.net/css/Partial-Click-Bug-v2&quot;&gt;官方的解决方法&lt;/a&gt;]，因为会增加一下HTTP请求&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;float列表元素不水平对齐：li不设置float，a设置display:block;float:[方向]，li不水平对齐&lt;/td&gt;
&lt;td&gt;IE6/7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/staircase-bug-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/staircase-bug-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;给li设置display:inline 或 float:[方向]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;21&lt;/td&gt;
&lt;td&gt;dt, dd, li 背景失效&lt;/td&gt;
&lt;td&gt;IE6&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/disappearing-list-background-bug-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/disappearing-list-background-bug-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;dt, dd, li{position:relative;} &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;&amp;lt;noscript /&amp;gt;元素的样式在启用javascript的情况下显示了样式&lt;/td&gt;
&lt;td&gt;IE6-8&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/noscript-ghost-bug-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/noscript-ghost-bug-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;利用js给&amp;lt;noscript /&amp;gt;添加display:none;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;23&lt;/td&gt;
&lt;td&gt;使用filter处理的透明背景图片的透明部分不可点&lt;/td&gt;
&lt;td&gt;IE6-8&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/no-transparency-click-bug-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/no-transparency-click-bug-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;把background:none变成background:url(&amp;#8216;链接&amp;#8217;)，链接到本身和图片之外的任何文件&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;td&gt;li内元素偏离 baseline 向下拉&lt;/td&gt;
&lt;td&gt;IE8&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/list-drop-shift-bug-demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/list-drop-shift-bug-demo-fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;给li设置display:inline 或 float:[方向]&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;列表中li的list-style不显示&lt;/td&gt;
&lt;td&gt;IE6/7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/no_li_ol_bullets_demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/no_li_ol_bullets_demo_fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;给li添加margin-left，留空间来显示（不要加在ul上）&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;26&lt;/td&gt;
&lt;td&gt;图片不能垂直居中&lt;/td&gt;
&lt;td&gt;IE6/7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/css/No-line-height-Vertical-Center-on-Images-Bug&quot;&gt;bug/fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;添加一个空标签，并赋给&amp;quot;Layout&amp;quot;, 比如display:inline-block;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;td&gt;不能自定义指针样式&lt;/td&gt;
&lt;td&gt;IE6-8&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/cursor/a/demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/cursor/a/demo_fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;给指针文件设置绝对路径&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;28&lt;/td&gt;
&lt;td&gt;背景溢出，拖动滚动条后显示正常&lt;/td&gt;
&lt;td&gt;IE6&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/demos/backgroundleak_demo.html&quot;&gt;bug&lt;/a&gt; | &lt;a href=&quot;http://haslayout.net/demos/backgroundleak_demo_ls_fixed.html&quot;&gt;fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;给父元素添加overflow:hidden防止溢出，并赋予hasLayout,如果添加_zoom:1;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;29&lt;/td&gt;
&lt;td&gt;高度超过height定义的高&lt;/td&gt;
&lt;td&gt;IE6&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/css/Expanding-Height-Bug&quot;&gt;bug/fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;添加_overflow:hidden;(推荐)或者_font-size:0;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;宽度超过width定义的宽&lt;/td&gt;
&lt;td&gt;IE6&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/css/Expanding-Width-Bug&quot;&gt;bug/fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;添加_overflow:hidden; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;31&lt;/td&gt;
&lt;td&gt;双倍边距&lt;/td&gt;
&lt;td&gt;IE6&lt;/td&gt;
&lt;td&gt;─ 常识&lt;/td&gt;
&lt;td&gt;添加display:inline到float元素中&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;32&lt;/td&gt;
&lt;td&gt;margin负值隐藏：hasLayout的父元素内的非hasLayout元素，使用负边距时，超出父元素部分不可见&lt;/td&gt;
&lt;td&gt;IE6/7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/css/Negative-Margin-Bug&quot;&gt;bug/fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;去掉父元素的hasLayout；或者赋hasLayout给子元素,并添加position:relative;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;33&lt;/td&gt;
&lt;td&gt;给两个浮动元素的某中一个的文字设定为斜体，另一个元素下拉在有斜体文字元素的下面&lt;/td&gt;
&lt;td&gt;IE6&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/css/Italics-Float-Bug&quot;&gt;bug/fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;给有斜体文字的元素添加overflow:hidden;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;35&lt;/td&gt;
&lt;td&gt;3px 间隔：在float元素后的元素，会有3px间隔&lt;/td&gt;
&lt;td&gt;IE6&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/css/3px-Gap-Bug-aka-Text-Jog-Bug&quot;&gt;bug/fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;因为是确切的3px，所以，用&amp;ldquo;暴力破解&amp;rdquo;吧，比如_margin-left:-3px;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;35&lt;/td&gt;
&lt;td&gt;text-align 影响块级元素&lt;/td&gt;
&lt;td&gt;IE6/7&lt;/td&gt;
&lt;td&gt;&lt;a href=&quot;http://haslayout.net/css/Text-Align-Bug&quot;&gt;bug/fixed&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;整理你的float；或者分开设置text-align&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;hr&gt;&amp;copy;2010 &lt;a href=&quot;http://www.happinesz.cn&quot;&gt;幸福收藏夹&lt;/a&gt;. 版权所有,转载务必注明.&lt;a href=&quot;http://www.happinesz.cn/archives/1292/&quot;&gt;&lt;strong style=&quot;color:#f30;&quot;&gt;招聘: &lt;/strong&gt;支付宝前端开发，此地钱多，人少，速来&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/403827394/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1400/&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/sofish/403827394/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/sofish/403827394/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=4ed1c42d414c36137de70b7b73bc7175&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=4ed1c42d414c36137de70b7b73bc7175&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=125e358f36a2020b0d5a8f92b9aef8f6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=125e358f36a2020b0d5a8f92b9aef8f6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=c10f725d8730dc6545ff41b2d59f4e17&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=c10f725d8730dc6545ff41b2d59f4e17&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=f5d10a35f61674e50a2a14b0565ea033&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=f5d10a35f61674e50a2a14b0565ea033&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=e244d8b93026b294e2423a0d6e1eb940&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=e244d8b93026b294e2423a0d6e1eb940&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://www.happinesz.cn/archives/1400/feed/</wfw:commentRss><slash:comments>26</slash:comments><description>原文发表于：Alipay UED Blog &amp;#8211; 打败 IE 的葵花宝典：CSS Bug Table 作为一名前端，我们通常要做的就是让页面在各系统A-Grade浏览器，甚至网站浏览份额0.1%以上的浏览器上良好显示。当然，还有性能问题。不过，今天要说的是样式的兼容问题。在IE/Mozilla/Webkit/Opera四分天下的今天，IE6-9/Mozilla（Gecko）系列/Chrome/Safari/Opera etc. 这些浏览器的兼容，无不让前端们头痛。而在这之中，最让人头痛的当数IE，特别是IE6。搞定了IE6，基本也就能称霸半个江山了。搞定了IE，也相当于占领了7、80%的领地。你想做一个统治页面兼容的主么？反正我是想的。 今天，趁着想完善公司的内部样式框架，把HasLayout.net的IE CSS Bug过了一遍。整理中收获了不少东西，一些官方的不足，也根据自己的知识升级了一下。当然，也顺利地升级了框架的一些内容，感觉甚爽。随后，便将一些值得去看的Bug整理成一个列表，基于Alipay前端伟大的分享精神，分享出来以供团队工友们和大家参考。 同时，由于整理仓促，有些理解和表达不当，以及其他纰漏在所难免，还请大家帮忙更正。谢谢。 &amp;#160; 问题 浏览器 DEMO 解决方法 Hacking Rules: property:all-ie\9; property:gte-ie8\0;*property:lte-ie7; +property:ie7; _property:ie6; 1 input[button &amp;#124; submit] 不能用 margin:0 auto; 居中 IE8 bug &amp;#124; fixed 为input添加width 2 body{overflow:hidden;}没有去掉滚动条 IE6/7 bug &amp;#124; fixed 设置html{overflow:hidden;} 3 hasLayout的标签拥有高度 IE6/7 bug &amp;#124; fixed *height:0; _overflow:hidden; [...]&lt;img src=&quot;http://www1.feedsky.com/t1/403827394/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1400/&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/sofish/403827394/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/sofish/403827394/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=4ed1c42d414c36137de70b7b73bc7175&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=4ed1c42d414c36137de70b7b73bc7175&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=125e358f36a2020b0d5a8f92b9aef8f6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=125e358f36a2020b0d5a8f92b9aef8f6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=c10f725d8730dc6545ff41b2d59f4e17&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=c10f725d8730dc6545ff41b2d59f4e17&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=f5d10a35f61674e50a2a14b0565ea033&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=f5d10a35f61674e50a2a14b0565ea033&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=e244d8b93026b294e2423a0d6e1eb940&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=e244d8b93026b294e2423a0d6e1eb940&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</description><category>Featured</category><category>IE</category><category>css</category><category>资源共享</category><category>haslayout</category><pubDate>Wed, 28 Jul 2010 21:00:35 +0800</pubDate><author>sofish</author><comments>http://www.happinesz.cn/archives/1400/#comments</comments><guid isPermaLink="false">http://www.happinesz.cn/?p=1400</guid><dc:creator>sofish</dc:creator><fs:srclink>http://www.happinesz.cn/archives/1400/</fs:srclink><fs:srcfeed>http://www.happinesz.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/sofish/~1329654/403827394/1334283</fs:itemid></item><item><title>Javascript 的 this 关键字</title><link>http://www.happinesz.cn/archives/1395/</link><content:encoded>&lt;p&gt;Javasrcipt的 this 是个神奇的东东，其指向很难把握。不过，有一个原则，可是说是理解 this 的关键，那就是，&lt;u&gt;它指的是调用函数的那个对象&lt;/u&gt;。看看这个例子：&lt;/p&gt;
&lt;pre class=&quot;code_bg&quot;&gt;
function fn(){
    alert(this.ref)
};

var obj = {};

// 定义 ref
obj.ref = &amp;quot;hello world&amp;quot;;

obj.fn2 = fn;
obj.fn2();
&lt;/pre&gt;
&lt;p&gt;fn() 中的 this，指向的是 obj 这个对象，因此，ref 的值是 &amp;quot;hello world&amp;quot; 。&lt;/p&gt;
&lt;p&gt;REF: &lt;a href=&quot;http://www.quirksmode.org/js/this.html&quot;&gt;The this keyword&lt;/a&gt; | &lt;a href=&quot;http://www.ruanyifeng.com/blog/2010/04/using_this_keyword_in_javascript.html&quot;&gt;Javascript 的 this 用法&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;hr&gt;&amp;copy;2010 &lt;a href=&quot;http://www.happinesz.cn&quot;&gt;幸福收藏夹&lt;/a&gt;. 版权所有,转载务必注明.&lt;a href=&quot;http://www.happinesz.cn/archives/1292/&quot;&gt;&lt;strong style=&quot;color:#f30;&quot;&gt;招聘: &lt;/strong&gt;支付宝前端开发，此地钱多，人少，速来&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/403827395/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1395/&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/sofish/403827395/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/sofish/403827395/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=eb60b08f93a131c63c144fa28a12f08b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=eb60b08f93a131c63c144fa28a12f08b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=b0d05137f240c15a62cded9b4e7ecf80&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=b0d05137f240c15a62cded9b4e7ecf80&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=9dc9898575a6e7eb42d66f11313ee7c7&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=9dc9898575a6e7eb42d66f11313ee7c7&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=59668fe83f0c73f906dd5c5da183d981&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=59668fe83f0c73f906dd5c5da183d981&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=90a259c76760c9771325d28a79dbade8&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=90a259c76760c9771325d28a79dbade8&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://www.happinesz.cn/archives/1395/feed/</wfw:commentRss><slash:comments>11</slash:comments><description>Javasrcipt的 this 是个神奇的东东，其指向很难把握。不过，有一个原则，可是说是理解 this 的关键，那就是，它指的是调用函数的那个对象。看看这个例子： function fn(){ alert(this.ref) }; var obj = {}; // 定义 ref obj.ref = &amp;#34;hello world&amp;#34;; obj.fn2 = fn; obj.fn2(); fn() 中的 this，指向的是 obj 这个对象，因此，ref 的值是 &amp;#34;hello world&amp;#34; 。 REF: The this keyword &amp;#124; Javascript 的 this 用法 &amp;#160; &amp;#169;2010 幸福收藏夹. 版权所有,转载务必注明.招聘: 支付宝前端开发，此地钱多，人少，速来&lt;img src=&quot;http://www1.feedsky.com/t1/403827395/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1395/&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/sofish/403827395/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/sofish/403827395/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=eb60b08f93a131c63c144fa28a12f08b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=eb60b08f93a131c63c144fa28a12f08b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=b0d05137f240c15a62cded9b4e7ecf80&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=b0d05137f240c15a62cded9b4e7ecf80&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=9dc9898575a6e7eb42d66f11313ee7c7&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=9dc9898575a6e7eb42d66f11313ee7c7&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=59668fe83f0c73f906dd5c5da183d981&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=59668fe83f0c73f906dd5c5da183d981&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=90a259c76760c9771325d28a79dbade8&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=90a259c76760c9771325d28a79dbade8&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</description><category>this</category><category>JavaScript</category><pubDate>Sat, 24 Jul 2010 13:41:41 +0800</pubDate><author>sofish</author><comments>http://www.happinesz.cn/archives/1395/#comments</comments><guid isPermaLink="false">http://www.happinesz.cn/?p=1395</guid><dc:creator>sofish</dc:creator><fs:srclink>http://www.happinesz.cn/archives/1395/</fs:srclink><fs:srcfeed>http://www.happinesz.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/sofish/~1329654/403827395/1334283</fs:itemid></item><item><title>解读 HTML5：建议、技巧和技术</title><link>http://www.happinesz.cn/archives/1389/</link><content:encoded>&lt;p&gt;想总结一下HTML5 的支持列表，写了许久，无果。在众多文章中，这篇文章涉及到了我想到的，以及没想到的。遂做粗略的翻译，因个人英文水平一般，本文FYI。原文请看：&lt;a href=&quot;http://www.w3avenue.com/2010/05/07/html5-unleashed-tips-tricks-and-techniques/&quot;&gt;HTML5 Unleashed: Tips, Tricks and Techniques&lt;/a&gt;。&lt;/p&gt;
&lt;p&gt;=====&lt;/p&gt;
&lt;p&gt;现今我们能用 HTML5 吗，能用它做些什么呢，是否真的是 Flash 杀手？想必你也注意到了这些日渐增长且常被问起的类似问题，被讨论着，甚至被回答过。在我看来，你必须自己回答这些基本的问题。&lt;/p&gt;
&lt;p&gt;&lt;img width=&quot;500&quot; height=&quot;250&quot; src=&quot;http://www.happinesz.cn/wp-content/uploads/2010/07/zrclip_001n3369e666.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;这篇文章的本意是想帮你通过一些基本指南的学习，以轻松学习代码模板。一旦你熟悉了这些基本，并想更进一学习，你还将会找到更多提供了建议、技巧和技术的有用资源。&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;http://www.w3schools.com/html5/html5_reference.asp&quot;&gt;HTML 5 特性&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/&quot;&gt;官方详细的文档&lt;/a&gt;是寻找 HTML5 特性的最好地方，当然你还可以轻松通过 W3Schools 来学习&lt;a href=&quot;http://www.w3schools.com/html5/html5_reference.asp&quot;&gt;HTML5 标签&lt;/a&gt;。我们将会在文章中涉及到以下的特性：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;语义化标记&lt;/li&gt;
&lt;li&gt;Form 表单增强功能&lt;/li&gt;
&lt;li&gt;视频 / 音频&lt;/li&gt;
&lt;li&gt;画布（Canvas）&lt;/li&gt;
&lt;li&gt;可编辑内容&lt;/li&gt;
&lt;li&gt;拖放&lt;/li&gt;
&lt;li&gt;稳健的数据存储&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;检测浏览器支持&lt;/h3&gt;
&lt;p&gt;在你开始尝试 HTML5之前，需要知道各主流浏览器的支持状况。这些有用的资源，将可以帮助你向着正轨走：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://caniuse.com/&quot;&gt;何时能用&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.findmebyip.com/litmus&quot;&gt;网页设计师的浏览器支持列表&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://html5test.com/&quot;&gt;HTML5 测试&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Comparison_of_layout_engines_(HTML_5)&quot;&gt;布局引擎对比&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;你还可以运行 Javascript（&lt;a href=&quot;http://diveintohtml5.org/everything.html&quot;&gt;用Javascript 检测浏览器特性&lt;/a&gt;）来检测 HTML5 特性的支持。你还应该用用&lt;a href=&quot;http://www.modernizr.com/&quot; target=&quot;_blank&quot;&gt;Modernizr&lt;/a&gt;： 一个非常不错的检测 HTML5/CSS3 本地支持的 Javascript 库。如果你选择用 Mootools可以使用&lt;a href=&quot;http://www.aryweb.nl/projects/mooModernizr/&quot; target=&quot;_blank&quot;&gt;MooModernizr&lt;/a&gt; (MooTools port of Modernizr)。&lt;/p&gt;
&lt;p&gt;你可能也会想留意不断变化的&amp;quot;&lt;a href=&quot;http://marketshare.hitslink.com/browser-market-share.aspx?qprid=2&quot;&gt;浏览器市场份额分享&lt;/a&gt;&amp;quot; &amp;#8212;    这些信息对于你决定用何种解决或折衷的方法将会是非常必要的。&lt;/p&gt;
&lt;h3&gt;值得注意的变更点&lt;/h3&gt;
&lt;p&gt;除了新的特征，你还应该记下这些重要的变更点：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;简洁的 DOCTYPE&lt;/strong&gt; HTML5 只需一个简洁的文档类型：&amp;lt;!DOCTYPE html&amp;gt;。它有意不使用版本，因此文档将会适用所有版本的HTML。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;简单易记的语言标签&lt;/strong&gt; 你并不需要在 &amp;lt;html&amp;gt; 中使用 xmlns 或 xml:lang 标记。 &amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt; 将对 HTML5 有效。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;简单易记的编码类型&lt;/strong&gt; 你现在可以在 meta 标签中使用 &amp;quot;charset&amp;quot;：&amp;lt;meta charset=&amp;quot;utf-8&amp;Prime; /&amp;gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;不需要闭合标签&lt;/strong&gt; 在 HTML5 中，空标签（如：br、img 和 input ）并不需要闭合标签。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;废弃的标签&lt;/strong&gt; 下面这些标签并不被 HTML5 支持：       &amp;lt;acronym&amp;gt;、&amp;lt;applet&amp;gt;、&amp;lt;basefont&amp;gt;、&amp;lt;big&amp;gt;、&amp;lt;center&amp;gt;、&amp;lt;dir&amp;gt;、&amp;lt;font&amp;gt;、&amp;lt;frame&amp;gt;、&amp;lt;frameset&amp;gt;、&amp;lt;noframes&amp;gt;、&amp;lt;s&amp;gt;、&amp;lt;strike&amp;gt;、&amp;lt;tt&amp;gt;、&amp;lt;u&amp;gt;       和 &amp;lt;xmp&amp;gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;简单代码示例:&lt;/strong&gt;&lt;/p&gt;
&lt;pre xml:space=&quot;preserve&quot; class=&quot;code_bg&quot;&gt;
&amp;lt;!doctype html&amp;gt;
&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset=&amp;quot;utf-8&amp;quot; /&amp;gt;
    &amp;lt;title&amp;gt;HTML5 Document&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;p&gt;你可以使用&lt;a href=&quot;http://validator.whatwg.org/&quot; target=&quot;_blank&quot;&gt;HTML5 Validator&lt;/a&gt; 或 &lt;a href=&quot;http://validator.w3.org/&quot; target=&quot;_blank&quot;&gt;W3C    Markup Validation Service&lt;/a&gt; 来测试你的 HTML5 文档。&lt;/p&gt;
&lt;h3&gt;语义化标记&lt;/h3&gt;
&lt;p&gt;HTML5 新增的一些新标签除了不仅仅是更具语义的 &amp;lt;div&amp;gt; 标签的替代品，并不提供额外的功能。这些都是新增的标签：&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-article-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;article&amp;gt;&lt;/a&gt;、&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-section-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;section&amp;gt;&lt;/a&gt;、&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-aside-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;aside&amp;gt;&lt;/a&gt;、&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-hgroup-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;hgroup&amp;gt;&lt;/a&gt;、&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-header-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;header&amp;gt;&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-footer-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;footer&amp;gt;&lt;/a&gt;、&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#the-nav-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;nav&amp;gt;&lt;/a&gt;、&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-time-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;time&amp;gt;&lt;/a&gt;、&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-mark-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;mark&amp;gt;&lt;/a&gt;、&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-figure-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;figure&amp;gt;&lt;/a&gt; 和 &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/grouping-content.html#the-figcaption-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;figcaption&amp;gt;&lt;/a&gt;。&lt;/p&gt;
&lt;p&gt;这些标签被除了IE 外的所有现代浏览器（Firefox 3+、Safari 3.1+、Chrome 2+、and Opera 9.6+）支持。Javascript 提供了document.createElement(tagName) 的方法，让你可以用来创建新的    HTML5 标签。代替自己创建这些元素，你还可以用&lt;a href=&quot;http://remysharp.com/2009/01/07/html5-enabling-script/&quot; target=&quot;_blank&quot;&gt;HTML5 Enabling Script&lt;/a&gt; 或    &lt;a href=&quot;http://www.iecss.com/print-protector/&quot; target=&quot;_blank&quot;&gt;IE Print Protector&lt;/a&gt; &amp;#8212; 这些脚本将帮助 IE 正常处理 HTML5 元素的渲染。&lt;/p&gt;
&lt;p&gt;你可能会想到添加 CSS Reset 到这些新元素上。这里是一些可以用在你以 HTML5 为基础的项目的CSS Reset：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/html5resetcss/&quot; target=&quot;_blank&quot;&gt;HTML5 Reset CSS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/reset5/&quot; target=&quot;_blank&quot;&gt;Reset5&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;简单代码示例:&lt;/strong&gt; 兼容 IE 的 HTML5 页面布局&lt;/p&gt;
&lt;pre xml:space=&quot;preserve&quot; class=&quot;code_bg&quot;&gt;
&amp;lt;!doctype html&amp;gt;
&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset=&amp;quot;utf-8&amp;quot; /&amp;gt;
    &amp;lt;title&amp;gt;HTML5 Semantic Markup Demo: Cross Browser&amp;lt;/title&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;html5reset.css&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;html5semanticmarkup.css&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;
    &amp;lt;!--[if lt IE 9]&amp;gt;
        &amp;lt;script src=&amp;quot;html5.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;![endif]--&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;header&amp;gt;
        &amp;lt;hgroup&amp;gt;
            &amp;lt;h1&amp;gt;Page Header&amp;lt;/h1&amp;gt;
            &amp;lt;h2&amp;gt;Page Sub Heading&amp;lt;/h2&amp;gt;
        &amp;lt;/hgroup&amp;gt;
    &amp;lt;/header&amp;gt;
    &amp;lt;nav&amp;gt;
        &amp;lt;ul&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Home&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Projects&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Portfolio&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Profile&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
            &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Contact&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;/ul&amp;gt;
    &amp;lt;/nav&amp;gt;
    &amp;lt;article&amp;gt;
        &amp;lt;header&amp;gt;
            &amp;lt;h1&amp;gt;Article Heading&amp;lt;/h1&amp;gt;
            &amp;lt;time datetime=&amp;quot;2010-05-05&amp;quot; pubdate&amp;gt;May 5th, 2010&amp;lt;/time&amp;gt;
        &amp;lt;/header&amp;gt;
        &amp;lt;p&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&amp;lt;/p&amp;gt;
        &amp;lt;section&amp;gt;
            &amp;lt;header&amp;gt;
                &amp;lt;h1&amp;gt;Section Heading&amp;lt;/h1&amp;gt;
            &amp;lt;/header&amp;gt;
            &amp;lt;p&amp;gt;Ut sapien enim, porttitor id feugiat non, ultrices non odio.&amp;lt;/p&amp;gt;
            &amp;lt;footer&amp;gt;
                &amp;lt;p&amp;gt;Section Footer: Pellentesque volutpat, leo nec auctor euismod&amp;lt;/p&amp;gt;
            &amp;lt;/footer&amp;gt;
        &amp;lt;/section&amp;gt;
        &amp;lt;section&amp;gt;
            &amp;lt;header&amp;gt;
                &amp;lt;h1&amp;gt;Section Heading&amp;lt;/h1&amp;gt;
            &amp;lt;/header&amp;gt;
            &amp;lt;p&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&amp;lt;/p&amp;gt;
            &amp;lt;figure&amp;gt;
                &amp;lt;img src=&amp;quot;item-1.png&amp;quot; alt=&amp;quot;Club&amp;quot;&amp;gt;
                &amp;lt;img src=&amp;quot;item-2.png&amp;quot; alt=&amp;quot;Heart&amp;quot;&amp;gt;
                &amp;lt;img src=&amp;quot;item-3.png&amp;quot; alt=&amp;quot;Spade&amp;quot;&amp;gt;
                &amp;lt;img src=&amp;quot;item-4.png&amp;quot; alt=&amp;quot;Diamond&amp;quot;&amp;gt;
                &amp;lt;figcaption&amp;gt;FigCaption: Club, Heart, Spade and Diamond&amp;lt;/figcaption&amp;gt;
            &amp;lt;/figure&amp;gt;
            &amp;lt;p&amp;gt;Ut sapien enim, porttitor id feugiat non, ultrices non odio&amp;lt;/p&amp;gt;
            &amp;lt;footer&amp;gt;
                &amp;lt;p&amp;gt;Section Footer: Pellentesque volutpat, leo nec auctor euismod est.&amp;lt;/p&amp;gt;
            &amp;lt;/footer&amp;gt;
        &amp;lt;/section&amp;gt;
        &amp;lt;footer&amp;gt;
            Article Footer
        &amp;lt;/footer&amp;gt;
    &amp;lt;/article&amp;gt;
    &amp;lt;aside&amp;gt;
        &amp;lt;header&amp;gt;
            &amp;lt;h1&amp;gt;Siderbar Heading&amp;lt;/h1&amp;gt;
        &amp;lt;/header&amp;gt;
        &amp;lt;p&amp;gt;Ut sapien enim, porttitor id feugiat non, ultrices non odio.&amp;lt;/p&amp;gt;
    &amp;lt;/aside&amp;gt;
    &amp;lt;footer&amp;gt;
        Page Footer
    &amp;lt;/footer&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;注意：&lt;/strong&gt;没有一个 div 标签，id 或 class 属性被使用到 &amp;#8212; 简洁、小巧和更语义化的标记 (&lt;a href=&quot;http://demos.w3avenue.com/html5-unleashed-tips-tricks-and-techniques/sample-02-semantic-markup-cross-browser.html&quot; target=&quot;_blank&quot;&gt;View    Demo&lt;/a&gt;)。你仍可以用 &lt;a href=&quot;http://validator.whatwg.org/&quot; target=&quot;_blank&quot;&gt;HTML5 Validator&lt;/a&gt; 或 &lt;a href=&quot;http://validator.w3.org/&quot; target=&quot;_blank&quot;&gt;W3C Markup Validation Service&lt;/a&gt; 来检测你的 HTML5 文档。&lt;/p&gt;
&lt;p&gt;&lt;img width=&quot;500&quot; height=&quot;746&quot; src=&quot;http://www.happinesz.cn/wp-content/uploads/2010/07/zrclip_002n2a122c02.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;注意：&lt;/strong&gt;这个示例在 IE6 下并未正常显示。这只是因为我使用 CSS child combinators 来避免使用额外的 class。你可以在 IE6 下用自己的 CSS ，像其他浏览器一样处理 HTML5 标记。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;其他资源&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.brucelawson.co.uk/2010/html5-articles-and-sections-whats-the-difference/&quot; target=&quot;_blank&quot;&gt;HTML5 的       &amp;quot;articles&amp;quot; 和 &amp;quot;sections&amp;quot;: 有什么区别?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://orderedlist.com/our-writing/resources/html-css/structural-tags-in-html5/&quot; target=&quot;_blank&quot;&gt;HTML5 中的结构标签&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://html5doctor.com/the-figure-figcaption-elements/&quot; target=&quot;_blank&quot;&gt;Figure 和 caption 元素&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.zeldman.com/2009/07/13/html-5-nav-ambiguity-resolved/&quot; target=&quot;_blank&quot;&gt;解读 HTML5: &amp;lt;nav&amp;gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.whatwg.org/is-not-just-a-semantic&quot; target=&quot;_blank&quot;&gt;&amp;lt;section&amp;gt; 并不仅仅是 &amp;quot;语义化的 &amp;lt;div&amp;gt;&amp;quot;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://mathiasbynens.be/notes/html5-details-jquery&quot; target=&quot;_blank&quot;&gt;用 jQuery 提供 HTML5 &amp;lt;details&amp;gt; 的完美折衷方法&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.whatwg.org/styling-ie-noscript&quot; target=&quot;_blank&quot;&gt;不用脚本实现 IE 对 HTML5 样式控制&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;表单增强&lt;/h3&gt;
&lt;p&gt;HTML5 为表单提供了几个新的属性、input 类型和标签。到目前为止，只有 Opera 对HTML5 有比较好的支持。你因此应该下载 Opera 来查看大部分新特性如何工作。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;新的INPUT类型       &lt;br /&gt;
    &lt;/strong&gt; &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#color-state&quot; target=&quot;_blank&quot;&gt;color&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#e-mail-state&quot; target=&quot;_blank&quot;&gt;email&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#date-state&quot; target=&quot;_blank&quot;&gt;date&lt;/a&gt;,       &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#month-state&quot; target=&quot;_blank&quot;&gt;month&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#week-state&quot; target=&quot;_blank&quot;&gt;week&lt;/a&gt;,       &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#time-state&quot; target=&quot;_blank&quot;&gt;time&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#date-and-time-state&quot; target=&quot;_blank&quot;&gt;datetime&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#local-date-and-time-state&quot; target=&quot;_blank&quot;&gt;datetime-local&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#number-state&quot; target=&quot;_blank&quot;&gt;number&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#range-state&quot; target=&quot;_blank&quot;&gt;range&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#text-state-and-search-state&quot; target=&quot;_blank&quot;&gt;search&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#telephone-state&quot; target=&quot;_blank&quot;&gt;tel&lt;/a&gt;, 和 &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#url-state&quot; target=&quot;_blank&quot;&gt;url&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;新属性&lt;/strong&gt;       &lt;br /&gt;
    &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-required-attribute&quot; target=&quot;_blank&quot;&gt;required&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#autofocusing-a-form-control&quot; target=&quot;_blank&quot;&gt;autofocus&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#attr-input-pattern&quot; target=&quot;_blank&quot;&gt;pattern&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-list-attribute&quot; target=&quot;_blank&quot;&gt;list&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-autocomplete-attribute&quot; target=&quot;_blank&quot;&gt;autocomplete&lt;/a&gt; 和 &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#the-placeholder-attribute&quot; target=&quot;_blank&quot;&gt;placeholder&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;新元素&lt;/strong&gt;       &lt;br /&gt;
    &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-keygen-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;keygen&amp;gt;&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-datalist-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;datalist&amp;gt;&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-output-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;output&amp;gt;&lt;/a&gt;, &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-meter-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;meter&amp;gt;&lt;/a&gt; 和 &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-progress-element&quot; target=&quot;_blank&quot;&gt;&amp;lt;progress&amp;gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;值得高兴的是尽管支持有限，使用这些特性也是个不错的选择。因为新的 INPUT 类型会漂亮地降级为 TEXT 类 INPUT（译注：INPUT 的默认 type 为 text）。且记住现今你仍可以折衷使用 Javascript    控制表单（这个技巧是指首先检测浏览器自身支持，然后才是使用折衷方法）。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;简单代码示例：&lt;/strong&gt;列出一些今天你可以拿来测试的新特性&lt;/p&gt;
&lt;pre xml:space=&quot;preserve&quot; class=&quot;code_bg&quot;&gt;
&amp;lt;form&amp;gt;
    &amp;lt;fieldset&amp;gt;
        &amp;lt;legend&amp;gt;New Attributes&amp;lt;/legend&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;Required:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;html5requied&amp;quot; required=&amp;quot;true&amp;quot;&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera &amp;amp; Chrome&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;AutoFocus:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;html5autofocus&amp;quot; autofocus=&amp;quot;true&amp;quot;&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera, Chrome &amp;amp; Safari&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;PlaceHolder:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;html5placeholder&amp;quot; placeholder=&amp;quot;This Will Show in WebKit&amp;quot;&amp;gt;
            &amp;lt;small&amp;gt;Works in Chrome &amp;amp; Safari&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;Input Pattern:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;text&amp;quot; pattern=&amp;quot;[0-9][A-Z]{3}&amp;quot; name=&amp;quot;html5pattern&amp;quot; required title=&amp;quot;Enter a digit followed by three uppercase letters&amp;quot;/&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera &amp;amp; Chrome&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;Multiple Files:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;file&amp;quot; name=&amp;quot;html5multiplefileupload&amp;quot; multiple&amp;gt;
            &amp;lt;small&amp;gt;Works in Chrome, Safari &amp;amp; Firefox&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;List:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;html5textwithdatalist&amp;quot; list=&amp;quot;colors&amp;quot;&amp;gt;
            &amp;lt;datalist id=&amp;quot;colors&amp;quot;&amp;gt;
                &amp;lt;option value=&amp;quot;Red&amp;quot;&amp;gt;
                &amp;lt;option value=&amp;quot;Green&amp;quot;&amp;gt;
                &amp;lt;option value=&amp;quot;Blue&amp;quot;&amp;gt;
            &amp;lt;/datalist&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
    &amp;lt;/fieldset&amp;gt;

    &amp;lt;fieldset&amp;gt;
        &amp;lt;legend&amp;gt;New Input Types&amp;lt;/legend&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;Email:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;email&amp;quot; name=&amp;quot;html5email&amp;quot;&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;URL:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;url&amp;quot; name=&amp;quot;html5url&amp;quot;&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;Number:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;number&amp;quot; name=&amp;quot;html5number&amp;quot; min=&amp;quot;1&amp;quot; max=&amp;quot;10&amp;quot; step=&amp;quot;1&amp;quot; value=&amp;quot;1&amp;quot;&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;Range:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;range&amp;quot; name=&amp;quot;html5range&amp;quot; min=&amp;quot;-100&amp;quot; max=&amp;quot;100&amp;quot; value=&amp;quot;0&amp;quot; step=&amp;quot;10&amp;quot;&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera, Chrome &amp;amp; Safari&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;Time:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;time&amp;quot; step=&amp;quot;900&amp;quot; name=&amp;quot;html5time&amp;quot;&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;Date:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;date&amp;quot; name=&amp;quot;html5date&amp;quot;&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;Month:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;month&amp;quot; name=&amp;quot;html5month&amp;quot;&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;Week:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;week&amp;quot; name=&amp;quot;html5week&amp;quot;&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
            &amp;lt;label&amp;gt;DateTime:&amp;lt;/label&amp;gt;
            &amp;lt;input type=&amp;quot;datetime&amp;quot; name=&amp;quot;html5datetime&amp;quot;&amp;gt;
            &amp;lt;small&amp;gt;Works in Opera&amp;lt;/small&amp;gt;
        &amp;lt;/p&amp;gt;
    &amp;lt;/fieldset&amp;gt;

    &amp;lt;div&amp;gt;&amp;lt;button&amp;gt;Submit&amp;lt;/button&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&lt;img width=&quot;500&quot; height=&quot;868&quot; src=&quot;http://www.happinesz.cn/wp-content/uploads/2010/07/zrclip_003p7d348e36.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;在我们的 DEMO 中的出现的特性，都顺利地运行在 Opera 上，但你仍需要使用 Chrome 或 Safari 来看其他小部分功能的实际运行状态（&lt;a href=&quot;http://demos.w3avenue.com/html5-unleashed-tips-tricks-and-techniques/sample-03-form-enhancements.html&quot; target=&quot;_blank&quot;&gt;View Demo&lt;/a&gt;）。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;了解更多:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://diveintohtml5.org/forms.html&quot;&gt;疯狂的表单&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.yourinspirationweb.com/en/the-future-of-the-web-how-well-create-forms-in-html5/&quot;&gt;互联网的未来：如何创建一个 HTML5 表单&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.456bereastreet.com/archive/201004/html5_input_types/&quot; target=&quot;&quot;&gt;HTML5 Input 类型&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://24ways.org/2009/have-a-field-day-with-html5-forms&quot;&gt;忙于 HTML5 表单的一天&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://net.tutsplus.com/tutorials/html-css-techniques/rethinking-forms-in-html5/&quot;&gt;对 HTML5 表单的再次思考&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://snook.ca/archives/html_and_css/html5-forms-are-coming&quot; target=&quot;&quot;&gt;HTML5 表单来吧&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;工具 &amp;amp; 资源列表:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.kamikazemusic.com/quick-tips/jquery-html5-placeholder-fix/&quot;&gt;利用 jQuery 和 Modernizr 实现跨浏览器 HTML5 Placeholder&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flowplayer.org/tools/&quot;&gt;使用 jQuery Tool 实现跨浏览器 Date/Range/Validationns 类型INPUT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/jquery-html5-upload/&quot;&gt;jQuery HTML5 文件上传：异步上传多文件&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/jquery-webforms-2/&quot;&gt;有 jQuery 插件启动 Web Forms 2.0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/webforms2/&quot; target=&quot;_blank&quot;&gt;跨浏览器 Web Forms 2.0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;不需要插件的视频和音频&lt;/h3&gt;
&lt;p&gt;HTML5 对视频和音频特性规范文档的制定是被讨论最多的。除浏览器自带支持的明显好处外，评论点集中在浏览器提供商对音频/视频格式的不同选择。如果你准备使用HTML5的 &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#audio&quot; target=&quot;_blank&quot;&gt;&amp;lt;audio&amp;gt;&lt;/a&gt; 和 &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/video.html#video&quot; target=&quot;_blank&quot;&gt;&amp;lt;video&amp;gt;&lt;/a&gt;，使你熟悉下面这些视频/音频的解码器和浏览器支持是非常重要的：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;音频:&lt;/strong&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Use_of_Ogg_formats_in_HTML5&quot; target=&quot;_blank&quot;&gt;ogg (ogg, oga)&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/MP3&quot; target=&quot;_blank&quot;&gt;mp3&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/WAV&quot; target=&quot;_blank&quot;&gt;wav&lt;/a&gt;,       &lt;a href=&quot;http://en.wikipedia.org/wiki/Advanced_Audio_Coding&quot; target=&quot;_blank&quot;&gt;AAC&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;视频:&lt;/strong&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Use_of_Ogg_formats_in_HTML5&quot; target=&quot;_blank&quot;&gt;ogg (ogv)&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/H.264&quot; target=&quot;_blank&quot;&gt;H.264 (mp4)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;另外你还需要留意一下 Google 的 &lt;a href=&quot;http://en.wikipedia.org/wiki/VP8&quot; target=&quot;_blank&quot;&gt;VP8&lt;/a&gt; 视频解码，这个将被作为一个开源格式来结束（格式选择的）纷争。HTML5    提供的一个解决方案是，让你可以指定多个不同格式的源文件，以便于用户浏览器选择它认识的文件。对于 &amp;lt; IE9 和旧浏览器，你将需要一个折衷的解决方案。&lt;/p&gt;
&lt;p&gt;当你第一次尝试 HTML5 的音频/视频，你可能会想知道这些可能对你有帮助的东东：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;你的服务器必须支持你打算提供的音频/视频的 MIME 格式。你将需要检查一下其在本地服务器上是否被支持。&lt;/li&gt;
&lt;li&gt;如果你使用 Safari 来检测 HTML5 的音频/视频支持，需要安装 QuickTime Player，没有QuickTime Player 的 Safari 什么都不能播放。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;简单代码示例：&lt;/strong&gt;音频标记 (&lt;a href=&quot;http://demos.w3avenue.com/html5-unleashed-tips-tricks-and-techniques/sample-04-audio-demo.html&quot; target=&quot;_blank&quot;&gt;View Demo&lt;/a&gt;)&lt;/p&gt;
&lt;pre xml:space=&quot;preserve&quot; class=&quot;code_bg&quot;&gt;
&amp;lt;audio controls&amp;gt;
        &amp;lt;source src=&amp;quot;demo-audio.ogg&amp;quot; /&amp;gt;
        &amp;lt;source src=&amp;quot;demo-audio.mp3&amp;quot; /&amp;gt;
&amp;lt;/audio&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&lt;img width=&quot;367&quot; height=&quot;55&quot; src=&quot;http://www.happinesz.cn/wp-content/uploads/2010/07/zrclip_004n26687205.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;简单代码示例：&lt;/strong&gt;视频标记 (&lt;a href=&quot;http://demos.w3avenue.com/html5-unleashed-tips-tricks-and-techniques/sample-05-video-demo.html&quot; target=&quot;_blank&quot;&gt;View Demo&lt;/a&gt;)&lt;/p&gt;
&lt;pre xml:space=&quot;preserve&quot; class=&quot;code_bg&quot;&gt;
&amp;lt;video width=&amp;quot;320&amp;quot; height=&amp;quot;240&amp;quot; controls preload=&amp;quot;none&amp;quot; poster=&amp;quot;videoframe.jpg&amp;quot;&amp;gt;
    &amp;lt;source src=&amp;quot;demo-video.mp4&amp;quot; type=&amp;quot;video/mp4&amp;quot; /&amp;gt;
    &amp;lt;source src=&amp;quot;demo-video.ogv&amp;quot; type=&amp;quot;video/ogg&amp;quot; /&amp;gt;
&amp;lt;/video&amp;gt;
&lt;/pre&gt;
&lt;p&gt;译注：记得加上type，不然，即使格式对了，也可能播放不了&lt;/p&gt;
&lt;p&gt;&lt;img width=&quot;349&quot; height=&quot;234&quot; src=&quot;http://www.happinesz.cn/wp-content/uploads/2010/07/zrclip_005nf0bf48a.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;尽管相对于要依赖第三方插件已经迈了一大步，但上面提供的示例，只是一个开始。由于各个浏览都提供了不同外观的控制栏，你可能会希望改变他们以适应你的设计。看看下面例子如何利用 DOM API 来创造一个属于你自己的自定义控制栏。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;简单代码示例：&lt;/strong&gt;拥有自定义控制栏的视频 (&lt;a href=&quot;http://demos.w3avenue.com/html5-unleashed-tips-tricks-and-techniques/sample-05-video-custom-controls-demo.html&quot; target=&quot;_blank&quot;&gt;View    Demo&lt;/a&gt;)&lt;/p&gt;
&lt;pre xml:space=&quot;preserve&quot; class=&quot;code_bg&quot;&gt;
&amp;lt;video width=&amp;quot;320&amp;quot; height=&amp;quot;240&amp;quot; preload=&amp;quot;none&amp;quot; poster=&amp;quot;videoframe.jpg&amp;quot;&amp;gt;
    &amp;lt;source src=&amp;quot;demo-video.mp4&amp;quot; type=&amp;quot;video/mp4&amp;quot; /&amp;gt;
    &amp;lt;source src=&amp;quot;demo-video.ogv&amp;quot; type=&amp;quot;video/ogg&amp;quot; /&amp;gt;
&amp;lt;/video&amp;gt;

&amp;lt;script&amp;gt;
    var video = document.getElementsByTagName('video')[0];
    function toggleMute() {
        video.muted = !video.muted;
    }
&amp;lt;/script&amp;gt;
&amp;lt;p&amp;gt;
    &amp;lt;a href=&amp;quot;JavaScript:video.play();&amp;quot;&amp;gt;Play&amp;lt;/a&amp;gt; |
    &amp;lt;a href=&amp;quot;JavaScript:video.pause();&amp;quot;&amp;gt;Pause&amp;lt;/a&amp;gt; |
    &amp;lt;a href=&amp;quot;JavaScript:toggleMute();&amp;quot;&amp;gt;Sound On/Off&amp;lt;/a&amp;gt;
&amp;lt;/p&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&lt;img width=&quot;349&quot; height=&quot;275&quot; src=&quot;http://www.happinesz.cn/wp-content/uploads/2010/07/zrclip_006n3d10fa19.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;你还可以利用 DOM API 来为音频/视频做更多。而且如果你乐意添加一些其他的东西，将会把这个带向一个完全不同的级别。例如，你可以把视频放到了 HTML5 canvas    元素中。这将会允许你读取一个视频的像素数据、控制、和帧，并做一些你想做的好玩的东东。（自己看看：&lt;a href=&quot;http://craftymind.com/factory/html5video/CanvasVideo.html&quot; target=&quot;_blank&quot;&gt;Blowing up HTML5 Video&lt;/a&gt;, &lt;a href=&quot;http://media.chikuyonok.ru/ambilight/&quot; target=&quot;_blank&quot;&gt;Ambilight for HTML5 Video&lt;/a&gt;）&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;了解更多：&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://dev.opera.com/articles/view/everything-you-need-to-know-about-html5-video-and-audio/&quot;&gt;关于 HTML5 音频/视频的一切&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.webmonkey.com/2010/02/embed_audio_and_video_in_html_5_pages/&quot;&gt;在HTML5 页面播放音频/视频&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://html5doctor.com/native-audio-in-the-browser/&quot;&gt;浏览器自带 HTML5 支持&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://diveintohtml5.org/video.html&quot;&gt;网页中的视频 (不需要额外支持)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.html5video.org/&quot;&gt;HTML5Video.org&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://wiki.whatwg.org/wiki/Video_type_parameters&quot;&gt;视频类型的参数&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;跨浏览器解决方案&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://jilion.com/sublime/video&quot; target=&quot;_blank&quot;&gt;SublimeVideo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.html5video.org/kaltura-html5/&quot; target=&quot;_blank&quot;&gt;Kaltura HTML5 Media Library&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://camendesign.com/code/video_for_everybody&quot; target=&quot;_blank&quot;&gt;Video for Everybody&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.happyworm.com/jquery/jplayer/&quot; target=&quot;_blank&quot;&gt;jPlayer: jQuery Audio Player&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.projekktor.com/&quot; target=&quot;_blank&quot;&gt;Projekktor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://github.com/macinjosh/YUI-HTML5-Player&quot; target=&quot;_blank&quot;&gt;YUI HTML5 Player&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.openbeelden.nl/oiplayer/&quot; target=&quot;_blank&quot;&gt;OIPlayer jQuery Plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://soukie.net/degradable-html5-audio-and-video-plugin/&quot; target=&quot;_blank&quot;&gt;Degradable HTML5 audio and video Plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.xiph.org/quicktime/&quot; target=&quot;_blank&quot;&gt;Xiph QuickTime Component to make Ogg work in Safari&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Javascript 交互：&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.chipwreck.de/blog/software/cwvideo/&quot;&gt;处理 HTML5 视频的 Mootools&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;编码、转换工具：&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://mirovideoconverter.com/&quot; target=&quot;_blank&quot;&gt;Miro Video Converter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.erightsoft.com/SUPER.html&quot; target=&quot;_blank&quot;&gt;SUPER&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.minicoder.minitech.org/&quot; target=&quot;_blank&quot;&gt;MiniCoder&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://handbrake.fr/&quot; target=&quot;_blank&quot;&gt;HandBrake&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://v2v.cc/~j/ffmpeg2theora/&quot; target=&quot;_blank&quot;&gt;ffmpeg2theora&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://firefogg.org/&quot; target=&quot;_blank&quot;&gt;Firefogg&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;基于 JavaScript 的 2D 绘画&lt;/h3&gt;
&lt;p&gt;HTML5 中最让人兴奋的特性是 &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html&quot; target=&quot;_blank&quot;&gt;&amp;lt;canvas&amp;gt;&lt;/a&gt; &amp;#8212; 那个用来作画的东东。在你的页面中插入 canvas 就像插入其他标记一样平常，但你将需要一些编程的经验来绘制形状、图表、动画、游戏、图片作品等。&lt;/p&gt;
&lt;p&gt;&lt;img width=&quot;349&quot; height=&quot;244&quot; src=&quot;http://www.happinesz.cn/wp-content/uploads/2010/07/zrclip_007p5c3a18a5.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;在除 IE 外的所有现代浏览器（Firefox 3, Safari 3.1, Chrome 2, and Opera 9.6）都支持 Canvas。你可以使用 &lt;a href=&quot;http://code.google.com/p/explorercanvas/&quot; target=&quot;_blank&quot;&gt;ExplorerCanvas&lt;/a&gt; 这个 Javascript 解决方案来为 IE 添加这个新特性。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;简单示例代码:&lt;/strong&gt; 基于指令的 HTML5 Canvas 2D 绘画 (&lt;a href=&quot;http://demos.w3avenue.com/html5-unleashed-tips-tricks-and-techniques/sample-06-canvas-demo.html&quot; target=&quot;_blank&quot;&gt;View Demo&lt;/a&gt;)&lt;/p&gt;
&lt;pre xml:space=&quot;preserve&quot; class=&quot;code_bg&quot;&gt;
&amp;lt;!doctype html&amp;gt;
&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset=&amp;quot;utf-8&amp;quot; /&amp;gt;
    &amp;lt;title&amp;gt;HTML5 Canvas Demo&amp;lt;/title&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;html5reset.css&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;html5simple.css&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;
    &amp;lt;!--[if lt IE 9]&amp;gt;
        &amp;lt;script src=&amp;quot;html5.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
        &amp;lt;script src=&amp;quot;excanvas.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;![endif]--&amp;gt;
        &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
        function draw(){
            var canvas = document.getElementById('mycanvas');
            if (canvas.getContext){
                var ctx = canvas.getContext('2d');

                // Draw Rectangle
                ctx.fillStyle = &amp;quot;rgb(255,0,0)&amp;quot;;
                ctx.fillRect (10, 10, 100, 100);

                // Draw Circle
                ctx.fillStyle = &amp;quot;rgb(0,255,0)&amp;quot;;
                ctx.beginPath();
                ctx.arc(125,100,50,0,Math.PI*2,true);
                ctx.fill();
                ctx.closePath();

                // Draw Custom Shape With Lines
                ctx.fillStyle = &amp;quot;rgb(0,0,255)&amp;quot;;
                ctx.beginPath();
                ctx.moveTo(125,100);
                ctx.lineTo(175,50);
                ctx.lineTo(225,150);
                ctx.fill();
                ctx.closePath();

                // Draw Image From External File
                var myImage = new Image();
                myImage.onload = function(){
                    ctx.drawImage(myImage, 220, 10);
                }
                myImage.src = &amp;quot;sample.jpg&amp;quot;;

            }
        }
        &amp;lt;/script&amp;gt;
        &amp;lt;style type=&amp;quot;text/css&amp;quot;&amp;gt;
            canvas {
                border: 5px solid #ccc;
                background: #000;
            }
        &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body onload=&amp;quot;draw();&amp;quot;&amp;gt;
    &amp;lt;header&amp;gt;
        &amp;lt;h1&amp;gt;HTML5 Canvas Demo&amp;lt;/h1&amp;gt;
    &amp;lt;/header&amp;gt;

    &amp;lt;figure&amp;gt;
        &amp;lt;canvas id=&amp;quot;mycanvas&amp;quot; width=&amp;quot;300&amp;quot; height=&amp;quot;200&amp;quot;&amp;gt;Fallback content, in case the browser does not support Canvas.&amp;lt;/canvas&amp;gt;
        &amp;lt;figcaption&amp;gt;Works in Firefox 3+, Safari 3.1+, Chrome 2+ and Opera 9.6+)&amp;lt;/figcaption&amp;gt;
    &amp;lt;/figure&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;了解更多:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.slideshare.net/robhawkes/html5-canvas-the-future-of-graphics-on-the-web&quot;&gt;HTML5 Canvas &amp;#8211; Web 绘画的未来&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.mozilla.org/en/Canvas_tutorial&quot;&gt;Canvas 教程 at Mozilla Developer Center&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://carsonified.com/blog/dev/html-5-dev/how-to-draw-with-html-5-canvas/&quot;&gt;如何使用 HTML 5 Canvas&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dev.opera.com/articles/view/html-5-canvas-the-basics/&quot;&gt;HTML5 Canvas 基础 (Opera 开发者社区)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://diveintohtml5.org/canvas.html&quot; target=&quot;_blank&quot;&gt;让我们称之为画层&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;工具 &amp;amp; 资源列表：&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.nihilogic.dk/2009/02/html5-canvas-cheat-sheet.html&quot;&gt;HTML5 Canvas 帮助手册&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.filamentgroup.com/lab/jquery_visualize_plugin_accessible_charts_graphs_from_tables_html5_canvas/&quot;&gt;jQuery       Visualize Plugin: 基于 Table 的图表&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://processingjs.org/&quot;&gt;Processing.js: Port of the Processing Visualization Language&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://cartagen.org/&quot; target=&quot;_blank&quot;&gt;Cartagen: Framework For Rendering Maps in HTML5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.rgraph.net/&quot; target=&quot;_blank&quot;&gt;RGraph: HTML5 Canvas Graph Library&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;示例 &amp;amp; 应用：&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.chromeexperiments.com/&quot; target=&quot;_blank&quot;&gt;Chrome Experiments&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://mrdoob.com/projects/harmony/&quot; target=&quot;_blank&quot;&gt;Harmony: Procedural Drawing Tool&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://mugtug.com/sketchpad/&quot; target=&quot;_blank&quot;&gt;Sketchpad: Online Paint/Drawing Application&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://canvaspaint.org/&quot; target=&quot;_blank&quot;&gt;CanvasPaint: Copy of Microsoft Paint&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;让内容可编辑&lt;/h3&gt;
&lt;p&gt;如果你想让页面的某个地方，允许用户编辑页面，所有的你需要做的事就是添加 &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#contenteditable&quot; target=&quot;_blank&quot;&gt;contenteditable&lt;/a&gt; 属性到父容器中。你可能曾在 WYSIWYG 编辑器中看过。这个属性是 HTML5 的一部分，且它几乎被所有主流浏览器支持（Internet Explorer 5.5+, Firefox 3+,    Safari 3.1+, Chrome 2+, and Opera 9.6+）：&lt;/p&gt;
&lt;p&gt;值得注意的是设置 contenteditable=&amp;quot;true&amp;quot; 只是允许用户编辑、删除、插入内容，并不会自动提供其他类似于 WYSIWYG 编辑器的保存或应用样式的功能。你将需要自己用 Javascript 来添加这些功能。&lt;/p&gt;
&lt;p&gt;&lt;img width=&quot;436&quot; height=&quot;195&quot; src=&quot;http://www.happinesz.cn/wp-content/uploads/2010/07/zrclip_008n39d310e9.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;简单示例代码:&lt;/strong&gt; 有加粗、倾斜和下划线功能的基本编辑器 (&lt;a href=&quot;http://demos.w3avenue.com/html5-unleashed-tips-tricks-and-techniques/sample-07-contenteditable-demo.html&quot; target=&quot;_blank&quot;&gt;View    Demo&lt;/a&gt;)&lt;/p&gt;
&lt;pre xml:space=&quot;preserve&quot; class=&quot;code_bg&quot;&gt;
&amp;lt;!doctype html&amp;gt;
&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset=&amp;quot;utf-8&amp;quot; /&amp;gt;
    &amp;lt;title&amp;gt;HTML5 ContentEditable Demo&amp;lt;/title&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;html5reset.css&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;html5simple.css&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;
    &amp;lt;!--[if lt IE 9]&amp;gt;
        &amp;lt;script src=&amp;quot;html5.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;![endif]--&amp;gt;

    &amp;lt;script language=&amp;quot;javascript&amp;quot;&amp;gt;
    function editStyle(cmd) {
        document.execCommand(cmd, null, null);
    }
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body onload=&amp;quot;draw();&amp;quot;&amp;gt;
    &amp;lt;header&amp;gt;
        &amp;lt;h1&amp;gt;HTML5 ContentEditable Demo&amp;lt;/h1&amp;gt;
    &amp;lt;/header&amp;gt;

    &amp;lt;div id=&amp;quot;democontainer&amp;quot;&amp;gt;
        &amp;lt;div id=&amp;quot;editingcontrols&amp;quot;&amp;gt;
            &amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;editStyle('bold');&amp;quot;&amp;gt;[Bold]&amp;lt;/a&amp;gt;
            &amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;editStyle('italic');&amp;quot;&amp;gt;[Italic]&amp;lt;/a&amp;gt;
            &amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;editStyle('underline');&amp;quot;&amp;gt;[Underline]&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div id=&amp;quot;editor&amp;quot; contenteditable=&amp;quot;true&amp;quot;&amp;gt;
            &amp;lt;h2&amp;gt;HTML5 Standardized Content Editing&amp;lt;/h2&amp;gt;
            &amp;lt;p&amp;gt;Thanks to Microsoft; HTML elements are editable since Internet Explorer 5.5....&amp;lt;/p&amp;gt;
            &amp;lt;p&amp;gt;To edit just start typing. To change style, select text and click on links in the tools bar.&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;了解更多：&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.whatwg.org/the-road-to-html-5-contenteditable&quot;&gt;通向 HTML5 之路: contentEditable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://arstechnica.com/open-source/guides/2009/07/how-to-build-a-desktop-wysiwyg-editor-with-webkit-and-html-5.ars/&quot;&gt;如何利用       webkit 和 HTML创建一个桌面版的 WYSIWYG 编辑器&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;工具 &amp;amp; 资源列表：&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.quirksmode.org/dom/execCommand.html&quot;&gt;QuirksMode: execCommand 兼容列表&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms533049(VS.85).aspx&quot;&gt;Internet Explorer commands&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.mozilla.org/En/Rich-Text_Editing_in_Mozilla&quot;&gt;Mozilla Firefox commands&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.w3avenue.com/2010/01/04/list-of-free-web-based-html-editors-for-your-cms-project/&quot;&gt;基 于网页的免费 HTML 编辑器&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;拖放&lt;/h3&gt;
&lt;p&gt;HTML5 的拖放将会把与用户交互带向别一个等级，并将会对你如何设计用户交互产生重大影响。现今，&lt;a href=&quot;https://developer.mozilla.org/En/DragDrop/Drag_and_Drop&quot; target=&quot;_blank&quot;&gt;Firefox 3.5+&lt;/a&gt; 已经对此特性提供了最大化的支持，其他浏览还只是保守地支持了一小部分（Opera 完全不支持）。不幸的是根据现阶段浏览器提供商的执行状况，你将需要依赖大量的 Javascript 和 CSS 来让做跨浏览器支持。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;注意：&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;图片和超链接默认是可拖放的。对于所有的元素，HTML5 引进了一个新的属性&amp;quot;draggable&amp;quot;，这将用来设置元素是否接受拖放；&lt;/li&gt;
&lt;li&gt;下列事件对应 HTML5 的拖放：&lt;strong&gt;dragstart&lt;/strong&gt;, &lt;strong&gt;drag&lt;/strong&gt;, &lt;strong&gt;dragenter&lt;/strong&gt;, &lt;strong&gt;dragover&lt;/strong&gt;, &lt;strong&gt;       dragleave&lt;/strong&gt;, &lt;strong&gt;drop&lt;/strong&gt; 和 &lt;strong&gt;dragend。&lt;/strong&gt;当你要fire掉事件的时候，将需要写 function (事件处理器)       来处理你需要的，也可能需要给元素绑定事件或做事件指派来简化你的代码；&lt;/li&gt;
&lt;li&gt;拖放事件还让你可以通过被拖放元素来传递数据，使用事件属性&amp;quot;dataTransfer&amp;quot; 的 getData 和 setData 方法。&lt;/li&gt;
&lt;li&gt;你可以在不同的浏览器或程序中进行拖放。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;简单代码示例:&lt;/strong&gt; 将图片拖放到另一个窗口 (&lt;a href=&quot;http://demos.w3avenue.com/html5-unleashed-tips-tricks-and-techniques/sample-08-draganddrop-demo.html&quot; target=&quot;_blank&quot;&gt;View Demo&lt;/a&gt;)&lt;/p&gt;
&lt;pre xml:space=&quot;preserve&quot; class=&quot;code_bg&quot;&gt;
&amp;lt;!doctype html&amp;gt;
&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset=&amp;quot;utf-8&amp;quot; /&amp;gt;
    &amp;lt;title&amp;gt;HTML5 Drag &amp;amp; Drop Demo&amp;lt;/title&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;html5reset.css&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;
    &amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;html5simple.css&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;
    &amp;lt;!--[if lt IE 9]&amp;gt;
        &amp;lt;script src=&amp;quot;html5.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;![endif]--&amp;gt;

    &amp;lt;script&amp;gt;
    function DragHandler(target, e) {
        e.dataTransfer.setData('Text', &lt;a href=&quot;http://target.id&quot;&gt;target.id&lt;/a&gt;);
    }

    function DropHandler(target, e) {
       var id = e.dataTransfer.getData('Text');
       target.appendChild(document.getElementById(id));
       e.preventDefault();
    }
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;header&amp;gt;
        &amp;lt;h1&amp;gt;HTML5 Drag &amp;amp; Drop Demo&amp;lt;/h1&amp;gt;
    &amp;lt;/header&amp;gt;
&amp;lt;div id=&amp;quot;dndcontainer&amp;quot;&amp;gt;
    &amp;lt;div ondrop=&amp;quot;DropHandler(this, event)&amp;quot; ondragenter=&amp;quot;return false&amp;quot; ondragover=&amp;quot;return false&amp;quot; class=&amp;quot;dndbox&amp;quot;&amp;gt;
        &amp;lt;img src=&amp;quot;item-1.png&amp;quot; id=&amp;quot;club&amp;quot; ondragstart=&amp;quot;DragHandler(this, event)&amp;quot; width=&amp;quot;75&amp;quot; height=&amp;quot;75&amp;quot; border=&amp;quot;0&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;
        &amp;lt;img src=&amp;quot;item-2.png&amp;quot; id=&amp;quot;heart&amp;quot; ondragstart=&amp;quot;DragHandler(this, event)&amp;quot; width=&amp;quot;75&amp;quot; height=&amp;quot;75&amp;quot; border=&amp;quot;0&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;
        &amp;lt;img src=&amp;quot;item-3.png&amp;quot; id=&amp;quot;spade&amp;quot; ondragstart=&amp;quot;DragHandler(this, event)&amp;quot; width=&amp;quot;75&amp;quot; height=&amp;quot;75&amp;quot; border=&amp;quot;0&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;
        &amp;lt;img src=&amp;quot;item-4.png&amp;quot; id=&amp;quot;diamond&amp;quot; ondragstart=&amp;quot;DragHandler(this, event)&amp;quot; width=&amp;quot;75&amp;quot; height=&amp;quot;75&amp;quot; border=&amp;quot;0&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;div ondrop=&amp;quot;DropHandler(this, event)&amp;quot; ondragenter=&amp;quot;return false&amp;quot; ondragover=&amp;quot;return false&amp;quot; class=&amp;quot;dndbox&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;

    &amp;lt;div id=&amp;quot;demonotes&amp;quot;&amp;gt;Drag and drop images from one container to another. Works in all major browsers except Opera.&amp;lt;/div&amp;gt;

&amp;lt;/div&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;了解更多:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.useragentman.com/blog/2010/01/10/cross-browser-html5-drag-and-drop/&quot; target=&quot;_blank&quot;&gt;跨浏览器 HTML5 拖放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://decafbad.com/blog/2009/07/15/html5-drag-and-drop&quot; target=&quot;_blank&quot;&gt;Firefox 3.5 中的 HTML5 拖放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.mozilla.org/En/DragDrop/Drag_and_Drop&quot; target=&quot;_blank&quot;&gt;MDC：拖放&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://html5doctor.com/native-drag-and-drop/&quot; target=&quot;_blank&quot;&gt;自带拖放支持&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://zope.cetis.ac.uk/members/scott/blogview?entry=20090624222327&quot; target=&quot;_blank&quot;&gt;HTML5 拖放 + Microformats = 没有什么不可能&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.quirksmode.org/blog/archives/2009/09/the_html5_drag.html&quot; target=&quot;_blank&quot;&gt;HTML5 拖放之灾&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;JavaScript 解决方案：&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://github.com/guillaumebort/jquery-ndd&quot; target=&quot;_blank&quot;&gt;HTML5 自带拖放 jQuery 插件&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.ukijs.org/2010/03/16/drag-and-drop-in-uki/&quot; target=&quot;_blank&quot;&gt;基于 Simple UI Kit 的拖放&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;稳健的数据存储&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://dev.w3.org/html5/webstorage/&quot; target=&quot;_blank&quot;&gt;Web 存储&lt;/a&gt;规范提供了与 HTTP session cookies 相似的稳健的 Web    存储属性。他们是&amp;quot;sessionStorage&amp;quot; 和&amp;quot;localStorage&amp;quot;。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;sessionStorage&lt;/strong&gt; 用以存储浏览最顶层环境生存周期内的数据。例如浏览器 Tab 的或窗口持续打开周期内的数据。&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;localStorage&lt;/strong&gt; 用以存储周期较长、多页面，以及多浏览器 session 的内数据。甚至持续到你重起浏览器或者电脑。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;本地和 session 存储特性被如下浏览器所支持：IE8+, Firefox 3.5+, Safari 4.0+, Chrome 2.0+ and Opera 10.5+。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;简单代码示例:&lt;/strong&gt; 使用 localStorage 来创建页面计数器 (&lt;a href=&quot;http://demos.w3avenue.com/html5-unleashed-tips-tricks-and-techniques/sample-10-localstorage-demo.html&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;View    Demo&lt;/strong&gt;&lt;/a&gt;)&lt;/p&gt;
&lt;pre xml:space=&quot;preserve&quot; class=&quot;code_bg&quot;&gt;
&amp;lt;p&amp;gt;You Have Viewed This Page &amp;lt;b&amp;gt;
&amp;lt;script&amp;gt;
    if (!localStorage.pageCounter)
        localStorage.setItem('pageCounter',0);
    localStorage.setItem('pageCounter',parseInt(localStorage.pageCounter)+1);
    document.write(localStorage.pageCounter);
&amp;lt;/script&amp;gt;
&amp;lt;/b&amp;gt; Time(s).&amp;lt;/p&amp;gt;

&amp;lt;p&amp;gt;&amp;lt;input value=&amp;quot;Clear localStorage&amp;quot; type=&amp;quot;button&amp;quot; onClick=&amp;quot;localStorage.clear();location.reload(true);&amp;quot; /&amp;gt;
&amp;lt;input value=&amp;quot;Reload Page&amp;quot; type=&amp;quot;button&amp;quot; onClick=&amp;quot;location.reload(true);&amp;quot; /&amp;gt;&amp;lt;/p&amp;gt;
&lt;/pre&gt;
&lt;p&gt;你也可以把上面的代码中所有的 localStorage 的实例替换成 sessionStorage 来测试 sessionStorage。你的计数器将会在你关闭 Tab 或窗口前正常工作。如果你重起浏览器，计数器将会重新计数 (&lt;a href=&quot;http://demos.w3avenue.com/html5-unleashed-tips-tricks-and-techniques/sample-09-sessionstorage-demo.html&quot; target=&quot;_blank&quot;&gt;View Demo&lt;/a&gt;)    。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;了解更多:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-learning-about-html5-local-storage/&quot; target=&quot;_blank&quot;&gt;学习       HTML5 Local Storage&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;JavaScript 解决方案:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/realstorage/&quot; target=&quot;_blank&quot;&gt;realstorage: JavaScript compatibility wrapper for localStorage &amp;#8211;       provides fallback to Gears&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/sessionstorage/&quot; target=&quot;_blank&quot;&gt;sessionstorage: 跨浏览器 HTML5 sessionStorage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.stoimen.com/blog/2010/02/26/jquery-localstorage-plugin-alpha/&quot; target=&quot;_blank&quot;&gt;jQuery localStorage 插件&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.jstorage.info/&quot; target=&quot;_blank&quot;&gt;jStorage: 在支持的地方使用 HTML5 local storage 在旧版的 IE 上使用 userData behavior&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;更多____&lt;/h3&gt;
&lt;p&gt;除了已经讨论的内容外，还有更多你会想跟进了解的特性和相关的技术。这些是会帮助你研究的摘要列表：&lt;/p&gt;
&lt;h5&gt;网页版离线程序&lt;/h5&gt;
&lt;p&gt;HTML5 &lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/offline.html&quot; target=&quot;_blank&quot;&gt;规范&lt;/a&gt;还定义了当用户的网络被断开后如何让它们继续与网页程序和文档进行交互。这个特性现在被 Firefox 3.5+, Chrome 4.0+, Safari 4.0+ and Mobile Safari 3.1+ 所支持。&lt;/p&gt;
&lt;p&gt;你可以通过提供一个 manifest 文件来定义哪些文件需要被缓存，哪些需要在离线的时候有折衷方案替代。当用户访问这个页面，支持的浏览器将会猎取一个 manifest 版本。它将下载并缓存所有的涉及到的文件，并且当 manifest    相对于用户上次的浏览的版本有变化，它将会再次下载并缓存所有的文件。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.apple.com/safari/library/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/Name-ValueStorage/Name-ValueStorage.html&quot; target=&quot;_blank&quot;&gt;Safari 客户端存储及离线应用程序编程指南&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://robertnyman.com/2010/04/14/using-offline-web-applications-to-offer-offline-capabilities-sister-specification-to-html5/&quot; target=&quot;_blank&quot;&gt;使用离线应用程序提供离线支持&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://hacks.mozilla.org/2010/01/offline-web-applications/&quot; target=&quot;_blank&quot;&gt;Mozilla Hacks: 离线网页应用程序&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.thecssninja.com/javascript/how-to-create-offline-webapps-on-the-iphone&quot; target=&quot;_blank&quot;&gt;如何在 iPhone 上创建离线应用程序&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;跨文档通讯&lt;/h5&gt;
&lt;p&gt;新的&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages&quot; target=&quot;_blank&quot;&gt;规范&lt;/a&gt;还提供了&amp;quot;postMessage&amp;quot; 让我们可以向不同域的页面发送消息。这个特性在所有现代浏览器中被支持：IE8+, Firefox3+, Safari 4+, Chrome 2+ and Safari 9.6+。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.apple.com/safari/library/documentation/AppleApplications/Conceptual/SafariJSProgTopics/Articles/Cross-documentmessaging.html&quot; target=&quot;_blank&quot;&gt;Safari Reference Library: 跨文档通信&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developer.mozilla.org/en/DOM/window.postMessage&quot; target=&quot;_blank&quot;&gt;Mozilla Developer Center: postMessage&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;用 className 访问 DOM 元素&lt;/h5&gt;
&lt;p&gt;我们在 Javascript 中最常见的事是选择 DOM 元素并动态地做一些事。我们大部分人在原生 Javascript 中使用 &amp;quot;getElementById&amp;quot; 来做这事。HTML5 规则已经添加了&amp;quot;&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-getelementsbyclassname&quot; target=&quot;_blank&quot;&gt;getElementsByClassName&lt;/a&gt;&amp;quot; 方法，当我们要用 className 来访问元素的时候，这将会大大提升我们脚本的性能。 这个特性在除IE 外的其他现代浏览器都支持，有Firefox3+, Safari 3.2+,    Chrome 2+ 和 Safari 9.6+。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://ejohn.org/blog/getelementsbyclassname-speed-comparison/&quot; target=&quot;_blank&quot;&gt;getElementsByClassName 速度对比&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://crisp.tweakblogs.net/blog/485/some-thoughts-on-html5s-getelementsbyclassname.html&quot; target=&quot;_blank&quot;&gt;对 HTML5&amp;prime;s       getElementsByClassName 的一些思考&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;更多的特性&lt;/h5&gt;
&lt;p&gt;官方规范文档：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#microdata&quot; target=&quot;_blank&quot;&gt;Microdata&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#mdvocabs&quot;&gt;Microdata Vocabularies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#channel-messaging&quot;&gt;Channel Messaging&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;相关技术&lt;/h5&gt;
&lt;p&gt;官方规范文档:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.whatwg.org/specs/web-workers/current-work/&quot;&gt;Web Workers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dev.w3.org/html5/websockets/&quot;&gt;WebSocket API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.whatwg.org/specs/web-socket-protocol/&quot;&gt;WebSocket Protocol&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dev.w3.org/html5/eventsource/&quot;&gt;Server Sent Events&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dev.w3.org/html5/webdatabase/&quot;&gt;Web SQL Database&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dev.w3.org/geo/api/spec-source.html&quot;&gt;Geolocation API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.w3.org/TR/SVG/&quot;&gt;SVG&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.w3.org/TR/MathML/&quot;&gt;MathML&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dev.w3.org/2006/webapi/XMLHttpRequest-2/&quot;&gt;XMLHttpRequest&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;额外的资源&lt;/h3&gt;
&lt;p&gt;如果你还想要涉猎更多的知识，应该看看这些资源：&lt;/p&gt;
&lt;h5&gt;必要的书签&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.whatwg.org/specs/web-apps/current-work/multipage/&quot; target=&quot;_blank&quot;&gt;HTML5 Draft&lt;/a&gt;       &lt;br /&gt;
    WHATWG 的草案&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.whatwg.org/&quot; target=&quot;_blank&quot;&gt;The WHATWG Blog&lt;/a&gt;       &lt;br /&gt;
    WHATWG 官方博客 &amp;#8211; 负责 HTML5 规范的团队&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://wiki.whatwg.org/&quot; target=&quot;_blank&quot;&gt;WHATWG Wiki&lt;/a&gt;       &lt;br /&gt;
    WHATWG 贡献者提交和编纂他们对 WHATWG 规范建议的地方&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://diveintohtml5.org/&quot; target=&quot;_blank&quot;&gt;Dive Into HTML5&lt;/a&gt;       &lt;br /&gt;
    Mark Pilgrim 在 HTML5 规范中精心挑选的特性。现在正在进行中，最终将会由 O&amp;#8217;Reilly 制作为纸质读物&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://validator.whatwg.org/&quot; target=&quot;_blank&quot;&gt;HTML5 Validator&lt;/a&gt;       &lt;br /&gt;
    在线 HTML5 文档检测工具&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.w3.org/html/planet/&quot; target=&quot;_blank&quot;&gt;Planet HTML5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://html5.org/tools/web-apps-tracker&quot; target=&quot;_blank&quot;&gt;HTML5 Revision Tracker&lt;/a&gt;       &lt;br /&gt;
    提供在线的规范选择和版本对比&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://html5doctor.com/&quot; target=&quot;_blank&quot;&gt;HTML5 Doctor&lt;/a&gt;       &lt;br /&gt;
    注重于帮助你在今天实施 HTML5 的在线社区&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;示例 / 展廊&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://html5demos.com/&quot; target=&quot;_blank&quot;&gt;HTML5 Demos and Examples&lt;/a&gt;       &lt;br /&gt;
    一系列由 Remy Sharp 制作的 HTML5 实验&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://apirocks.com/html5/html5.html&quot; target=&quot;_blank&quot;&gt;HTML5 Presentation&lt;/a&gt;       &lt;br /&gt;
    由 Marcin Wichary 开发，Ernest Delgado 修改。 这个报告展示了桌面和移动浏览器上的 HTML5 特性&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://robertnyman.com/html5/&quot; target=&quot;_blank&quot;&gt;Information and Samples for HTML5 and related APIs&lt;/a&gt;       &lt;br /&gt;
    一系列由 Robert Nyman 制作的 HTML5 演示和例子&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://html5gallery.com/&quot; target=&quot;_blank&quot;&gt;HTML5 Gallery&lt;/a&gt;       &lt;br /&gt;
    收集使用 HTML5 标记网站的Gallery&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;帮助手册&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.veign.com/reference/html5-guide.php&quot; target=&quot;_blank&quot;&gt;HTML5 Quick Reference Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.smashingmagazine.com/2009/07/06/html-5-cheat-sheet-pdf/&quot; target=&quot;_blank&quot;&gt;HTML5 Cheat Sheet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://woorkup.com/2009/12/16/html5-visual-cheat-sheet-reloaded/&quot; target=&quot;_blank&quot;&gt;HTML5 Visual Cheat Sheet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://heideri.ch/jso/&quot; target=&quot;_blank&quot;&gt;HTML5 Security Cheatsheet&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;框架&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://lessframework.com/&quot; target=&quot;_blank&quot;&gt;Less&lt;/a&gt;       &lt;br /&gt;
    一个为多种屏幕宽度提供灵活多栏布局，由驱动于 HTML5 的 CSS 框架&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://52framework.com/&quot; target=&quot;_blank&quot;&gt;52Framework&lt;/a&gt;       &lt;br /&gt;
    一个以让你在今天就能在项目上应用 HTML5 和 CSS3 的页面开发框架&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.sproutcore.com/&quot; target=&quot;_blank&quot;&gt;SproutCore&lt;/a&gt;       &lt;br /&gt;
    一个由 Ruby gem 写的 JavaScript HTML5 应用程序框架。&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://frame.serverboy.net/&quot; target=&quot;_blank&quot;&gt;Frame&lt;/a&gt;       &lt;br /&gt;
    Frame 是一个支持 Layout, Typography, Forms, Code, Table, Reset, 和 Print 标签样式化，并提供 HTML5 默认样式和元素支持的 CSS 框架&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;综述性文章 &amp;amp; 教程&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.ibm.com/developerworks/opensource/library/x-html5mobile1/index.html&quot; target=&quot;_blank&quot;&gt;用 HTML5 制作手机web程序&lt;/a&gt;       &lt;br /&gt;
    By Michael Galpin (IBM developerWorks &amp;#8211; May 6th, 2010)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.pvmgarage.com/en/2010/04/touch-the-future-create-an-elegant-website-with-hmtl-5-and-css3/&quot; target=&quot;_blank&quot;&gt;Touch       The Future: 用 HTML5 和 CSS3 制作更优雅的网站&lt;/a&gt;       &lt;br /&gt;
    By Piervincenzo Madeo (PV.M Garage &amp;#8211; April 23rd, 2010)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://html5doctor.com/how-to-use-html5-in-your-client-work-right-now/&quot; target=&quot;_blank&quot;&gt;现在如何在你的客户需求上使用 HTML5&lt;/a&gt;       &lt;br /&gt;
    By Richard Clark (HTML5 Doctor &amp;#8211; March 30th, 2010)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.ibm.com/developerworks/web/library/wa-html5webapp/&quot; target=&quot;_blank&quot;&gt;使用 HTML5 制作web 应用程序&lt;/a&gt;       &lt;br /&gt;
    By Michael Galpin (IBM developerWorks &amp;#8211; March 30th, 2010)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://sixrevisions.com/web-development/html5-iphone-app/&quot; target=&quot;_blank&quot;&gt;如何制作一个 HTML5 iPhone App&lt;/a&gt;       &lt;br /&gt;
    By Alex Kessinger (Six Revisions &amp;#8211; March 26th, 2010)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://radar.oreilly.com/2010/03/why-html5-is-worth-your-time.html&quot; target=&quot;_blank&quot;&gt;为什么 HTML5 值得你花时间&lt;/a&gt;       &lt;br /&gt;
    By Mac Slocum (O&amp;#8217;Reilly &amp;#8211; March 15th, 2010)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.threestyles.com/tutorials/html5-rocks-my-socks-off/&quot; target=&quot;_blank&quot;&gt;HTML5 让我震惊了&lt;/a&gt;       &lt;br /&gt;
    By Shane Jeffers (Three Styles &amp;#8211; March 11th, 2010)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.ibm.com/developerworks/web/tutorials/wa-html5/&quot; target=&quot;_blank&quot;&gt;使用 HTML5 和 CSS3 创建时尚网站&lt;/a&gt;       &lt;br /&gt;
    By Joe Lennon (IBM developerWorks &amp;#8211; March 2nd, 2010)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://inspectelement.com/tutorials/code-a-backwards-compatible-one-page-portfolio-with-html5-and-css3/&quot; target=&quot;_blank&quot;&gt;用       HTML5 和 CSS3 制作一个向后兼容的单页作品集页面&lt;/a&gt;       &lt;br /&gt;
    By Tom Kenny (Inspect Element &amp;#8211; January 25th, 2010)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://lifehacker.com/5416100/how-html5-will-change-the-way-you-use-the-web&quot; target=&quot;_blank&quot;&gt;HTML5 将会如何改变你使用网站的习惯&lt;/a&gt;       &lt;br /&gt;
    By Kevin Purdy (Lifehacker &amp;#8211; December 1st, 2009)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/&quot; target=&quot;_blank&quot;&gt;Coding A HTML 5 Layout       From Scratch&lt;/a&gt;       &lt;br /&gt;
    By Enrique Ramirez (Smashing Magazine &amp;#8211; August 4th, 2009)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://perishablepress.com/press/2009/07/19/power-of-html5-css3/&quot; target=&quot;_blank&quot;&gt;HTML5 和 CSS3 的威力所在&lt;/a&gt;       &lt;br /&gt;
    By Jeff Starr (Perishable Press &amp;#8211; July 19th, 2009)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://articles.sitepoint.com/article/html-5-snapshot-2009&quot; target=&quot;_blank&quot;&gt;是的，今天就可以使用 HTML5 了!&lt;/a&gt;       &lt;br /&gt;
    By Bruce Lawson (SitePoint &amp;#8211; July 1st, 2009)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.ibm.com/developerworks/xml/library/x-html5/&quot; target=&quot;_blank&quot;&gt;HTML5 中的新元素&lt;/a&gt;       &lt;br /&gt;
    By Elliotte Rusty Harold (IBM developerWorks &amp;#8211; August 7th, 2007)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;示例 &amp;amp; 下载&lt;/h3&gt;
&lt;p&gt;你可以下载打包了所有 Demo 的 ZIP 文件。注意：视频/音频并没有包含在下载中。&lt;/p&gt;
&lt;p class=&quot;idownload&quot;&gt;&lt;a href=&quot;http://demos.w3avenue.com/html5-unleashed-tips-tricks-and-techniques/&quot;&gt;查看Demo&lt;/a&gt; | &lt;a href=&quot;http://demos.w3avenue.com/html5-unleashed-tips-tricks-and-techniques/w3avenue-download-html5-samples.zip&quot;&gt;下载演示文件&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;==========&lt;/p&gt;
&lt;p&gt;文章后面的那句话就不翻啦，套话。对于个人来说，目前会逐渐接触更多的 HTML5 和 CSS3 相关的新技术，希望能在后续的学习和研究中有所收获，并能将其应用到产品中，以提升产品在功能、速度和视觉上的体验。&lt;/p&gt;
&lt;p&gt;&lt;hr&gt;&amp;copy;2010 &lt;a href=&quot;http://www.happinesz.cn&quot;&gt;幸福收藏夹&lt;/a&gt;. 版权所有,转载务必注明.&lt;a href=&quot;http://www.happinesz.cn/archives/1292/&quot;&gt;&lt;strong style=&quot;color:#f30;&quot;&gt;招聘: &lt;/strong&gt;支付宝前端开发，此地钱多，人少，速来&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/403827396/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1389/&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/sofish/403827396/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/sofish/403827396/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=311452c597c1e7a789df27cdd459971d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=311452c597c1e7a789df27cdd459971d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=583a0601e26ada27afac08b8b758e8e1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=583a0601e26ada27afac08b8b758e8e1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=da7c7dc9c06fdcd6fa5aaddd802e33ac&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=da7c7dc9c06fdcd6fa5aaddd802e33ac&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=dfed38b257ce7eafa18015b0b41f0e3c&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=dfed38b257ce7eafa18015b0b41f0e3c&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=b0c93c7af6af31b2f4531bb5e1e8ee71&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=b0c93c7af6af31b2f4531bb5e1e8ee71&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://www.happinesz.cn/archives/1389/feed/</wfw:commentRss><slash:comments>42</slash:comments><description>想总结一下HTML5 的支持列表，写了许久，无果。在众多文章中，这篇文章涉及到了我想到的，以及没想到的。遂做粗略的翻译，因个人英文水平一般，本文FYI。原文请看：HTML5 Unleashed: Tips, Tricks and Techniques。 ===== 现今我们能用 HTML5 吗，能用它做些什么呢，是否真的是 Flash 杀手？想必你也注意到了这些日渐增长且常被问起的类似问题，被讨论着，甚至被回答过。在我看来，你必须自己回答这些基本的问题。 这篇文章的本意是想帮你通过一些基本指南的学习，以轻松学习代码模板。一旦你熟悉了这些基本，并想更进一学习，你还将会找到更多提供了建议、技巧和技术的有用资源。 HTML 5 特性 官方详细的文档是寻找 HTML5 特性的最好地方，当然你还可以轻松通过 W3Schools 来学习HTML5 标签。我们将会在文章中涉及到以下的特性： 语义化标记 Form 表单增强功能 视频 / 音频 画布（Canvas） 可编辑内容 拖放 稳健的数据存储 检测浏览器支持 在你开始尝试 HTML5之前，需要知道各主流浏览器的支持状况。这些有用的资源，将可以帮助你向着正轨走： 何时能用 网页设计师的浏览器支持列表 HTML5 测试 布局引擎对比 你还可以运行 Javascript（用Javascript 检测浏览器特性）来检测 HTML5 特性的支持。你还应该用用Modernizr： 一个非常不错的检测 HTML5/CSS3 本地支持的 Javascript 库。如果你选择用 Mootools可以使用MooModernizr (MooTools port of [...]&lt;img src=&quot;http://www1.feedsky.com/t1/403827396/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1389/&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/sofish/403827396/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/sofish/403827396/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=311452c597c1e7a789df27cdd459971d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=311452c597c1e7a789df27cdd459971d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=583a0601e26ada27afac08b8b758e8e1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=583a0601e26ada27afac08b8b758e8e1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=da7c7dc9c06fdcd6fa5aaddd802e33ac&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=da7c7dc9c06fdcd6fa5aaddd802e33ac&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=dfed38b257ce7eafa18015b0b41f0e3c&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=dfed38b257ce7eafa18015b0b41f0e3c&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=b0c93c7af6af31b2f4531bb5e1e8ee71&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=b0c93c7af6af31b2f4531bb5e1e8ee71&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</description><category>向后兼容</category><category>html5</category><category>Design</category><category>HTML</category><pubDate>Tue, 20 Jul 2010 21:33:43 +0800</pubDate><author>sofish</author><comments>http://www.happinesz.cn/archives/1389/#comments</comments><guid isPermaLink="false">http://www.happinesz.cn/archives/1389/</guid><dc:creator>sofish</dc:creator><fs:srclink>http://www.happinesz.cn/archives/1389/</fs:srclink><fs:srcfeed>http://www.happinesz.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/sofish/~1329654/403827396/1334283</fs:itemid></item><item><title>去除按钮、链接中的虚线框</title><link>http://www.happinesz.cn/archives/1366/</link><content:encoded>&lt;p&gt;话说，对于去除虚线框，即使是一个前端开发工作者，也可能不知道所有的潜规则。因为很多情况下，它是一个视觉上的辅助，并且盲人们需要它（怎么个需要法，别问我），我们并不需要去掉。但在图片替换文字，或者虚线显示不规则的时候，去掉它对于一个产品来说会是更完美的。&lt;/p&gt;
&lt;h3&gt;如何去除虚线框&lt;/h3&gt;
&lt;p&gt;对于如何去除虚线框，有很多人推荐这样写：&lt;/p&gt;
&lt;pre class=&quot;code_bg&quot;&gt;
a:focus, input[type=button] ,input[type=submit] {
        outline:none;
}
&lt;/pre&gt;
&lt;p&gt;从这段代码来看，让我们小分析一下，有两点可能是需要我们注意的：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;去除不全面
&lt;p&gt;IE6/7 并不支持 &lt;code&gt;outline&lt;/code&gt; 属性, firefox 下 &lt;code&gt;input&lt;/code&gt; 的虚线并没有去除&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;去除太多
&lt;p&gt;除 IE6/7 外的所有浏览器的按钮（firefox没去掉）和链接都被去掉虚线框&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;这是看起来矛盾的两个问题。其实不然，因为是两个现同性质的问题。从技术上，这个方法并不全面。从体验上，我想你也知道，我们只是去掉部分不需要的，去掉全部并不友好。所以，上面的写法个人并不推荐。&lt;/p&gt;
&lt;h3&gt;关于潜规则、关于BUG&lt;/h3&gt;
&lt;p class=&quot;idownload&quot;&gt;Demo: &lt;a href=&quot;/file/demo/remove-outline.html&quot; title=&quot;去虚线框 | remove outlin&quot;&gt;去虚线框 | remove outline&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;我能在用 TAB 键的时候不去掉虚线框吗？为什么我的 &lt;code&gt;input&lt;/code&gt; 在 firefox 下没有成功去除虚线框？这些问题被提出的时候，困扰着不少人。因为这里面有潜规则。总结一下，看这个表：&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th width=&quot;30%&quot;&gt;去除的方式&lt;/th&gt;
&lt;th&gt;生效的浏览器&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width=&quot;30%&quot;&gt;&lt;code&gt;outline:none&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;IE8 | Firefox | Webkit |Opera&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;hidefocus&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;IE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;:focus{outline:none;}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;IE8 | Firefox | Webkit | Opera&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;:active{outline:none;}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;同上，但在tab的时候，IE将保留虚线框&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;::-moz-focus-inner{outline:none;}&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Firefox 存着bug，&lt;code&gt;input&lt;/code&gt; 须要去这个伪状态下的边框&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;好吧，不得不承认的是，这些小事，都还真是一门学问，我们要好好学习，好好积累。多用点心，把东西做得更好。&lt;/p&gt;
&lt;p&gt;&lt;hr&gt;&amp;copy;2010 &lt;a href=&quot;http://www.happinesz.cn&quot;&gt;幸福收藏夹&lt;/a&gt;. 版权所有,转载务必注明.&lt;a href=&quot;http://www.happinesz.cn/archives/1292/&quot;&gt;&lt;strong style=&quot;color:#f30;&quot;&gt;招聘: &lt;/strong&gt;支付宝前端开发，此地钱多，人少，速来&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/403827397/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1366/&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/sofish/403827397/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/sofish/403827397/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=7d9f316dfbca9bdbe4f8e769455fb722&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=7d9f316dfbca9bdbe4f8e769455fb722&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=18b310a368f30d38ae83b03c371fb6f3&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=18b310a368f30d38ae83b03c371fb6f3&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=4ccf4a011afa0f93ff0833b57b2fd4fa&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=4ccf4a011afa0f93ff0833b57b2fd4fa&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=40399a185bf87958782c42dab4eaefed&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=40399a185bf87958782c42dab4eaefed&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=044097dc66d6ed71d9f0afbfa7c9edf4&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=044097dc66d6ed71d9f0afbfa7c9edf4&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://www.happinesz.cn/archives/1366/feed/</wfw:commentRss><slash:comments>31</slash:comments><description>话说，对于去除虚线框，即使是一个前端开发工作者，也可能不知道所有的潜规则。因为很多情况下，它是一个视觉上的辅助，并且盲人们需要它（怎么个需要法，别问我），我们并不需要去掉。但在图片替换文字，或者虚线显示不规则的时候，去掉它对于一个产品来说会是更完美的。 如何去除虚线框 对于如何去除虚线框，有很多人推荐这样写： a:focus, input[type=button] ,input[type=submit] { outline:none; } 从这段代码来看，让我们小分析一下，有两点可能是需要我们注意的： 去除不全面 IE6/7 并不支持 outline 属性, firefox 下 input 的虚线并没有去除 去除太多 除 IE6/7 外的所有浏览器的按钮（firefox没去掉）和链接都被去掉虚线框 这是看起来矛盾的两个问题。其实不然，因为是两个现同性质的问题。从技术上，这个方法并不全面。从体验上，我想你也知道，我们只是去掉部分不需要的，去掉全部并不友好。所以，上面的写法个人并不推荐。 关于潜规则、关于BUG Demo: 去虚线框 &amp;#124; remove outline 我能在用 TAB 键的时候不去掉虚线框吗？为什么我的 input 在 firefox 下没有成功去除虚线框？这些问题被提出的时候，困扰着不少人。因为这里面有潜规则。总结一下，看这个表： 去除的方式 生效的浏览器 outline:none IE8 &amp;#124; Firefox &amp;#124; Webkit &amp;#124;Opera hidefocus IE :focus{outline:none;} IE8 &amp;#124; Firefox &amp;#124; Webkit &amp;#124; [...]&lt;img src=&quot;http://www1.feedsky.com/t1/403827397/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1366/&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/sofish/403827397/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/sofish/403827397/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=7d9f316dfbca9bdbe4f8e769455fb722&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=7d9f316dfbca9bdbe4f8e769455fb722&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=18b310a368f30d38ae83b03c371fb6f3&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=18b310a368f30d38ae83b03c371fb6f3&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=4ccf4a011afa0f93ff0833b57b2fd4fa&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=4ccf4a011afa0f93ff0833b57b2fd4fa&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=40399a185bf87958782c42dab4eaefed&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=40399a185bf87958782c42dab4eaefed&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=044097dc66d6ed71d9f0afbfa7c9edf4&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=044097dc66d6ed71d9f0afbfa7c9edf4&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</description><category>前端开发</category><category>Featured</category><category>Design</category><category>虚线框</category><category>outline</category><pubDate>Sun, 04 Jul 2010 17:58:50 +0800</pubDate><author>sofish</author><comments>http://www.happinesz.cn/archives/1366/#comments</comments><guid isPermaLink="false">http://www.happinesz.cn/?p=1366</guid><dc:creator>sofish</dc:creator><fs:srclink>http://www.happinesz.cn/archives/1366/</fs:srclink><fs:srcfeed>http://www.happinesz.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/sofish/~1329654/403827397/1334283</fs:itemid></item><item><title>前端开发值得一看的文章（2）</title><link>http://www.happinesz.cn/archives/1358/</link><content:encoded>&lt;p&gt;看到RSS订阅有5000人了，表示挺欢乐的。然后，想写点东西。想写写关于CSS滤镜的问题，也想写写关于以业务为导向的CSS框架设计，一个没有深入研究过，一个写起来太长，暂时没那么多时间。所以，分享吧，分享吧。大部分都是在twitter上分享过的，觉得对得起标题的：&lt;/p&gt;
&lt;p&gt;&lt;img alt=&quot;订阅5000+&quot; src=&quot;http://www.happinesz.cn/mypics/feeksky-5000.png&quot; /&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;h3&gt;&lt;a class=&quot;entry-title-link&quot; target=&quot;_blank&quot; href=&quot;http://www.zhouqicf.com/frontend/javascript/browser-detector-with-css&quot;&gt;Browser          Detector With CSS&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;文章里说了，这样的小技巧是基于成熟的CSS Hack来的，并不推荐。不过，这样的思路，是我们都应该有的，通向结果的路有千万条，打开你创意的盒子，大胆做吧。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;&lt;a class=&quot;entry-title-link&quot; target=&quot;_blank&quot; href=&quot;http://www.csphp.com/?p=314&quot;&gt;Gmail 对锚点处理的技巧&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Google 和 Yahoo 不用多表扬，大家都知道，很多产品的技术，都成为了最佳实践。比如 Gmail 在锚点的处理上。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;&lt;a class=&quot;entry-title-link&quot; target=&quot;_blank&quot; href=&quot;http://perishablepress.com/press/2010/06/01/wrapping-content/&quot;&gt;Wrapping Long          URLs and Text Content with CSS&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;话说，这里考虑的情况真多，其实，没这个必要。不过，全面的、深入的研究又有什么不好呢，如果你有时间的话！这是小细节，却可以是100%完美用户体验的99%。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;&lt;a class=&quot;entry-title-link&quot; target=&quot;_blank&quot; href=&quot;http://feedproxy.google.com/~r/nettuts/~3/fAlBN1hgsfQ/&quot;&gt;Quick Tip: Using          JSLint&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;JSLint 也不常用，正想找时间熟悉一下。刚好 Nettuts 出了这文章，她的文章总是那么经典，收藏之。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;&lt;a class=&quot;entry-title-link&quot; target=&quot;_blank&quot; href=&quot;http://www.ued163.com/?p=724&quot;&gt;Opera下的max-width BUG&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Opera 总是最麻烦的，要么没 BUG，要么，一个 BUG 就让你想撞豆腐寻死。BTW，Opera 怎么还不想支持 border-radius 呢，即使是出个像要加 -moz -wekit 这样恶心前缀的东西也没关系。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;&lt;a class=&quot;entry-title-link&quot; target=&quot;_blank&quot; href=&quot;http://designshack.co.uk/articles/css/how-to-use-the-new-google-font-api&quot;&gt;How to          Use the New Google Font API&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;@font-face 的时代很快会到来的，能自定义字体，多漂亮，难道不是么。Google 来了，用吧用吧，设计师们，前端们，还有想用的人们。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;&lt;a class=&quot;entry-title-link&quot; target=&quot;_blank&quot; href=&quot;http://www.99css.com/?p=492&quot;&gt;Data URI&amp;amp;MHTML: 用还是不用？&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;对于 Data URI，自己也只是一直在看而已，没深入了解。Yahoo 的某大师站出来解说了，而这篇文章总结了，给了使不使用 Data URI 的答案：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;能使用sprite的地方尽量使用sprite&lt;/li&gt;
&lt;li&gt;不方便使用sprite的时候才使用data uri&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;&lt;a class=&quot;entry-title-link&quot; target=&quot;_blank&quot; href=&quot;http://www.smashingmagazine.com/2010/05/13/css-2-1-and-css-3-help-cheat-sheets-pdf/&quot;&gt;CSS 2.1 and CSS 3 Help Cheat Sheets (PDF)&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;很多东西都比你想象来得快。比如 HTML5 之前是说22年后可能才会出来，但现在多少人已经在尝试，并且得到了可喜的结果，比如 Google wave；CSS 3 也是，连我都在尝试。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;&lt;a class=&quot;entry-title-link&quot; target=&quot;_blank&quot; href=&quot;http://www.baiduux.com/blog/2010/05/05/how_to_control_input_height/&quot;&gt;如何更好地控制input输入框的高度&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;百度用户体验的这篇文章真不错，input 真是个难搞的东西，比如 type=&amp;quot;file&amp;quot; 在 firefox 中并没有 cursor:pointer 的效果。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;&lt;a class=&quot;entry-title-link&quot; target=&quot;_blank&quot; href=&quot;http://item.feedsky.com/~feedsky/planabc/~7049616/371050962/5157647/1/item.html&quot;&gt;各浏览器的并行连接数（同域名）&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;让你知道，HTTP 请求是多奢侈的事，然后再去明白缓存是多重要的事。&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;然后，结束吧，像比武友谊赛一样，点到为止。而且，如果太多了，还能是保证&amp;quot;精华&amp;quot;的度么。&lt;/p&gt;
&lt;p&gt;&lt;hr&gt;&amp;copy;2010 &lt;a href=&quot;http://www.happinesz.cn&quot;&gt;幸福收藏夹&lt;/a&gt;. 版权所有,转载务必注明.&lt;a href=&quot;http://www.happinesz.cn/archives/1292/&quot;&gt;&lt;strong style=&quot;color:#f30;&quot;&gt;招聘: &lt;/strong&gt;支付宝前端开发，此地钱多，人少，速来&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/403827398/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1358/&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/sofish/403827398/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/sofish/403827398/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=d5ce9c672fd83ec84d0074dc5e6f02a4&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=d5ce9c672fd83ec84d0074dc5e6f02a4&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=d1be1cdfdba0b1a73b1dbed40615d255&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=d1be1cdfdba0b1a73b1dbed40615d255&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=4d0b4ef3d29f93bf3b128fe66c8b1de6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=4d0b4ef3d29f93bf3b128fe66c8b1de6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=9bd409465cbd7833b131356c79e12711&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=9bd409465cbd7833b131356c79e12711&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=bc7180de0da1a20f04f080d15993bfe6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=bc7180de0da1a20f04f080d15993bfe6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://www.happinesz.cn/archives/1358/feed/</wfw:commentRss><slash:comments>56</slash:comments><description>看到RSS订阅有5000人了，表示挺欢乐的。然后，想写点东西。想写写关于CSS滤镜的问题，也想写写关于以业务为导向的CSS框架设计，一个没有深入研究过，一个写起来太长，暂时没那么多时间。所以，分享吧，分享吧。大部分都是在twitter上分享过的，觉得对得起标题的： Browser Detector With CSS 文章里说了，这样的小技巧是基于成熟的CSS Hack来的，并不推荐。不过，这样的思路，是我们都应该有的，通向结果的路有千万条，打开你创意的盒子，大胆做吧。 Gmail 对锚点处理的技巧 Google 和 Yahoo 不用多表扬，大家都知道，很多产品的技术，都成为了最佳实践。比如 Gmail 在锚点的处理上。 Wrapping Long URLs and Text Content with CSS 话说，这里考虑的情况真多，其实，没这个必要。不过，全面的、深入的研究又有什么不好呢，如果你有时间的话！这是小细节，却可以是100%完美用户体验的99%。 Quick Tip: Using JSLint JSLint 也不常用，正想找时间熟悉一下。刚好 Nettuts 出了这文章，她的文章总是那么经典，收藏之。 Opera下的max-width BUG Opera 总是最麻烦的，要么没 BUG，要么，一个 BUG 就让你想撞豆腐寻死。BTW，Opera 怎么还不想支持 border-radius 呢，即使是出个像要加 -moz -wekit 这样恶心前缀的东西也没关系。 How to Use the New Google Font API @font-face 的时代很快会到来的，能自定义字体，多漂亮，难道不是么。Google [...]&lt;img src=&quot;http://www1.feedsky.com/t1/403827398/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1358/&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/sofish/403827398/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/sofish/403827398/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=d5ce9c672fd83ec84d0074dc5e6f02a4&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=d5ce9c672fd83ec84d0074dc5e6f02a4&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=d1be1cdfdba0b1a73b1dbed40615d255&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=d1be1cdfdba0b1a73b1dbed40615d255&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=4d0b4ef3d29f93bf3b128fe66c8b1de6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=4d0b4ef3d29f93bf3b128fe66c8b1de6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=9bd409465cbd7833b131356c79e12711&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=9bd409465cbd7833b131356c79e12711&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=bc7180de0da1a20f04f080d15993bfe6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=bc7180de0da1a20f04f080d15993bfe6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</description><category>前端开发</category><category>Reading</category><category>分享</category><pubDate>Thu, 10 Jun 2010 23:56:40 +0800</pubDate><author>sofish</author><comments>http://www.happinesz.cn/archives/1358/#comments</comments><guid isPermaLink="false">http://www.happinesz.cn/?p=1358</guid><dc:creator>sofish</dc:creator><fs:srclink>http://www.happinesz.cn/archives/1358/</fs:srclink><fs:srcfeed>http://www.happinesz.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/sofish/~1329654/403827398/1334283</fs:itemid></item><item><title>长不大的孩子们，六一快乐</title><link>http://www.happinesz.cn/archives/1355/</link><content:encoded>&lt;p&gt;你只是个孩子。不断寻找自己喜欢的东西，不断失去，也一直在获得，有悲有喜。在我眼中，你只是个孩子，像其他孩子一样。你可以成熟，你可以不断超越，你可能已经身为其他人长辈，你可能不再过六一，这依然没有改变，在我眼中，你只是个孩子。有着善良的心，和可能不再是年少一样清澈的笑。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://happinesz.cn/mypics/childrens-day-20100601.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;我想，自己也已经长大了。不过，我想，我和你一样，在某些人眼中，只是个孩子。也会对着某些人，把自己当孩子。今天，还过六一。想起小时候学校会发酸奶和香蕉，想起给了自已很多糖的师姐，想起一去儿童公园玩的大孩子，还有其他很多很多一起过六一的孩子们。&amp;nbsp;&amp;nbsp; 我们都，只是，长不大的孩子。希望自己快乐。也希望同伴们快乐。希望像个孩子般用心生活，用心去期待。&lt;/p&gt;
&lt;p&gt;想说六一快乐！&lt;/p&gt;
&lt;p&gt;============================&amp;nbsp;&lt;/p&gt;
&lt;p&gt;想要写好多文字的。这一写，更多的是在回想。听说，人一回想，就老了。没事，这并不是坏事。这能让我变得更容易有耐心，更淡定。你也一样的。多好。对任何眼中的孩子来说，多好。^,^&amp;#8230; 然后，晚安，晚安，Wishing u a bright Children&amp;#8217;s Day, a brighter smile&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;hr&gt;&amp;copy;2010 &lt;a href=&quot;http://www.happinesz.cn&quot;&gt;幸福收藏夹&lt;/a&gt;. 版权所有,转载务必注明.&lt;a href=&quot;http://www.happinesz.cn/archives/1292/&quot;&gt;&lt;strong style=&quot;color:#f30;&quot;&gt;招聘: &lt;/strong&gt;支付宝前端开发，此地钱多，人少，速来&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/403827399/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1355/&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/sofish/403827399/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/sofish/403827399/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=326b694cc5488dba36d09a5fc499a052&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=326b694cc5488dba36d09a5fc499a052&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=c6f53288edf68ad09a3d58a061e4a482&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=c6f53288edf68ad09a3d58a061e4a482&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=5895b73ea15dcea2a4183d6d2733cf11&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=5895b73ea15dcea2a4183d6d2733cf11&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=3475a4f2c082c4a63a0a4e99c5b53895&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=3475a4f2c082c4a63a0a4e99c5b53895&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=5a3332b81c473ab520b7dc207268cc49&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=5a3332b81c473ab520b7dc207268cc49&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://www.happinesz.cn/archives/1355/feed/</wfw:commentRss><slash:comments>42</slash:comments><description>你只是个孩子。不断寻找自己喜欢的东西，不断失去，也一直在获得，有悲有喜。在我眼中，你只是个孩子，像其他孩子一样。你可以成熟，你可以不断超越，你可能已经身为其他人长辈，你可能不再过六一，这依然没有改变，在我眼中，你只是个孩子。有着善良的心，和可能不再是年少一样清澈的笑。 我想，自己也已经长大了。不过，我想，我和你一样，在某些人眼中，只是个孩子。也会对着某些人，把自己当孩子。今天，还过六一。想起小时候学校会发酸奶和香蕉，想起给了自已很多糖的师姐，想起一去儿童公园玩的大孩子，还有其他很多很多一起过六一的孩子们。&amp;#160;&amp;#160; 我们都，只是，长不大的孩子。希望自己快乐。也希望同伴们快乐。希望像个孩子般用心生活，用心去期待。 想说六一快乐！ ============================&amp;#160; 想要写好多文字的。这一写，更多的是在回想。听说，人一回想，就老了。没事，这并不是坏事。这能让我变得更容易有耐心，更淡定。你也一样的。多好。对任何眼中的孩子来说，多好。^,^&amp;#8230; 然后，晚安，晚安，Wishing u a bright Children&amp;#8217;s Day, a brighter smile&amp;#8230; &amp;#169;2010 幸福收藏夹. 版权所有,转载务必注明.招聘: 支付宝前端开发，此地钱多，人少，速来&lt;img src=&quot;http://www1.feedsky.com/t1/403827399/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1355/&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/sofish/403827399/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/sofish/403827399/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=326b694cc5488dba36d09a5fc499a052&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=326b694cc5488dba36d09a5fc499a052&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=c6f53288edf68ad09a3d58a061e4a482&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=c6f53288edf68ad09a3d58a061e4a482&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=5895b73ea15dcea2a4183d6d2733cf11&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=5895b73ea15dcea2a4183d6d2733cf11&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=3475a4f2c082c4a63a0a4e99c5b53895&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=3475a4f2c082c4a63a0a4e99c5b53895&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=5a3332b81c473ab520b7dc207268cc49&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=5a3332b81c473ab520b7dc207268cc49&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</description><category>六一</category><category>孩子</category><category>儿童节</category><category>乱说乱写</category><pubDate>Tue, 01 Jun 2010 00:52:59 +0800</pubDate><author>sofish</author><comments>http://www.happinesz.cn/archives/1355/#comments</comments><guid isPermaLink="false">http://www.happinesz.cn/?p=1355</guid><dc:creator>sofish</dc:creator><fs:srclink>http://www.happinesz.cn/archives/1355/</fs:srclink><fs:srcfeed>http://www.happinesz.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/sofish/~1329654/403827399/1334283</fs:itemid></item><item><title>由 Tahoma 引起的 IE8 Bug (送个IE8 hack)</title><link>http://www.happinesz.cn/archives/1350/</link><content:encoded>&lt;p&gt;字体真是个麻烦的东西，然后又是个重要的东西。为以更方的解决字体问题，就像上次推荐的《&lt;a href=&quot;http://lifesinger.org/blog/2009/11/web-default-font/&quot;&gt;再谈 Web  默认字体&lt;/a&gt;》，为了Pixel Perfect，我们不断纠结。像支付宝在CSS Reset中是这样写的：&lt;/p&gt;
&lt;pre class=&quot;code_bg&quot;&gt;
&lt;ol class=&quot;dp-css&quot;&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span&gt;body{&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;font&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;12px&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;Tahoma&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;Helvetica&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;Arial&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;'宋体'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;sans-serif&lt;/span&gt;&lt;span&gt;}&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/pre&gt;
&lt;p&gt;而淘宝这样写：&lt;/p&gt;
&lt;pre class=&quot;code_bg&quot;&gt;
&lt;ol class=&quot;dp-css&quot;&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span&gt;body,&amp;nbsp;button,&amp;nbsp;input,&amp;nbsp;select,&amp;nbsp;textarea&amp;nbsp;{&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;font&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;12px&lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;1.5&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;tahoma&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;arial&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;'宋体'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;sans-serif&lt;/span&gt;&lt;span&gt;;}&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/pre&gt;
&lt;p&gt;个人偏向于淘宝的写法，显然，button/input/select/textarea的字体都是要重设才会显示正常的。这里并不是为了讨论这个，而是这里面都有  tohama 这种字体，它是今天的主角。因为字体显示好，也因为导致 BUG 而被搬上台面。让我们来先看一个Demo:&lt;/p&gt;
&lt;p&gt;Here: &lt;a href=&quot;http://happinesz.cn/file/demo/ie8-tahoma-bug/&quot;&gt;IE8 Tahoma  Font-family bug&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;如果你是从 IE8 打开，将会看到第一个按钮有错位。如标题所说，你懂的，这就是 Tahoma 给我们带来的问题。而解决方案很简单，就是避用 tahoma  字体，其他的随便。比如：&lt;/p&gt;
&lt;pre class=&quot;code_bg&quot;&gt;
&lt;ol class=&quot;dp-css&quot;&gt;
&lt;li class=&quot;alt&quot;&gt;&lt;span&gt;&lt;span&gt;body,&amp;nbsp;button,&amp;nbsp;input,&amp;nbsp;select,&amp;nbsp;textarea&amp;nbsp;{&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;font&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;12px&lt;/span&gt;&lt;span&gt;/&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;1.5&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;arial&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;'宋体'&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span class=&quot;value&quot;&gt;sans-serif&lt;/span&gt;&lt;span&gt;;}&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/pre&gt;
&lt;p&gt;在支持没有那么完美的状况下，这样的解决方式可以说是完美的。即使你像我一样也&lt;a href=&quot;../../../../../archives/1331/&quot;&gt;有一套 Hack 兼容方案&lt;/a&gt;，还是不推荐使用暴力方式，我们的目标是、也应该是更有效、更优雅。&lt;/p&gt;
&lt;p&gt;然后，其实 hack IE 8的时候，可以考虑 &lt;code&gt;selector{property:value\0;} &lt;/code&gt;这样的方法来，因为这是  IE8+ 独有的方法。Hmmm&amp;#8230; 多好，虽然有点暴力。最后，推荐一下&lt;a href=&quot;http://nihaoku.cn/&quot;&gt;鸽子&lt;/a&gt;工友。解决这个 Bug，还得归功于他。&lt;/p&gt;
&lt;p&gt;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8211;&lt;/p&gt;
&lt;p&gt;经过一条完美分割线从火星来到地球，囧，刚刚还测试了arial放在前面是可以的，而且早上测试过，不过，事实证明测试要更小心，要多次，不然可能刷出来的是缓存。事实的解决方法似乎是这样的：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;有中文和英文混排的时候，怎么写都无所谓；&lt;/li&gt;
&lt;li&gt;只有中文的时候，放在前面最好的系统所拥有的字体，或者一种系统没有的字体来让他显示默认字体；&lt;/li&gt;
&lt;li&gt;全英文就更是所所谓了&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;多谢帮助寻找真相的 &lt;a href=&quot;http://lync.in/&quot;&gt;Justice&lt;/a&gt; 和 默默同学，一个问到底，一个提供一个非中文的 IE8 显示效果图片。&lt;/p&gt;
&lt;p&gt;&lt;hr&gt;&amp;copy;2010 &lt;a href=&quot;http://www.happinesz.cn&quot;&gt;幸福收藏夹&lt;/a&gt;. 版权所有,转载务必注明.&lt;a href=&quot;http://www.happinesz.cn/archives/1292/&quot;&gt;&lt;strong style=&quot;color:#f30;&quot;&gt;招聘: &lt;/strong&gt;支付宝前端开发，此地钱多，人少，速来&lt;/a&gt;&lt;/p&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/403827400/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1350/&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/sofish/403827400/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/sofish/403827400/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=4bc8e6c8026787bf7e6061b125d6578d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=4bc8e6c8026787bf7e6061b125d6578d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=ddeda20ccc0243a5187e6de8efe744c8&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=ddeda20ccc0243a5187e6de8efe744c8&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=260a3c4a353ddbc76ca0594a7882f661&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=260a3c4a353ddbc76ca0594a7882f661&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=310f5f4086d6a9ed36ad54b5504e0fdd&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=310f5f4086d6a9ed36ad54b5504e0fdd&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=6f489e29f6873fdc55d2d683518506c8&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=6f489e29f6873fdc55d2d683518506c8&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded><wfw:commentRss>http://www.happinesz.cn/archives/1350/feed/</wfw:commentRss><slash:comments>61</slash:comments><description>字体真是个麻烦的东西，然后又是个重要的东西。为以更方的解决字体问题，就像上次推荐的《再谈 Web 默认字体》，为了Pixel Perfect，我们不断纠结。像支付宝在CSS Reset中是这样写的： body{font:12px&amp;#160;Tahoma,Helvetica,Arial,'宋体',sans-serif}&amp;#160; 而淘宝这样写： body,&amp;#160;button,&amp;#160;input,&amp;#160;select,&amp;#160;textarea&amp;#160;{font:12px/1.5&amp;#160;tahoma,arial,'宋体',sans-serif;}&amp;#160; 个人偏向于淘宝的写法，显然，button/input/select/textarea的字体都是要重设才会显示正常的。这里并不是为了讨论这个，而是这里面都有 tohama 这种字体，它是今天的主角。因为字体显示好，也因为导致 BUG 而被搬上台面。让我们来先看一个Demo: Here: IE8 Tahoma Font-family bug 如果你是从 IE8 打开，将会看到第一个按钮有错位。如标题所说，你懂的，这就是 Tahoma 给我们带来的问题。而解决方案很简单，就是避用 tahoma 字体，其他的随便。比如： body,&amp;#160;button,&amp;#160;input,&amp;#160;select,&amp;#160;textarea&amp;#160;{font:12px/1.5&amp;#160;arial,'宋体',sans-serif;}&amp;#160; 在支持没有那么完美的状况下，这样的解决方式可以说是完美的。即使你像我一样也有一套 Hack 兼容方案，还是不推荐使用暴力方式，我们的目标是、也应该是更有效、更优雅。 然后，其实 hack IE 8的时候，可以考虑 selector{property:value\0;} 这样的方法来，因为这是 IE8+ 独有的方法。Hmmm&amp;#8230; 多好，虽然有点暴力。最后，推荐一下鸽子工友。解决这个 Bug，还得归功于他。 &amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8212;&amp;#8211; 经过一条完美分割线从火星来到地球，囧，刚刚还测试了arial放在前面是可以的，而且早上测试过，不过，事实证明测试要更小心，要多次，不然可能刷出来的是缓存。事实的解决方法似乎是这样的： 有中文和英文混排的时候，怎么写都无所谓； 只有中文的时候，放在前面最好的系统所拥有的字体，或者一种系统没有的字体来让他显示默认字体； 全英文就更是所所谓了 多谢帮助寻找真相的 Justice 和 默默同学，一个问到底，一个提供一个非中文的 IE8 显示效果图片。 &amp;#169;2010 幸福收藏夹. 版权所有,转载务必注明.招聘: 支付宝前端开发，此地钱多，人少，速来&lt;img src=&quot;http://www1.feedsky.com/t1/403827400/sofish/feedsky/s.gif?r=http://www.happinesz.cn/archives/1350/&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/sofish/403827400/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/sofish/403827400/art01.gif&quot; onerror=&quot;this.style.display='none'&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class=&quot;fsflare&quot;&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=4bc8e6c8026787bf7e6061b125d6578d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=4bc8e6c8026787bf7e6061b125d6578d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=ddeda20ccc0243a5187e6de8efe744c8&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=ddeda20ccc0243a5187e6de8efe744c8&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=260a3c4a353ddbc76ca0594a7882f661&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=260a3c4a353ddbc76ca0594a7882f661&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=310f5f4086d6a9ed36ad54b5504e0fdd&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=310f5f4086d6a9ed36ad54b5504e0fdd&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/sofish?a=6f489e29f6873fdc55d2d683518506c8&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/sofish?i=6f489e29f6873fdc55d2d683518506c8&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;/p&gt;</description><category>字体</category><category>Design</category><category>css</category><pubDate>Thu, 20 May 2010 21:22:12 +0800</pubDate><author>sofish</author><comments>http://www.happinesz.cn/archives/1350/#comments</comments><guid isPermaLink="false">http://www.happinesz.cn/?p=1350</guid><dc:creator>sofish</dc:creator><fs:srclink>http://www.happinesz.cn/archives/1350/</fs:srclink><fs:srcfeed>http://www.happinesz.cn/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/sofish/~1329654/403827400/1334283</fs:itemid></item></channel></rss>