<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Freetao&#039;s Blog &#187; HTML</title>
	<atom:link href="http://Kainy.CN/category/study/material/html-material/feed/" rel="self" type="application/rss+xml" />
	<link>http://Kainy.CN</link>
	<description>关♥生活，关注互联网.</description>
	<lastBuildDate>Tue, 17 Apr 2012 14:03:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>用HTML5无罪，挺CSS3有理</title>
		<link>http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/</link>
		<comments>http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 15:34:45 +0000</pubDate>
		<dc:creator>Kainy</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[普及]]></category>
		<category><![CDATA[标准]]></category>

		<guid isPermaLink="false">http://Kainy.CN/?p=1816</guid>
		<description><![CDATA[新特性无法很好地在现有浏览器中展现，是阻碍网页设计者采用最新技术的最大因素。除非你能够接受自己设计的网页在不同浏览器中有不同的外观，才有可能在现有环境下开始使用HTML5和CSS3。 虽然HTML5还 停留在草案阶段；然而换一种思路，如果你在等待CSS3的“完成”，也许将无法在有生之年看到那天的到来——要知道CSS2至今都未能为所有浏览器所支持！ 本文作者的观点是：应该让每个用户获得效益最大化。对于那些使用前沿浏览器的用户，我们有什么理由不充分发挥哪些浏览器所提供的新特性？（呵呵，貌似和我《比较拉风的特效尝试》中的观点相似，渐进增强与平稳退化）. 说是这样说，但要推进新技术普及，比较务实的做法还是提供平滑过渡的方法，故文章大部分内容是关于HTML5和css3跨浏览器降级兼容方案，有兴趣者可继续往下看： 以下内容来自：http://net.tutsplus.com/tutorials/html-css-techniques/html5-and-css3-without-guilt Not every HTML5 or CSS3 feature has widespread browser support, naturally. To compensate for this, enterprising developers have created a number of tools to let you use these technologies today, without leaving behind users who still live in the stone age. Prologue HTML5 Semantic Elements The good news is [...]]]></description>
			<content:encoded><![CDATA[<p>新特性无法很好地在现有浏览器中展现，是阻碍网页设计者采用最新技术的最大因素。除非你能够接受自己设计的网页在不同浏览器中有不同的外观，才有可能在现有环境下开始使用HTML5和CSS3。</p>
<p>虽然HTML5还 停留在草案阶段；然而换一种思路，如果你在等待CSS3的“完成”，也许将无法在有生之年看到那天的到来——要知道CSS2至今都未能为所有浏览器所支持！</p>
<p>本文作者的观点是：应该让每个用户获得效益最大化。对于那些使用前沿浏览器的用户，我们有什么理由不充分发挥哪些浏览器所提供的新特性？（呵呵，貌似和我《<a href="http://kainy.cn/2010/11/kaistique/" target="_blank">比较拉风的特效尝试</a>》中的观点相似，<strong>渐进增强</strong>与<strong>平稳退化</strong>）.</p>
<p>说是这样说，但要推进新技术普及，比较务实的做法还是提供平滑过渡的方法，故文章大部分内容是关于HTML5和css3跨浏览器降级兼容方案，有兴趣者可继续往下看：<span id="more-1816"></span></p>
<p>以下内容来自：http://net.tutsplus.com/tutorials/html-css-techniques/html5-and-css3-without-guilt</p>
<p>Not every HTML5 or CSS3 feature has widespread browser support, naturally. To compensate for this, enterprising developers have created a number of tools to let you use these technologies today, without leaving behind users who still live in the stone age.</p>
<hr />
<h2>Prologue</h2>
<h3>HTML5 Semantic Elements</h3>
<p>The good news is that, except for Internet Explorer, you can create more semantic markup by using the new HTML5 elements — even in browsers which don’t officially support them. Just remember to set the correct display mode: <code>block</code>. The following snippet should reference all necessary elements:</p>
<pre>article,aside,details,figcaption,figure,
footer,header,hgroup,menu,nav,section {
   display: block;
}</pre>
<h3>IE Conditional Comments</h3>
<p>Implementing many of the solutions in this tutorial involves including some JavaScript for specific Internet Explorer releases. Here is a quick overview: the test expression is enclosed in square brackets. We can check for specific versions or versions above or below a stated version. <code>lt</code> and <code>gt</code> mean <em>lower than </em>and <em>greater than</em>, respectively, while <code>lte</code> and <code>gte</code> mean <em>lower than or equal to</em> and <em>greater than or equal to</em>.</p>
<p>Here are some quick examples:</p>
<pre>[if IE 6]</pre>
<p>Checks if the browser is Internet Explorer 6.</p>
<pre>[if gt IE 6]</pre>
<p>Checks for a version of Internet Explorer <em>greater</em> than 6.</p>
<hr />
<h2>Tool 1: HTML5 Shiv</h2>
<p>In anything IE, excluding the most recent version (IE9), you cannot apply styles to elements that the browser does not recognize. Your spiffy, new HTML5 elements, in all their glory, are impervious to CSS rules in that environment. This is where Remy Sharp’s <a href="http://code.google.com/p/html5shiv/" target="_blank">html5shiv</a> (sometimes called html5 shim) comes to the rescue. Simply include it in your page’s <code>&lt;head&gt;</code> section and you will be able to style the new HTML5 elements perfectly.</p>
<pre>&lt;!--[if lt IE 9]&gt;

&lt;script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;
&lt;![endif]--&gt;</pre>
<p>Notice how the conditional comments only load the html5shiv code on the condition that the version of Internet Explorer is lower than 9. Other browsers, such as Firefox and Chrome, will also ignore this tag and won’t execute the script, thus saving bandwidth.</p>
<p>html5 shiv is based on a simple workaround: it directs IE to create the elements with JavaScript (they don’t even need to be inserted into the DOM).</p>
<pre>document.createElement('header');</pre>
<p>At this point, they can be styled normally. Additionally, the more recent versions integrate <a href="http://www.iecss.com/print-protector/" target="_blank">IE Print Protector</a>, which fixes a bug where the HTML5 elements disappear when printing the page..</p>
<hr />
<h2>Tool 2: Modernizr</h2>
<blockquote><p>Modernizr allows you to provide “backup” styling in browsers that do not support certain HTML5 and CSS3 features.</p></blockquote>
<p><a href="http://www.modernizr.com/" target="_blank">Modernizr</a> is perhaps the best known of these tools, but it is also fairly misunderstood (the name does not help). Take a deep breath: contrary to popular misconception, Modernizr does <em>not</em> enable HTML5 and CSS3 functionalities in browsers that do not support them (although it <em>does</em> include html5shiv to allow you to use HTML5 elements in IE &lt; 9).</p>
<blockquote><p>Apart from the html5shiv functionality, Modernizr does one thing and one thing only: it runs a series of feature detection tests when loaded, and then inserts the results into the <code>class</code> attribute of the <code>&lt;html&gt;</code> tag.</p></blockquote>
<p>Modernizr’s primary purpose is to allow you to offer “backup” styling in browsers that do not support certain HTML5 and CSS3 features. This is somewhat different than traditional graceful degradation, where we use the same CSS styling in all browsers, and then engineer it so that, when specific capabilities are missing, the result is still acceptable.</p>
<p>Now for an example of how Modernizr operates: if a browser supports <code>border-radius</code> and the <code>column-count</code>property, the following classes will be applied:</p>
<pre>     &lt;html&gt;</pre>
<p>On the other hand, if the same properties are not supported — say, in IE7 — you will find:</p>
<pre>     &lt;html&gt;</pre>
<p>At this point, you can then use these classes to apply unique styling in browsers with different capabilities. For instance, if you want to apply a different style to a paragraph, depending on whether CSS columns are supported, you can do:</p>
<pre>  .csscolumns p {
    /* Style when columns available */
   }

  .no-csscolumns p {
    /* Style when columns not available */
   }</pre>
<p>If a browser does not support columns, the <code>.csscolumns</code> class will not be present in the body, and the browser will never have a chance to apply the rule which uses it.</p>
<p>Some might object that this brings us back to the old times of building a different site for each browser. It is true that nothing stops you from writing so many style declarations that use advanced CSS3 features that your stylesheet becomes virtually empty when these rules cannot be applied.</p>
<p>If you want to use Modernizr in a way that makes sense, you must rely on your design talent to conceive alternative styles that don’t break the design and don’t require throwing away the rest of the stylesheet. For example, you might try replacing drop shadows on letters, when they are not available, with a bold typeface or transparency with a different color.</p>
<h3>Usage</h3>
<p>To use Modernizr, include the minified file, and apply a class of <code>no-js</code> to the <code>&lt;html&gt;</code> element. This last precaution allows you to provide styles for when JavaScript is completely deactivated; obviously, in those cases, Modernizr can’t help you at all. If JavaScript is enabled, Modernizr will kick in and replace the <code>no-js</code> with the results of its feature detection operations.</p>
<pre>&lt;head&gt;
&lt;script src="modernizr-1.x.min.js" type="text/javascript"&gt;&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;
. . . . .
&lt;/body&gt;</pre>
<p>If you’re willing to accept that all websites needn’t display identically across all browsers, you’ll find that Modernizr is an essential tool in your web dev belt!</p>
<hr />
<h2>Tool 3: IE 6 Universal CSS</h2>
<p>On the same note, designer <a href="http://www.stuffandnonsense.co.uk/blog" target="_blank">Andy Clarke</a> has devised an <a href="http://code.google.com/p/universal-ie6-css/" target="_blank">elegant solution</a> for solving IE6′s lack of standard compliance. Called “Universal IE6″, this stylesheet focuses exclusively on typography. The key is to use conditional comments to hide all other stylesheets from IE 6.</p>
<pre>&lt;!--[if ! lte IE 6]&gt;&lt;!--&gt;
/* Stylesheets for browsers other than Internet Explorer 6 */
&lt;!--&lt;![endif]--&gt;

&lt;!--[if lte IE 6]&gt;
&lt;link rel="stylesheet" href="http://universal-ie6-css.googlecode.com/files/ie6.1.1.css" media="screen, projection"&gt;
&lt;![endif]--&gt;</pre>
<p><strong>Important Note</strong>: Remember to include the latest version, as instructions for older ones are still floating around the web. The final results looks like so:</p>
<p><a href="http://a.kainy.cn/201012/universal_IE6.jpg"><img class="shadow" src="http://a.kainy.cn/201012/universal_IE6.jpg" alt="Universal IE6 CSS sample result" width="400" height="370" /></a></p>
<blockquote><p>You have zero work to do to support IE 6 on a new site.</p></blockquote>
<p>This approach has a pretty obvious advantage compared to classical alternate stylesheets: you have zero work to do to support IE 6 on a new site. The disadvantage, of course, is that the site displays very little of your design. Further, your HTML foundations also has to be rock-solid, in order for the page to be usable even with most styling disabled.</p>
<p>Note that Universal IE6 CSS does not include any styling for HTML5-only elements such as <code>&lt;section&gt;</code> or<code>&lt;footer&gt;</code>. It is not a problem unless you are relying on those elements exclusively to obtain block level display for some parts of the page. Generally, you would always wrap your text also at least in a paragraph or list element.</p>
<p>This solution is clearly not for everybody, and you might find clients who flat out disagree with their site looking<em>broken</em>when viewed in IE6.</p>
<blockquote><p>You might also argue that, at this point, you can just as well drop IE6 support entirely. Andy Clarke has summarized <a href="http://forabeautifulweb.com/blog/about/universal_internet_explorer_6_css" target="_blank">his answers to these objections here</a>.</p></blockquote>
<p>This approach works best for content-centric sites, and catastrophically for web applications; but then again, building a modern web application to work well on IE 6 is a challenge in itself.</p>
<hr />
<h2>Tool 4: Selectivizr</h2>
<p><a href="http://a.kainy.cn/201012/1292601103-jquerySelectivizr.png"><img class="shadow" src="http://a.kainy.cn/201012/1292601103-jquerySelectivizr.png" alt="Selectivizr Support" width="260" height="484" /></a></p>
<p>Our next champion is a JavaScript utility which aims to introduce new capabilities into older browsers (well, actually just IE 6-8): <a href="http://selectivizr.com/" target="_blank">Selectivizr</a> works in tandem with other JavaScript libraries such as jQuery, Dojo or MooTools to add support for a range of more advanced CSS selectors.</p>
<p>I’ve listed a few below, though note that the full list of capabilities will be dependent upon your preferred JavaScript library.</p>
<ul>
<li><code>:hover</code></li>
<li><code>:focus</code></li>
<li><code>:first-child</code></li>
<li><code>:last-child</code></li>
<li><code>:first-line</code></li>
<li><code>:first-letter</code></li>
</ul>
<p>To use Selectivizr, download it from their home page and include it within your <code>&lt;head&gt;</code> section, together with one of the support libraries. Here is an example with jQuery:</p>
<pre>&lt;script src="jquery-1.4.4.min.js"&gt;&lt;/script&gt;
&lt;!--[if lte IE 8]&gt;
  &lt;script src="selectivizr.js"&gt;&lt;/script&gt;

 &lt;![endif]--&gt;</pre>
<blockquote><p>Selectivizr works in tandem with other JavaScript libraries to provide CSS3 support for IE 6-8.</p></blockquote>
<p>This point is very important: Selectivizr cannot work alone; it requires your preferred library to be present. Luckily, it is compatible with the huge majority of popular JavaScript libraries. Chances are, if you are using JavaScript on your site, you probably have an appropriate library already included.</p>
<h3>DOMAssisant</h3>
<p>On the other hand, if you won’t be using a library as well, an alternative solution is to use the light weight<a href="http://www.domassistant.com/" target="_blank">DOMAssistant</a>, although you might still prefer your usual JavaScript library for greater ease in managing files.</p>
<p>Be careful though, as the precise selectors that Selectivizr makes available depends on which supporting library is chosen. According to the home page, right now the greatest range of selectors is available with MooTools, while unfortunately jQuery makes the least number of selectors available. It must also be said that some of the selectors that are not available with jQuery are quite exotic and rarely used in the real world usage. <strong><a href="http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/" target="_blank">Refer to our “30 CSS Selectors you Must Memorize”</a> article for a full list of selectors.</strong></p>
<p>As it happens, with most JavaScript solutions for CSS woes, some restrictions apply.</p>
<ul>
<li>For Selectivizr to perform its magic, stylesheets must be loaded from the same domain as HTML pages. This rules out, for instance, hosting stylesheets and other assets on a CDN.</li>
<li>You are forced to use the <code>&lt;link&gt;</code> element to include your stylesheets (as opposed to <code>&lt;style&gt;</code>).</li>
<li>Selectivizr does not update styling if the DOM changes after the page has finished loading (if you add elements in response to a user action, for instance).</li>
</ul>
<hr />
<h2>Tool 5: CSS3Pie</h2>
<p><a href="http://css3pie.com/" target="_blank">CSS3Pie</a> also enhances Internet Explorer’s [6-8] capabilities, but in a much more native way, as it effectively enables the use of a number of spiffy CSS3 properties, like<code> border-radius, linear-gradient, box-shadow, border-image</code> as well as adds support for multiple backgrounds. Use CSS3Pie and say goodbye to manually sliced and positioned rounded corners.</p>
<blockquote><p>CSS3Pie: say goodbye to manually sliced and positioned rounded corners.</p></blockquote>
<p>The way it works is by leveraging little known proprietary Microsoft extensions: the CSS <code>behavior</code> property and HTML component files (<a href="http://msdn.microsoft.com/en-us/library/ms532146%28v=VS.85%29.aspx" target="_blank">official documentation</a>). This extension allows you to attach JavaScript to certain HTML elements using CSS. The JavaScript is included together with some Microsoft proprietary tags, in <code>.htc</code> files which are referenced within the style rules.</p>
<blockquote><p>For this reason alone, many developers might argue that you shouldn’t use CSS3Pie. Internet Explorer’s proprietary tags are performance heavy and produce less-attractive output.</p></blockquote>
<p>Why doesn’t CSS3Pie use plain JavaScript? Well there is a <a href="http://css3pie.com/documentation/pie-js/" target="_blank">JS-specific version</a>, though the team advises against its usage, due to the fact that the JavaScript blocks the parsing of the page.</p>
<p>With the current <code>.htc</code> solution, implementation is quite simple: you only need to upload a single file from the CSS3Pie distribution, <code>PIE.htc</code>, to your server. Afterward, every time you use one of the supported CSS3 properties, add the code below:</p>
<pre>behavior: url(path/to/PIE.htc);</pre>
<p>Above, <code>path/to/PIE.htc</code> is the path, relative to the HTML file being served; <em>not</em> the stylesheet.</p>
<h3>Server Side Instructions</h3>
<p>Of course, CSS3Pie can only do its magic in Internet Explorer. It also needs a bit of care and feeding on the server side:</p>
<ul>
<li>You should ensure that the <code>PIE.htc</code> file is served with a <code>text/x-component</code> content type. The distribution includes a PHP script that can take care of this if you are not allowed to modify your server configuration, for instance on a shared host.</li>
<li><code>PIE.htc</code> can also trigger ActiveX warnings, usually when you are testing it on your localhost. This last problem requires the <a href="http://msdn.microsoft.com/en-us/library/ms537628%28VS.85%29.aspx" target="_blank">Mark of the Web</a> workaround to be solved.</li>
</ul>
<p>CSS3Pie is still, at the time of this writing, in beta mode – as there are still some <a href="http://css3pie.com/documentation/known-issues/" target="_blank">kinks to be ironed out</a>.</p>
<hr />
<h2>Tool 6: HTML5 Boilerplate</h2>
<blockquote><p>HTML5 Boilerplate goes much further than your standard starter templates.</p></blockquote>
<p><a href="http://html5boilerplate.com/" target="_blank">HTML5 Boilerplate</a> can be described as a set of templates to help you get started building modern HTML5 websites as rapidly as possible. But HTML5 Boilerplate goes much further than your standard starter templates.</p>
<p>For instance, it bundles the latest version of Modernizr (same creator), and the HTML even links to the latest Google-hosted jQuery, Yahoo profiler and Google Analytics scripts for you. The CSS contains the usual reset rules, but also a wealth of @media queries to get you started with <a href="http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-a-crash-course-in-css-media-queries/" target="_blank">responsive web design</a> targeting mobile devices.</p>
<h3>Configuration Files</h3>
<p>The most unique feature is that, on top of client configuration, you also get the server side: configuration files for Apache and Nginx. This allows you to maximize download speeds and optimize HTML5 video delivery. In particular, the <em>.htaccess</em> files for Apache might be very convenient to drop into a shared hosting account, as often things like <code>gzip</code> compression and <code>expires</code> are not active by default.</p>
<h3>Does it do too Much?</h3>
<p>Some people might argue that HTML5 Boilerplate takes a bit too many decisions for them (hell, the Apache configuration even automatically strips www. in front of the domain name!) or that it is somewhat Google-centric, though, nonetheless, it’s always interesting to study the files and find what problems the authors have anticipated.</p>
<p><strong>Further, you’re certainly encouraged to break it down for your personal needs. This is simply a boilerplate to get you started.</strong></p>
<h3>A Visual Overview</h3>
<p>If you want a detailed breakdown of everything HTML5 Boilerplate includes, Paul Irish recorded an exclusive<a href="http://net.tutsplus.com/tutorials/html-css-techniques/the-official-guide-to-html5-boilerplate/" target="_blank">screencast</a> for Nettuts+.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="413" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://blip.tv/play/gcMVgffAOgI.m4v" /><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="600" height="413" src="http://blip.tv/play/gcMVgffAOgI.m4v" allowfullscreen="true" wmode="transparent"></embed></object>(墙外)</p>
<p>A fully commented version is available at <a href="http://www.html5boilerplate.com/" target="_blank">html5boilerplate.com</a>.</p>
<hr />
<h2>Epilogue: Be Bold</h2>
<p>Often, the fear of implementing features which do not enjoy full browser support discourages designers from adopting the latest technologies. While the demographics of your audience has to be considered carefully, as well as your client’s wishes, if you accept that sites don’t have to look the same in all browsers, it is possible to make full use today of HTML5 and CSS3.</p>
<p>Think of it this way: if you wait until CSS3 “is complete,” you’ll be waiting forever. CSS2 isn’t even fully supported across all browsers yet! The guiding principle here is that every user should get the most bang for his buck: if he is using a bleeding edge browser, why not take advantage of all the features that browser provides?</p>
<p>Let us know what you think about these issues in the comments. Thank you so much for reading!</p>
<hr /><h4>读者评论：</h4><ol><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月19日</a>, <strong>标志设计</strong>：都是英文的</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月20日</a>, <strong>苏扬</strong>：大家都在力挺这个，都看你写了很多这个了！</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月20日</a>, <strong>Kainy</strong>：呵呵，不知不觉就唐僧了。</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月21日</a>, <strong>wmtimes</strong>：现在这类的文章开始慢慢多起来了。</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月21日</a>, <strong>柳城</strong>：这模板倒是不错...</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月21日</a>, <strong>Kainy</strong>：呵呵，谢谢，欢迎观临本站.</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月25日</a>, <strong>Firm</strong>：HTML5 最近N多同事都在研究。。</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月26日</a>, <strong>学夫子</strong>：都是好东西，哈哈
只是你下面的英文是根本不懂</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月27日</a>, <strong>小羿</strong>：html5 没研究过</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月28日</a>, <strong>diyivod</strong>：渐进增强与平稳退化
在发展中前进</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月28日</a>, <strong>spray gun</strong>：呵呵，html5被炒作的上了天。。</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月29日</a>, <strong>赢在滕州</strong>：圣诞快乐...呵呵.好像已经过去了..元旦快乐...</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月30日</a>, <strong>朗朗</strong>：朗朗来访,留脚印.祝你新年快乐..新写博文."关于淘宝商城,您不知道的那些事"</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2010年12月30日</a>, <strong>重庆时时彩</strong>：基本对程序一无所知，努力学习中</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2011年03月16日</a>, <strong>插头</strong>：好文章~实用~~

另外不知能否帮忙解释一下：
Modernizr’s primary purpose is to allow you to offer “backup” styling in browsers that do not support certain HTML5 and CSS3 features. This is somewhat different than traditional graceful degradation, where we use the same CSS styling in all browsers, and then engineer it so that, when specific capabilities are missing, the result is still acceptable.

= =没理解啊。。。</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2011年03月16日</a>, <strong>Kainy</strong>：额这就是解释Modernizr作用的撒。。</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2011年03月18日</a>, <strong>插头</strong>：The good news is that, **except for Internet Explorer**, you can create more semantic markup by using the new HTML5 elements — even in browsers which don’t officially support them. 

请问这个方法是不适用于IE么？？</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2011年03月18日</a>, <strong>Kainy</strong>：abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video  bala.bala... 这些HTML5标签IE都不兼容的。</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2011年08月25日</a>, <strong>周震宇</strong>：HTML5不熟，不会用。英文的，我看起来还比较辛苦！</li><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/">2011年11月13日</a>, <strong>长春回收家具</strong>：楼主很有才，支持一下！</li></ol><h4>相关文章：</h4><ol><li><a href="http://Kainy.CN/2010/02/a-css3-html5-one-page-website-template/" rel="bookmark" title="Permanent Link: 纯CSS3和HTML5编码实现的网页演示">纯CSS3和HTML5编码实现的网页演示</a></li><li><a href="http://Kainy.CN/2011/01/%e7%a0%b4%e4%b8%8e%e7%ab%8b/" rel="bookmark" title="Permanent Link: 破与立">破与立</a></li><li><a href="http://Kainy.CN/2010/03/css3-%e5%9b%be%e7%89%87%e7%9b%b8%e5%86%8c%e4%bb%a3%e7%a0%81%e4%b8%8b%e8%bd%bd/" rel="bookmark" title="Permanent Link: CSS3 图片相册代码下载">CSS3 图片相册代码下载</a></li><li><a href="http://Kainy.CN/2010/09/22-best-and-latest-jquery-demo/" rel="bookmark" title="Permanent Link: 最新20佳jQuery演示">最新20佳jQuery演示</a></li><li><a href="http://Kainy.CN/2010/03/%e7%94%a8html5%e8%ae%be%e8%ae%a1%e7%9a%84iphone%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e9%85%b7%e7%ab%99/" rel="bookmark" title="Permanent Link: 用HTML5设计的iPhone应用程序酷站">用HTML5设计的iPhone应用程序酷站</a></li></ol><span>分享本文到：<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/"><img src="http://a.kainy.cn/201011/xianguo.png" title="分享到鲜果订阅" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/"><img src="http://a.kainy.cn/201011/sina.png" alt="分享到新浪微博" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/" title="分享到人人网"><img src="http://a.kainy.cn/201011/renren.png"/></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/" title="分享到豆瓣网"><img src="http://a.kainy.cn/201011/douban.png" alt="分享到豆瓣网" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/" title="分享到FaceBook"><img src="http://a.kainy.cn/201011/facebook.png" alt="分享到FaceBook" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/" title="分享到Twitter"><img src="http://a.kainy.cn/201011/twitter.png" alt="分享到Twitter" /></a>
</span> 
<br />
<h4>版权申明：</h4>
转载请注明作者、出处及原文链接:
<small><blockquote>转自：<br /><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/" title="请以超链接形式注明出处，谢谢！">http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/</a>
<br />&copy; 2010 作者及版权归属: <a href="http://www.kainy.cn/index.php/about/about-kainy/">Kainy</a> @ <a href="http://kainy.cn/">Freetao's BLOG</a> &reg; 联络作者:<a href="mailto:gt@kainy.cn?subject=Freetao-Blog-Feed">GT@Kainy.CN</a>.</blockquote> </small><h4>写于去年今日:</h4><ol><li>2009:&nbsp;&nbsp;<a href='http://Kainy.CN/2009/12/%e7%bd%91%e9%a1%b5%e8%ae%be%e8%ae%a1%e8%af%be%e6%9c%9f%e6%9c%ab%e5%a4%8d%e4%b9%a0%e6%9d%90%e6%96%99%ef%bc%88%e5%90%8c%e5%ad%a6%e6%95%b4%e7%90%86%ef%bc%89/' title='Permanent Link to 网页设计课期末复习材料（同学整理）'>网页设计课期末复习材料（同学整理）(0)</a></li><li>2009:&nbsp;&nbsp;<a href='http://Kainy.CN/2009/12/%e4%bd%93%e7%b3%bb%e6%a6%82%e8%ae%ba%e8%af%be%e7%a8%8b%e6%9c%9f%e6%9c%ab%e8%80%83%e8%af%95%e5%a4%8d%e4%b9%a0%e5%8f%82%e8%80%83/' title='Permanent Link to 体系概论课程期末考试复习参考'>体系概论课程期末考试复习参考(0)</a></li></ol>]]></content:encoded>
			<wfw:commentRss>http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>为什么我们应该开始用CSS3和HTML5</title>
		<link>http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/</link>
		<comments>http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 13:04:05 +0000</pubDate>
		<dc:creator>Kainy</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[IE6]]></category>

		<guid isPermaLink="false">http://Kainy.CN/?p=1796</guid>
		<description><![CDATA[前几天看了XJP兄的趣文怎样在中国彻底消灭IE6，其中提出的几个方法确有其可行性，不过懂得推倒，更要思考重建；再结合从国内 IE 6 的市场份额说开去，看来当下对IE6等旧技术的声讨已蔚然成风，即将取得阶“段性进展”。 停止对IE6的兼容和抛弃IE6 孰先孰后，这本身就是鸡蛋相生的悖论，打破这一僵局的最好方法就是任一方先付诸行动，而作为开发者，我们所能做的就是：停止IE6兼容页面的生产。 能保持IE6兼容的前端和敢于对IE6说NO的前端，哪个牛逼？看完本文也许能对你做出判断有所影响。 本文首先描述了IE6等过时的技术长期存在而阻碍新技术发展的现状； 然后分别从客户、访客、开发者的角度分析不同角色早CSS3和HTML5新技术普及中的作用； 进而分别从恐惧心理（Fear Factor）、满足现状（Comfortable Factor）、质疑心理（Doubt Factor）、信念不坚定（Faith Factor）、轻敌心态（“It’s Too Early” Factor）、标准未敲定（Validation Factor）几个因素探讨了阻碍人们深入HTML5等新技术的元凶。 最后的总结：为了解决一个现实的问题——使网页设计更加清楚和简单（ Plain and simple），我们必须行动起来，从今天开始使用CSS3和HTML5。 以下内容来自：http://www.smashingmagazine.com/2010/12/10/why-we-should-start-using-css3-and-html5-today For a while now, here on Smashing Magazine, we have taken notice of how many designers are reluctant to embrace the new technologies such as CSS3 or HTML5 because of the lack of [...]]]></description>
			<content:encoded><![CDATA[<p>前几天看了XJP兄的趣文<a rel="nofollow" href="http://www.xjp.cc/2010-log/12/kill-ie6-in-china.html" target="_blank">怎样在中国彻底消灭IE6</a>，其中提出的几个方法确有其可行性，不过懂得推倒，更要思考重建；再结合<a rel="nofollow" href="http://www.dbanotes.net/review/ie_6.html" target="_blank">从国内 IE 6 的市场份额说开去</a>，看来当下对IE6等旧技术的声讨已蔚然成风，即将取得阶“段性进展”。</p>
<p>停止对IE6的兼容和抛弃IE6 孰先孰后，这本身就是鸡蛋相生的悖论，打破这一僵局的最好方法就是任一方先付诸行动，而作为开发者，我们所能做的就是：停止IE6兼容页面的生产。</p>
<p>能保持IE6兼容的前端和敢于对IE6说NO的前端，哪个牛逼？看完本文也许能对你做出判断有所影响。</p>
<p>本文首先描述了IE6等过时的技术长期存在而阻碍新技术发展的现状；</p>
<p>然后分别从客户、访客、开发者的角度分析不同角色早CSS3和HTML5新技术普及中的作用；</p>
<p>进而分别从恐惧心理（Fear Factor）、满足现状（Comfortable Factor）、质疑心理（Doubt Factor）、信念不坚定（Faith<span id="more-1796"></span> Factor）、轻敌心态（“It’s Too Early” Factor）、标准未敲定（Validation Factor）几个因素探讨了阻碍人们深入HTML5等新技术的元凶。</p>
<p>最后的总结：为了解决一个现实的问题——使网页设计更加清楚和简单（ Plain and simple），我们必须行动起来，从今天开始使用CSS3和HTML5。</p>
<p>以下内容来自：http://www.smashingmagazine.com/2010/12/10/why-we-should-start-using-css3-and-html5-today</p>
<p>For a while now, here on Smashing Magazine, we have taken notice of how <strong>many designers are reluctant to embrace the new technologies such as CSS3 or HTML5</strong> because of the lack of full cross-browser support for these technologies. Many designers are complaining about the numerous ways how the lack of cross-browser compatibility is effectively holding us back and tying our hands — keeping us from completely being able to shine and show off the full scope of our abilities in our work. Many are holding on to the notion that once this push is made, we will wake to a whole new Web — full of exciting opportunities just waiting on the other side. So they wait for this day. When in reality, they are effectively waiting for Godot.</p>
<p>Just like the elusive character from Beckett’s classic play, this day of full cross-browser support is not ever truly going to find its dawn and deliver us this wonderful new Web where our work looks the same within the window of any and <em>every</em> Web browser. Which means that many of us in the online reaches, from clients to designers to developers and on, are going to need to adjust our thinking so that we can realistically approach the Web as it is now, and more than likely how it will be in the future.</p>
<p>Sometimes it feels that we are hiding behind the lack of cross-browser compatibility to avoid learning new techniques that would actually dramatically improve our workflow. And that’s just wrong. Without an adjustment, we will continue to undersell the Web we have, and the landscape will remain unexcitingly stale and bound by this underestimation and mindset.</p>
<h3>Adjustment in Progress</h3>
<p>Sorry if any bubbles are bursting here, but we have to wake up to the fact that full cross-browser support of new technologies is just not going to happen. Some users will still use older browsers and some users will still have browsers with deactivated JavaScript or images; some users will be having weird view port sizes and some will not have certain plugins installed.</p>
<p>But that’s OK, really.</p>
<p>The Web is a damn flexible medium, and rightly so. We should embrace its flexibility rather than trying to set boundaries for the available technologies in our mindset and in our designs. The earlier we start designing with the new technologies, the quicker their wide adoption will progress and the quicker we will get by the incompatibility caused by legacy browsers. More and more users are using more advanced browsers every single day, and by using new technologies, we actually encourage them to switch (if they can). Some users will not be able to upgrade, which is why our designs should have a basic fallback for older browsers, but it can’t be the reason to design only the fallback version and call it a night.</p>
<p><a href="http://selectivizr.com/" target="_blank"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/12/selectivzr.jpg" alt="Selectivzr in Why We Should Start Using CSS3 and HTML5 Today" width="500" height="381" /></a></p>
<p><em><a href="http://selectivizr.com/" target="_blank">Select[ivizr]</a> is one of the many tools that make it possible to use CSS3 today.</em></p>
<p>There are <a href="http://www.smashingmagazine.com/2010/07/19/how-to-use-css3-media-queries-to-create-a-mobile-version-of-your-website/" target="_blank">so</a> <a href="http://www.smashingmagazine.com/2010/06/17/start-using-css3-today-techniques-and-tutorials/" target="_blank">many</a> <a href="http://www.alistapart.com/articles/responsive-web-design/" target="_blank">remarkable</a> <a href="http://www.smashingmagazine.com/2010/10/11/local-storage-and-how-to-use-it/" target="_blank">things</a> that we, designers and developers, can do today: be it responsive designs with CSS3 media queries, rich Web typography (with full support today!) or HTML5 video and audio. And there are so many <a href="http://caniuse.com/" target="_blank">useful</a> <a href="http://www.modernizr.com/" target="_blank">tools</a> <a href="http://selectivizr.com/" target="_blank">and</a> <a href="http://html5boilerplate.com/" target="_blank">resources</a> that we can use right away to incorporate new technologies in our designs while still supporting older browsers. There is just no reason <em>not</em> to use them.</p>
<p>We are the ones who can push the cross-browser support of these new technologies, encouraging and demanding the new features in future browsers. We have this power, and passing on it just because we don’t feel like there is no full support of them yet, should not be an option. We need to realize that we are the ones putting the wheels in motion and it’s up to us to decide what will be supported in the future browsers and what will not.</p>
<p>More exciting things <a href="http://opentype.info/blog/2010/08/14/better-web-typography-with-opentype-features/" target="_blank">will be coming</a> <a href="http://24ways.org/2010/my-css-wish-list" target="_blank">in the future</a>. We should design for the future and we should design for today — making sure that our progressive designs work well in modern browsers and work fine in older browsers. The crucial mistake would be clinging to the past, trying to work with the old nasty hacks and workarounds that will become obsolete very soon.</p>
<p>We can continue to cling to this notion and wait for older browsers to become outdated, thereby selling ourselves and our potential short, or we can adjust our way of thinking about this and come at the Web from a whole new perspective. One where we understand the truth of the situation we are faced with. That our designs are not going to look the same in every browser and our code will not render the same in every browser. And that’s the bottom line.</p>
<p><a href="http://24ways.org/2010/my-css-wish-list" target="_blank"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/12/yaili-24ways.jpg" alt="Yaili-24ways in Why We Should Start Using CSS3 and HTML5 Today" width="500" height="417" /></a></p>
<p><em>Yaili’s beautiful piece <a href="http://24ways.org/2010/my-css-wish-list" target="_blank">My CSS Wishlist on 24ways</a>. Articles like these are the ones that push the boundaries of web design and encourage more innovation in the industry.</em></p>
<p>Andy Clarke spoke about this at the DIBI Conference earlier this year (you can check his presentation<a href="http://vimeo.com/17137962" target="_blank">Hardboiled Web Design on Vimeo</a>). He really struck a nerve with his presentation, yet still we find so many stalling in this dream of complete Web standardization. So we wanted to address this issue here and keep this important idea being discussed and circulated. Because this waiting is not only hurting those of us working with the Web, but all of those who use the Web as well. Mainly through this plethora of untapped potential which could improve the overall experience across the spectrum for businesses, users and those with the skills to bring this sophisticated, rich, powerful new Web into existence.</p>
<h4>For Our Clients</h4>
<p>Now this will mean different things for different players in the game. For example, for our clients this means a much more developed and uniquely crafted design that is not bound by the boxes we have allowed our thinking to be contained in. However, this does come with a bit of a compromise that is expected on the parts of our clients as well. At least it does for this to work in the balanced and idealized way these things should play out. But this should be expected. Most change does not come without its compromises.</p>
<p>In this case, our clients have to accept the same truism that we do and concede that their projects will not look the same across various browsers. This is getting easier to convince them of in these times of the expanding mobile market, but they may still not be ready to concede this inch on the desktop side of the coin. Prices might be adjusted in some cases too, and that may be another area that the clients are not willing to accept. But with new doors being opened and more innovation, comes more time and dedicated efforts. These are a few of the implications for our clients, though the expanded innovation is where we should help them focus.</p>
<p><strong>In short:</strong></p>
<ul>
<li>Conceding to the idea that the project will not be able to look the same across various browsers,</li>
<li>This means more developed and unfettered imaginative designs for our clients,</li>
<li>This could lead to increased costs for clients as well, but with higher levels of innovation and</li>
<li>Client’s visions for what they want will be less hindered by these limitations.</li>
</ul>
<h4>For the Users</h4>
<p>The users are the ones who have the least amount invested in most of what is going on behind the scenes. They only see the end result, and they often do not think too much about the process that is involved which brings it to the screens before them. Again, with the mobile market, they have already come across the concept of varying interfaces throughout their varied devices. They only care about the functionality and most probably the style that appeals to them — but this is where their interest tends to end. Unless of course, they too are within the industry, and they may give it a second thought or more. So all this talk of cross-browser compatibility really doesn’t concern them, they really leave all that up to us to worry about.</p>
<p>Users only ever tend to notice anything if and when something does not work the way they expect it to from one place to the next. In most cases, they are willing to show something to a relative, friend or colleague, and suddenly from one device to the next, something is different that disrupts their ability to do so. That is when they actually take notice. But if we have done our jobs correctly, these transitions will remain smooth — even with the pushing of the envelopes that we are doing. So there is not much more that is going to change for the users other than a better experience. Average user is not going to check if a given site has the same rounded corners and drop-shadow in two different browsers installed on the user’s machine.</p>
<p><strong>In short:</strong></p>
<ul>
<li>Potentially less disruptions of experience from one device to another and</li>
<li>An overall improved user experience.</li>
</ul>
<h4>For Designers/Developers</h4>
<p>We, the designers and developers of the Web, too have to make the same concession our clients do and surrender the effort to craft the same exact presentation and experience across the vast spectrum of platforms and devices. This is not an easy idea to give up for a lot of those playing in these fields, but as has been already mentioned, we are allowing so much potential to be wasted. We could be taking the Web to new heights, but we allow ourselves to get hung up on who gets left behind in the process — and as a result we all end up getting left behind. Rather than viewing them as separate audiences and approaching them individually, so to speak, we allow the limitations of one group to limit us all.</p>
<p><a href="http://www.flickr.com/photos/michaelsgalpert/5071561135/" target="_blank"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/11/divide.jpg" alt="Divide in Why We Should Start Using CSS3 and HTML5 Today" width="500" height="300" /></a></p>
<p><em>Perhaps a divide and conquer mentality should be employed. <a href="http://www.flickr.com/photos/michaelsgalpert/5071561135/" target="_blank">Image Credit</a></em></p>
<p>So this could mean a bit more thought for the desired follow through, and we are not suggesting that we strive to appease one group here and damn the rest. Instead, we should just take a unified approach, designing for those who can see and experience the latest, and another for those who cannot. It wouldn’t mean more work if we design with those users in mind and produce meaningful and clean code up front and then just adjust it for older browsers. Having to remember that not everyone is afforded the privilege of choosing which browser they are using. And if necessary, this approach can be charged for. So it could lead to more revenue along with exciting new opportunities — by bringing some of the fun back into the work that being boxed in with limitations has robbed us of.</p>
<p><strong>In short:</strong></p>
<ul>
<li>Conceding to the idea that the project will not be able to look the same across various browsers,</li>
<li>A more open playing field for designers and developers all around; less restricted by this holding pattern,</li>
<li>More exciting and innovative landscape to attract new clientele,</li>
<li>Division of project audience into separate presentational approaches and</li>
<li>Probably less work involved because we don’t need the many hacks and workarounds we’ve used before.</li>
</ul>
<h3>So What Are We Waiting For?</h3>
<p>So if this new approach, or adjusted way of thinking can yield positive results across the browsers for everyone involved, then why are we still holding back? What is it that we are waiting for? Why not cast off these limitations thrown upon our fields and break out of these boxes? The next part of the discussion tries to suss out some of the contributing factors that could be responsible for keeping us restrained.</p>
<h4>Fear Factor</h4>
<p><a href="http://www.flickr.com/photos/prettyuglydesign/4673681658/" target="_blank"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/12/Fail-Better.jpg" alt="Fail-Better in Why We Should Start Using CSS3 and HTML5 Today" /></a></p>
<p><em>The fail awaits, and so some of us opt to stay back. Image by <a href="http://www.flickr.com/photos/prettyuglydesign/4673681658/" target="_blank">Ben Didier</a></em></p>
<p>One contributing factor that has to be considered, is perhaps that we are being held back out of fear. This might be a fear of trying something new, now that we have gotten so comfortable waiting for that magic day of compatibility to come. This fear could also stem from not wanting to stand up to some particular clients and try to make them understand this truism of the Web and the concessions that need to be made — with regards to consistent presentation across the browsers. We get intimated, so to speak, into playing along with these unrealistic expectations, rather than trusting that we can make them see the truth of the situation. Whatever the cause is that drives this factor, we need to face our fears and move on.</p>
<p>It’s our responsibility of professionals to deliver high-quality work to our clients and advocate on and protect user’s interests. It’s our responsibility to confront clients when we have to, and we will have to do it at some point anyway, because 100% cross-browser compatibility is just not going to happen.</p>
<h4>Comfortable Factor</h4>
<p>A possible contributing factor that we should also look into is that some people in the community are just too comfortable with how we design today and are not willing to learn new technology. There are those of us who already tire of the extra work involved in the testing and coding to make everything work as it is, so we have little to no interest at all in an approach that seemingly calls for more thought and time. But really, if we start using new technologies today, we will have to master a learning curve first, but the advantages are certainly worth our efforts. We should see it as the challenge that will save us time and deliver better and cleaner code.</p>
<p>To some extent, today we are in the situation in which we were in the beginning of 2000s; at those times when the emergence and growing support of CSS in browsers made many developers question their approach to designing web sites with tables. If the majority of designers passed on CSS back then and if the whole design community didn’t push the Web standards forward, we probably still would be designing with tables.</p>
<h4>Doubt Factor</h4>
<p>Doubt is another thing we must consider when it comes to our being in hold mode, and this could be a major contributor to this issue. We begin to doubt ourselves and our ability to pull off this innovative, boundary pushing-kind-of-work, or to master these new techniques and specs, so we sink into the comfort of playing the waiting game and playing it safe with our designs and code. We just accept the limitations and quietly work around them, railing on against the various vendors and the W3C. We should take the new technologies as the challenge to conquer; we’ve learned HTML and CSS 2.1 and we can learn HTML5 and CSS3, too.</p>
<h4>Faith Factor</h4>
<p><a href="http://www.flickr.com/photos/fotologic/408096004/" target="_blank"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/11/I-want-to-believe.jpg" alt="I-want-to-believe in Why We Should Start Using CSS3 and HTML5 Today" /></a></p>
<p><em>Faith can be a good thing, but in this case, it can hold you back. Image by <a href="http://www.flickr.com/photos/fotologic/408096004/" target="_blank">fotologic</a></em></p>
<p>Undoubtedly, some of us are holding off on moving forward into these new areas because we are faithfully clinging to the belief that the cross-browser support push will eventually happen. There are those saying that we will be better off as a community if we allowed the Web to evolve, and that this evolution should not be forced.</p>
<p>But this is not forcing evolution, it is just evolution. Just like with Darwin’s theory, the Web evolves in stages, it does not happen for the entire population at once. It is a gradual change over time. And that is what we should be allowing to happen with the Web, gradually using and implementing features for Web community here and there. This way forward progress is happening, and nobody should be held back from these evolutionary steps until we all can take them.</p>
<h4>“It’s Too Early” Factor</h4>
<p>Another possible contributor is the ever mocking “It’s too early” factor. Some members of the online community faithfully fear that if they go ahead and accept this new way forward and begin designing or developing in accordance, then as soon as they begin completing projects, the support might be dropped and they would need to update the projects they already completed in the past. It’s common to think that it’s just too early to work with new standards until they are fully implemented in many browsers; because it’s just not safe to assume that they will be implemented at all.</p>
<p>However, one needs to understand the difference between two groups of new features: the widely accepted ones (CSS3′s media queries, border-radius or drop-shadows or HTML5 canvas are not going to disappear) and the experimental ones (e.g. some <a href="http://opentype.info/blog/2010/08/14/better-web-typography-with-opentype-features/" target="_blank">OpenType features are currently supported only in Firefox 4 Beta</a>). The widely accepted features are safe to use and they will not disappear for certain; the experimental features can always be extracted in a separate stylesheet and be easily updated and maintained when necessary. It might be a good idea not to use experimental, unsupported features in large corporate designs unless they are not affecting the critical design elements of the design.</p>
<h4>Validation Factor</h4>
<p>We cannot forget to mention that there are also many of us who are refusing to dabble in these new waters simply due to the fact that implementing some of these techniques or styles would cause a plethora of vendor-specific pefixes to appear in the stylesheet, thus impeding the validation we as professionals strive for.</p>
<p>Many of us would never put forth any project that does not fully validate with the W3C, and until these new specs are fully standardized and valid, we are unwilling to include them in their work. And because using CSS3 usually means using vendor-specific prefixes, we shouldn’t be using CSS3. Right?</p>
<p><a href="http://net.tutsplus.com/articles/general/but-it-doesnt-validate/" target="_blank"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/11/validate.jpg" alt="Validate in Why We Should Start Using CSS3 and HTML5 Today" width="500" height="300" /></a></p>
<p><em>Jeffrey Way’s article <a href="http://net.tutsplus.com/articles/general/but-it-doesnt-validate/" target="_blank">But It Doesn’t Validate</a></em></p>
<p>Well, not quite. As Jeffrey Way perfectly explains in his article <a href="http://net.tutsplus.com/articles/general/but-it-doesnt-validate/" target="_blank">But it Doesn’t Validate</a>, validation is not irrelevant, but the final score of the CSS validator might be. As Jeffrey says,</p>
<blockquote><p>“This score serves no higher purpose than to provide you with feedback. It neither contributes to accessibility, nor points out best-practices. In fact, the validator can be misleading, as it signals errors that aren’t errors, by any stretch of the imagination.</p>
<p>[...] Validation isn’t a game, and, while it might be fun to test your skills to determine how high you can get your score, always keep in mind: it doesn’t matter. And never, ever, ever compromise the use of the latest doctype, CSS3 techniques and selectors for the sake of validation.”</p>
<p>— Jeffrey Way, <a href="http://net.tutsplus.com/articles/general/but-it-doesnt-validate/" target="_blank">But it Doesn’t Validate</a></p></blockquote>
<p>Having our work validate 100% is not always the best for the project. If we make sure that our code is clean and accessible, and that it validates without the CSS3/HTML5-properties, then we should take our work to the next level, meanwhile sacrificing part of the validation test results. We should not let this factor keep us back. If we have a chance for true innovation, then we shouldn’t allow ourselves to be restrained by unnecessary boundaries.</p>
<h3>All in All…</h3>
<p>Whatever the factors that keep us from daring into these new CSS3 styles or new HTML5 coding techniques, just for a tangible example, need to be gotten over. Plain and simple. We need to move on and <strong>start using CSS3 and HTML5 today</strong>. The community will become a much more exciting and innovative playground, which in turn will improve experiences for as well as draw in more users to this dynamic new Web, which in turn will attract more clientele — effectively expanding the market. This is what could potentially be waiting on the other side of this fence that we are timidly facing — refusing to climb over it. Instead, waiting for a gate to be installed.</p>
<p>Until we get passed this limited way of looking at the situation, only then will we continue falling short of the full potential of ourselves and our field. Are there any areas that you would love to be venturing into, but you are not because of the lack of complete cross browser compatibility? Admittedly, I was a faith factor member of the community myself — how about you? And what CSS3 or HTML5 feature are you going to incorporate into your next design?</p>
<h3>Will You Use HTML5 / CSS3 In Your Next Design?</h3>
<hr /><h4>读者评论：</h4><ol><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月14日</a>, <strong>剑网3cdkey</strong>：我晕，不能弄点中文的吗？想看点干货结果看也看不懂，翻译出来看的也很累</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月15日</a>, <strong>苏扬</strong>：搞HTML5 CSS3又得学新知识，累啊累，苦了我们这些拼了命的想尽办法通过CSS让IE6兼容的人啊！</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月15日</a>, <strong>阿卡家十字绣</strong>：都是英文，看不懂啊！</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月15日</a>, <strong>Kainy</strong>：痛并快乐着，呵呵。</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月16日</a>, <strong>阿卡家十字绣</strong>：又来了，哈哈！但每次来都是一样的，看不懂！</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月17日</a>, <strong>bronze casting</strong>：好多英文啊，看上去真累啊</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月18日</a>, <strong>朗朗</strong>：新手路过,学习了..</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月18日</a>, <strong>90后创业</strong>：虽然看不懂，但是还是要赞一下。</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月18日</a>, <strong>梧桐</strong>：鸟文,看不懂..</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月18日</a>, <strong>歌迪安</strong>：多谢博主分享不错的文章哦</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月21日</a>, <strong>rachat de credit</strong>：J'ai appris des choses interessantes grace a vous, et vous m'avez aide a resoudre un probleme, merci.

- Daniel</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月21日</a>, <strong>心理咨询</strong>：日新月异的科技发展，使得我们更有办法掌握未来的动向与脉搏</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月26日</a>, <strong>邓肯</strong>：几次想升级le都没成功</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月26日</a>, <strong>Kainy</strong>：哇，邓肯。。。</li><li><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/">2010年12月29日</a>, <strong>十字绣</strong>：眼睛看的累死了！</li></ol><span>分享本文到：<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/"><img src="http://a.kainy.cn/201011/xianguo.png" title="分享到鲜果订阅" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/"><img src="http://a.kainy.cn/201011/sina.png" alt="分享到新浪微博" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/" title="分享到人人网"><img src="http://a.kainy.cn/201011/renren.png"/></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/" title="分享到豆瓣网"><img src="http://a.kainy.cn/201011/douban.png" alt="分享到豆瓣网" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/" title="分享到FaceBook"><img src="http://a.kainy.cn/201011/facebook.png" alt="分享到FaceBook" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/" title="分享到Twitter"><img src="http://a.kainy.cn/201011/twitter.png" alt="分享到Twitter" /></a>
</span> 
<br />
<h4>版权申明：</h4>
转载请注明作者、出处及原文链接:
<small><blockquote>转自：<br /><a href="http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/" title="请以超链接形式注明出处，谢谢！">http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/</a>
<br />&copy; 2010 作者及版权归属: <a href="http://www.kainy.cn/index.php/about/about-kainy/">Kainy</a> @ <a href="http://kainy.cn/">Freetao's BLOG</a> &reg; 联络作者:<a href="mailto:gt@kainy.cn?subject=Freetao-Blog-Feed">GT@Kainy.CN</a>.</blockquote> </small>]]></content:encoded>
			<wfw:commentRss>http://Kainy.CN/2010/12/%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e4%bb%ac%e5%ba%94%e8%af%a5%e5%bc%80%e5%a7%8b%e7%94%a8css3%e5%92%8chtml5/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>是时候使用&lt; !DOCTYPE HTML &gt;了吗？</title>
		<link>http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/</link>
		<comments>http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/#comments</comments>
		<pubDate>Sat, 11 Dec 2010 15:22:37 +0000</pubDate>
		<dc:creator>Kainy</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[doctype]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://Kainy.CN/?p=1773</guid>
		<description><![CDATA[&#60;!DOCTYPE html&#62;是HTML5中唯一的doctype，也被视作将网页“升级”到HTML5的第一步。 相比原来又臭又长的doctype，这种精简的doctype声明深受开发者们喜爱，其好处显而易见：一方面便于记忆，一方面节省流量，最重要的是能够保持良好的浏览器兼容性；三大好处，何乐而不为呢。但是马克思主义哲学教导我们 要用辩证思维看待事物，&#60;!DOCTYPE html&#62;华丽丽的外表下究竟存在哪些不足之处呢？俗话说“初生牛犊不怕虎”而半桶水又叮当响，我也来说说自己的疑问，一来希望得到高手们的指点，二来菜鸟的视角若能引发你的思考那也善莫大焉。 &#60;!DOCTYPE&#62; 声明位于文档中的最前面的位置，处于 &#60;html&#62; 标签之前。此标签可告知浏览器文档使用哪种 HTML 或 XHTML 规范，即应该用什么规则集来解释文档中的标记。换句话说，使用“&#60;!DOCTYPE HTML&#62;”声明的网页，浏览器在“阅读”的时候就是以HTML5的规则集来解释文档中的标记，那我们就来看看HTML5的几个新特性对网页文档解释过程所产生的影响： 新标记的影响 由WebCore中的渲染机制可知，浏览器在渲染网页的过程中，首先要创建渲染树(渲染对象[renderer]通过DOM创建)，然后对节点匹配对应的渲染方式，最终完成网页展示。而HTML5的新特性之一就是加入了article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, mark, meter, nav, output, progress, rp, rt, ruby, section, source, summary, time, video, wbr&#8230;近30个新元素，这就意味着每个节点在渲染时需要多进行30次匹配尝试，而普通网页动辄成百上千元素，也许对于现在的计算机而言这点运算量基本可忽略。但无论如何，因使用&#60; !DOCTYPE HTML &#62;声明而导致的资源浪费实实在在摆在那儿。 新应用程序接口（API） 除了原先的DOM接口，HTML5增加了更多API,如： 用于即时2D绘图的Canvas标签 定时媒体回放 离线数据库存储 文档编辑 拖拽控制 浏览历史管理 那么这些新增的API又从何而来呢？ [...]]]></description>
			<content:encoded><![CDATA[<p>&lt;!DOCTYPE html&gt;是HTML5中唯一的doctype，也被视作将网页“升级”到HTML5的第一步。</p>
<p>相比原来又臭又长的doctype，这种精简的doctype声明深受开发者们喜爱，其好处显而易见：<strong>一方面便于记忆，一方面节省流量，最重要的是能够保持良好的</strong><strong>浏览器</strong><strong>兼容性</strong>；三大好处，何乐而不为呢。但是马克思主义哲学教导我们 要用辩证思维看待事物，&lt;!DOCTYPE html&gt;华丽丽的外表下究竟存在哪些不足之处呢？俗话说“初生牛犊不怕虎”而半桶水又叮当响，我也来说说自己的疑问，一来希望得到高手们的指点，二来菜鸟的视角若能引发你的思考那也善莫大焉。</p>
<p>&lt;!DOCTYPE&gt; 声明位于文档中的最前面的位置，处于 &lt;html&gt; 标签之前。此标签可告知浏览器文档使用哪种 HTML 或 XHTML 规范，即应该用什么规则集来解释文档中的标记。换句话说，使用“&lt;!DOCTYPE HTML&gt;”声明的网页，浏览器在“阅读”的时候就是以HTML5的规则集来解释文档中的标记，那我们就来看看HTML5的几个新特性对网页文档解释过程所产生的影响：<span id="more-1773"></span></p>
<h2>新标记的影响</h2>
<p>由<a href="http://blog.csdn.net/tuhuolong/archive/2010/09/12/5879094.aspx" target="_blank">WebCore中的渲染机制</a>可知，浏览器在渲染网页的过程中，首先要创建渲染树(渲染对象[renderer]通过DOM创建)，然后对节点匹配对应的渲染方式，最终完成网页展示。而HTML5的新特性之一就是加入了article, aside, audio, canvas, command, datalist, details, embed, figcaption, figure, footer, header, hgroup, keygen, mark, meter, nav, output, progress, rp, rt, ruby, section, source, summary, time, video, wbr&#8230;近30个新元素，这就意味着每个节点在渲染时需要多进行30次匹配尝试，而普通网页动辄成百上千元素，也许对于现在的计算机而言这点运算量基本可忽略。但无论如何，因使用&lt; !DOCTYPE HTML &gt;声明而导致的资源浪费实实在在摆在那儿。</p>
<h2>新应用程序接口（API）</h2>
<p id="_mcePaste">除了原先的DOM接口，HTML5增加了更多API,如：</p>
<p id="_mcePaste">
<ol>
<li>用于即时2D绘图的Canvas标签</li>
<li>定时媒体回放</li>
<li>离线数据库存储</li>
<li>文档编辑</li>
<li>拖拽控制</li>
<li>浏览历史管理</li>
</ol>
<p id="_mcePaste">那么这些新增的API又从何而来呢？</p>
<blockquote><p><strong>离线数据库</strong>：这个功能将内嵌一个本地的 SQL 数据库，以加速交互式搜索，缓存以及索引功能。同时，那些离线 Web 程序也将因此获益匪浅。</p>
<p><strong>不需要插件的富动画&#8211;Canvas</strong>： 对象将给浏览器带来直接在上面绘制矢量图的能力，这意味着我们可以脱离 Flash 和 Silverlight，直接在浏览器中显示图形或动画。一些最新的浏览器，除了 IE，已经开始支持 Canvas。</p>
<p style="text-align: right;">— —： <a href="http://baike.baidu.com/view/951383.htm#6" target="_blank">百度百科</a></p>
</blockquote>
<p>由以上描述不难看出，Canvas、Gear的API正是由浏览器自带程序提供，也许是用原先的doctype声明时这些程序都未激活，而你一句“&lt;!DOCTYPE HTML&gt;”就把别人唤醒了，接下来网页中却没有用到Canvas，这是不是有些烽火戏诸侯的意思呢？我们都知道系统为加快某些程序的启动，往往增加一些自动加载项目，而这些自启动的服务都会占用系统资源，按这种思路，你在实际网页中没有用到任何新特性，却使用“&lt;!DOCTYPE HTML&gt;”声明也有可能增加浏览器开销的嫌疑哦。</p>
<p>这就像浏览器通过MEMI类型区分不同种类的数据从而调用相应的软件打开文件。在浏览器向服务器请求时，服务器在返回所请求的文件之前会发送一个“header”来告诉浏览器如何处理接下来发出的文件，最常见的header就是所谓的 Content-Type，通常长得这模样：Content-Type: text/html，例如web浏览器就是通过MIME类型<span style="font-family: 宋体; line-height: normal; font-size: small; color: #4e4e4e;">video/quicktime</span>来确定xx.mov这个文件是需要QuickTimePlayer播放，然后启动QuickTimePlayer播放之。</p>
<p><span style="font-family: 宋体; line-height: normal; font-size: small; color: #4e4e4e;"> </span></p>
<p>本文全由个人目前的认识和一些搜索结果拼凑而成。也许你看到这里已被雷的外焦里嫩，也可能多年后的自己回过头来看这篇文章也会为今天的无知发笑，但那又何妨，谁还不是这么走过来的对吧。</p>
<hr /><h4>读者评论：</h4><ol><li><a href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/">2010年12月13日</a>, <strong>博客之家</strong>：不懂这些，跟你学学吧</li><li><a href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/">2010年12月13日</a>, <strong>bronze casting</strong>：我也不怎么懂</li><li><a href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/">2010年12月13日</a>, <strong>fishbc</strong>：非常实用！博客不错！</li><li><a href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/">2010年12月15日</a>, <strong>苏扬</strong>：新事物代替旧事物是个必然，我想也很快了，我也在慢慢的学这些东西，应该有很多人跟我一样吧！</li><li><a href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/">2010年12月18日</a>, <strong>梧桐</strong>：原来还有这个问题在里面哦，当时看WP3.0默认主题就是用这个写法，没用dtd，还以为是它错了，今天长见识了。</li><li><a href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/">2011年01月2日</a>, <strong>笨乌不飞</strong>：DTD 声明是 XML 规范的要求，HTML/XHTML 做为子集，肯定是会遵循 XML 要求的。

HTML 5 规范看起来打算两条腿走路，之前 XHTML 都已经打定主意放弃 HTML 4 规范中与 XML 不兼容的部分了，但是 HTML 5 似乎打算弄成提供两个模式：1、XML；2、HTML 这样玩。

我觉得还是 XML 风格比较好，所以对这篇文章提出的只用  的搞法存疑。HTML 5 草案也随时会变，不推荐实际应用。

实际的系统必须遵循一个正式规范。</li><li><a href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/">2011年01月2日</a>, <strong>Kainy</strong>：这位同学，我想知道你的网站入口在哪？</li><li><a href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/">2011年01月5日</a>, <strong>physiotherapy</strong>：I’ve recently started a blog, the information you provide on this site has helped me tremendously. Thank you for all of your time &amp; work.</li><li><a href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/">2011年01月5日</a>, <strong>Kainy</strong>：Welcome to my site ，glad to hear that。</li><li><a href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/">2011年01月24日</a>, <strong>aspergers syndromes symptoms</strong>：Thank you, I have recently been searching for information about this topic for ages and yours is the best I have discovered so far.</li><li><a href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/">2011年12月26日</a>, <strong>w3chtml</strong>：　HTML 5提供了一些新的元素和属性，反映典型的现代用法网站。其中有些是技术上类似和标签，但有一个含义，例如（网站导航块）和。这种标签将有利於搜索引擎的索引整理、小萤幕装置和视障人士使用。同时为其他浏览要素提供了新的功能，通过一个标准介面，如和标记。</li></ol><h4>相关文章：</h4><ol><li><a href="http://Kainy.CN/2010/09/%e6%9d%a5%e8%87%aajs1k%e7%9a%84%e8%b6%85%e7%82%ab%e7%89%b9%e6%95%88%e6%bc%94%e7%a4%ba/" rel="bookmark" title="Permanent Link: 来自JS1K的超炫特效演示">来自JS1K的超炫特效演示</a></li><li><a href="http://Kainy.CN/2010/10/build-my-jquery-plugin/" rel="bookmark" title="Permanent Link: jQuery插件的创建方法">jQuery插件的创建方法</a></li><li><a href="http://Kainy.CN/2010/11/kaistique/" rel="bookmark" title="Permanent Link: 比较拉风的特效尝试">比较拉风的特效尝试</a></li><li><a href="http://Kainy.CN/2010/03/%e7%94%a8html5%e8%ae%be%e8%ae%a1%e7%9a%84iphone%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e9%85%b7%e7%ab%99/" rel="bookmark" title="Permanent Link: 用HTML5设计的iPhone应用程序酷站">用HTML5设计的iPhone应用程序酷站</a></li><li><a href="http://Kainy.CN/2010/05/fsk%e8%a2%ab%e9%bb%91/" rel="bookmark" title="Permanent Link: 富士康招聘网站被黑">富士康招聘网站被黑</a></li></ol><span>分享本文到：<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/"><img src="http://a.kainy.cn/201011/xianguo.png" title="分享到鲜果订阅" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/"><img src="http://a.kainy.cn/201011/sina.png" alt="分享到新浪微博" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/" title="分享到人人网"><img src="http://a.kainy.cn/201011/renren.png"/></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/" title="分享到豆瓣网"><img src="http://a.kainy.cn/201011/douban.png" alt="分享到豆瓣网" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/" title="分享到FaceBook"><img src="http://a.kainy.cn/201011/facebook.png" alt="分享到FaceBook" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/" title="分享到Twitter"><img src="http://a.kainy.cn/201011/twitter.png" alt="分享到Twitter" /></a>
</span> 
<br />
<h4>版权申明：</h4>
转载请注明作者、出处及原文链接:
<small><blockquote>转自：<br /><a href="http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/" title="请以超链接形式注明出处，谢谢！">http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/</a>
<br />&copy; 2010 作者及版权归属: <a href="http://www.kainy.cn/index.php/about/about-kainy/">Kainy</a> @ <a href="http://kainy.cn/">Freetao's BLOG</a> &reg; 联络作者:<a href="mailto:gt@kainy.cn?subject=Freetao-Blog-Feed">GT@Kainy.CN</a>.</blockquote> </small>]]></content:encoded>
			<wfw:commentRss>http://Kainy.CN/2010/12/%e6%98%af%e6%97%b6%e5%80%99%e4%bd%bf%e7%94%a8-doctype-html-%e4%ba%86%e5%90%97%ef%bc%9f/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>比较拉风的特效尝试</title>
		<link>http://Kainy.CN/2010/11/kaistique/</link>
		<comments>http://Kainy.CN/2010/11/kaistique/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 17:11:12 +0000</pubDate>
		<dc:creator>Kainy</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[特效]]></category>

		<guid isPermaLink="false">http://Kainy.CN/?p=1754</guid>
		<description><![CDATA[正如你所看到的，小博的主题有了些变化，写篇文章记录之。 这个修改灵感来自于Android自2.1版本开始引入的动态壁纸效果，前景仍然是静态的图标、时钟、播放器微件之类，但背景一动起来，立体效果就多少有了一些。 兼容性：ie就没办法啦，就用原本主题的样式；Opera, FireFox, Chrome, Safari几个浏览器都支持canvas，Chrome下浏览体验最佳，在偶的机子上用Firefox打开博客略卡。 好处，增加网页的动态效果，打破传统网页背景不变前景变的惯势，当然，这还要归功于HTML5这类新技术的支持，动态背景的思路会否引发一场新的设计潮流，天知道；另一方面由于去掉了背景图片，修改后页面加载速度明显加快。 缺陷，新访客开始可能不能适应，注意力容易从内容分散到背景的变化。好在鼠标在内容部分时，背景色较鼠标移到外围区域时来得缓和，貌似鲜艳的颜色容易使人不淡定 不利于阅读，对于拉动滚动条浏览的访客……就让他兴奋点吧；同时，canvas的实现会占用较多的cpu资源（又或者是这里的使用方法欠妥），尤其是 mouse over function ，鼠标在页面中移动时低配置的机器鼠标滞感比较明显，操作体验下降。 虽是用到html5这么个比较新鲜的东东，但实现的原理也不复杂：建立canvas元素，然后通过 JavaScript 完成简单的动画。主要实现原理都可以在这个演示的代码中了解，前半部分JavaScript是在canvas元素中创建渐变，后半部分在鼠标移动时触发，产生跟随鼠标的白色亮点区域。有兴趣的童鞋也可以试试哈，以下是一些你可能用得到的素材，大都是canvas实现的特效： 模拟水面.html 眩晕光束.html 漩涡.html 绚丽流光.html 更多演示可以到这篇文章查看。 说了这么多都是博主自己的观点，究竟这个尝试的效果如何，当然还要由访客们说了算。欢迎大家发表自己的看法，有什么什么不足或者更好的实现方法都可以共同探讨哈。 P.S(20101205): 做了点改进，现在默认情况下背景是黑白渐变，按“Esc”键后可以调整背景效果，再按一次固定啦，这样就避免了消耗资源过大的问题（WebKit核心浏览器下有效）。另外修正了IE8下的问题，感谢默默童鞋的提醒。 读者评论：2010年11月27日, 万戈：html5吗？超帅哟2010年11月27日, 麦包包：好文好文 不顶不行了2010年11月27日, GuoTao：呵呵，谢谢，希望能为你的新主题开发带来灵感。2010年11月27日, 陈维国博客：CPU要高一点了啊2010年11月27日, GuoTao：呵呵，正是纠结这个问题，所以现在才做尝试。2010年11月27日, 波多野结衣：这个特效果然很不错！2010年11月27日, iHenry：我在任何情况下都会优先考虑IE，为用户着想。不支持IE的方式都是浮云。2010年11月27日, GuoTao：关于IE用户的问题我是这样考虑的： 首先调用加入特效的CSS文件，header中加入判断语句，如果是IE用户则用原主题的样式表规则覆盖； 这样IE用户看到的仍是修改之前的主题（并非主题“不支持IE”），支持canvas的浏览器才看得出变化。 选择IE早期版本的访客估计不会对新特效感兴趣，而有可能喜欢该特效的童鞋估计大都使用新浏览器。 这正是用户与网页双向选择的结果，而我们要做的正是投用户所好。2010年11月27日, 苏扬：HTML5这么牛逼？这效果好酷啊 喜欢 真的很喜欢！2010年11月28日, GuoTao：这还只是HTML5新特性的一小部分呢， 勤于折腾，你还能整出更好的效果，嘿嘿。2010年11月28日, 不在回头：电脑上的时候一定要体验下这个效果！2010年11月28日, GuoTao：呵呵，随时欢迎。2010年11月29日, 昆山小区：这效果的确很好，我也很喜欢！2010年11月29日, copper fittings：确实蛮屌的2010年11月29日, 爱琴海：跟风族，还不错。2010年11月29日, 卡,卡：！ 是不是2010年11月29日, GuoTao：谢谢。2010年11月30日, Alan：个人觉得，这体验相当不好2010年11月30日, GuoTao：首先感谢你提出的意见，我相信有不少人赞同你的观点，只是没在这儿提出； 既然是一个比较大胆的尝试，就肯定不可能只有好的一面，并且让每个人在第一次体验后全盘接受（虽然我希望）。 [...]]]></description>
			<content:encoded><![CDATA[<p>正如你所看到的，小博的主题有了些变化，写篇文章记录之。</p>
<p>这个修改<strong>灵感</strong>来自于Android自2.1版本开始引入的<a href="http://v.youku.com/v_show/id_XMTUwMDI3Mjg4.html" target="_blank">动态壁纸效果</a>，前景仍然是静态的图标、时钟、播放器微件之类，但背景一动起来，立体效果就多少有了一些。</p>
<p><strong>兼容性：</strong>ie就没办法啦，就用原本主题的样式；Opera, FireFox, Chrome, Safari几个浏览器都支持canvas，Chrome下浏览体验最佳，在偶的机子上用Firefox打开博客略卡。</p>
<p><strong>好处</strong>，增加网页的动态效果，打破传统网页背景不变前景变的惯势，当然，这还要归功于HTML5这类新技术的支持，动态背景的思路会否引发一场新的设计潮流，天知道；另一方面由于去掉了背景图片，修改后页面加载速度明显加快。</p>
<p><strong>缺陷</strong>，新访客开始可能不能适应，注意力容易从内容分散到背景的变化。好在鼠标在内容部分时，背景色较鼠标移到外围区域时来得缓和，貌似鲜艳的颜色容易使人不淡定 不利于阅读，<span id="more-1754"></span>对于拉动滚动条浏览的访客……就让他兴奋点吧；同时，canvas的实现会占用较多的cpu资源（又或者是这里的使用方法欠妥），尤其是 mouse over function ，鼠标在页面中移动时低配置的机器鼠标滞感比较明显，操作体验下降。</p>
<p style="text-align: center;"><a href="http://a.kainy.cn/201011/new-theme%EF%BC%9AColorful-BG-20101126.jpg"><img class="shadow aligncenter" src="http://a.kainy.cn/201011/new-theme%EF%BC%9AColorful-BG-20101126.jpg" alt="canvas colorful-background" width="400" height="300" /></a></p>
<p>虽是用到html5这么个比较新鲜的东东，但实现的<strong>原理</strong>也不复杂：建立canvas元素，然后通过 JavaScript 完成简单的动画。主要实现原理都可以在<a href="http://kainy.googlecode.com/svn/trunk/colorfulBG_html5_canvas/index.html" target="_blank">这个演示</a>的代码中了解，前半部分JavaScript是在canvas元素中创建渐变，后半部分在鼠标移动时触发，产生跟随鼠标的白色亮点区域。有兴趣的童鞋也可以试试哈，以下是一些你可能用得到的素材，大都是canvas实现的特效：</p>
<ul>
<li><a href="http://kainy.googlecode.com/svn/trunk/%E8%B6%85%E7%82%ABJS/%e6%a8%a1%e6%8b%9f%e6%b0%b4%e9%9d%a2.html" target="_blank">模拟水面.html</a></li>
<li><a href="http://kainy.googlecode.com/svn/trunk/%E8%B6%85%E7%82%ABJS/%E7%9C%A9%E6%99%95%E5%85%89%E6%9D%9F.html" target="_blank">眩晕光束.html</a></li>
<li><a href="http://kainy.googlecode.com/svn/trunk/超炫JS/旋风.html" target="_blank">漩涡.html</a></li>
<li><a href="http://kainy.googlecode.com/svn/trunk/%E8%B6%85%E7%82%ABJS/%E7%BB%9A%E4%B8%BD%E6%B5%81%E5%85%89.html" target="_blank">绚丽流光.html</a></li>
</ul>
<p>更多演示可以到<a href="http://kainy.cn/2010/09/%E6%9D%A5%E8%87%AAjs1k%E7%9A%84%E8%B6%85%E7%82%AB%E7%89%B9%E6%95%88%E6%BC%94%E7%A4%BA/" target="_blank">这篇</a>文章查看。</p>
<p>说了这么多都是博主自己的观点，究竟这个尝试的效果如何，当然还要由访客们说了算。欢迎大家发表自己的看法，有什么什么不足或者更好的实现方法都可以共同探讨哈。</p>
<p>P.S(20101205):</p>
<p>做了点改进，现在默认情况下背景是黑白渐变，按“Esc”键后可以调整背景效果，再按一次固定啦，这样就避免了消耗资源过大的问题（WebKit核心浏览器下有效）。另外修正了IE8下的问题，感谢默默童鞋的提醒。</p>
<hr /><h4>读者评论：</h4><ol><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月27日</a>, <strong>万戈</strong>：html5吗？超帅哟</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月27日</a>, <strong>麦包包</strong>：好文好文  不顶不行了</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月27日</a>, <strong>GuoTao</strong>：呵呵，谢谢，希望能为你的新主题开发带来灵感。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月27日</a>, <strong>陈维国博客</strong>：CPU要高一点了啊</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月27日</a>, <strong>GuoTao</strong>：呵呵，正是纠结这个问题，所以现在才做尝试。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月27日</a>, <strong>波多野结衣</strong>：这个特效果然很不错！</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月27日</a>, <strong>iHenry</strong>：我在任何情况下都会优先考虑IE，为用户着想。不支持IE的方式都是浮云。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月27日</a>, <strong>GuoTao</strong>：关于IE用户的问题我是这样考虑的：
首先调用加入特效的CSS文件，header中加入判断语句，如果是IE用户则用原主题的样式表规则覆盖；
这样IE用户看到的仍是修改之前的主题（并非主题“不支持IE”），支持canvas的浏览器才看得出变化。
选择IE早期版本的访客估计不会对新特效感兴趣，而有可能喜欢该特效的童鞋估计大都使用新浏览器。
这正是用户与网页双向选择的结果，而我们要做的正是投用户所好。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月27日</a>, <strong>苏扬</strong>：HTML5这么牛逼？这效果好酷啊 喜欢 真的很喜欢！</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月28日</a>, <strong>GuoTao</strong>：这还只是HTML5新特性的一小部分呢，
勤于折腾，你还能整出更好的效果，嘿嘿。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月28日</a>, <strong>不在回头</strong>：电脑上的时候一定要体验下这个效果！</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月28日</a>, <strong>GuoTao</strong>：呵呵，随时欢迎。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月29日</a>, <strong>昆山小区</strong>：这效果的确很好，我也很喜欢！</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月29日</a>, <strong>copper fittings</strong>：确实蛮屌的</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月29日</a>, <strong>爱琴海</strong>：跟风族，还不错。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月29日</a>, <strong>卡,卡</strong>：！ 是不是</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月29日</a>, <strong>GuoTao</strong>：谢谢。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月30日</a>, <strong>Alan</strong>：个人觉得，这体验相当不好</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月30日</a>, <strong>GuoTao</strong>：首先感谢你提出的意见，我相信有不少人赞同你的观点，只是没在这儿提出；
既然是一个比较大胆的尝试，就肯定不可能只有好的一面，并且让每个人在第一次体验后全盘接受（虽然我希望）。
根据你的意见，我觉得要提升体验 首先要解决代码效率问题 以及如何让初次访问者不感到突兀，
个人技术能力有限，只能由高手来实现了，这篇文章权当抛砖引玉。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月30日</a>, <strong>n73手机主题下载</strong>：增加网页的动态效果，打破传统网页背景不变前景变的惯势，当然，这还要归功于HTML5这类新技术的支持，动态背景的思路会否引发一场新的设计潮流，天知道；另一方面由于去掉了背景图片，修改后页面加载速度明显加快。

这个不错啊。。。。谢谢啊。。。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月30日</a>, <strong>winw</strong>：不敢用，怕拖慢了博客。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月30日</a>, <strong>lionshuang</strong>：对阅读的体验是一种劣化，不建议长期使用。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年11月30日</a>, <strong>GuoTao</strong>：嗯嗯嗯，确实，寻找解决方案ing 。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年12月3日</a>, <strong>小羿</strong>：挺酷的，让 flash 情何以堪</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年12月18日</a>, <strong>梧桐</strong>：Firefox对新特效的的确支持不如Webkit的唉,一不注意就卡死..话说,个人不是很喜欢自动播放的东西,比如首页的圣诞flash,嘿嘿..</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年12月18日</a>, <strong>Kainy</strong>：额，这个。。。节日嘛，就图个气氛，呵呵。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年12月24日</a>, <strong>Belleve Invis</strong>：报告测试，ie9 beta和pp7 下面canvas可以正常运作，但是你的检测方式导致一张背景图一直占着位置。</li><li><a href="http://Kainy.CN/2010/11/kaistique/">2010年12月25日</a>, <strong>Kainy</strong>：多谢反馈，有时间会修正的哈，圣诞节快乐~.</li></ol><h4>相关文章：</h4><ol><li><a href="http://Kainy.CN/2010/12/html5%e6%97%a0%e7%bd%aa-css3%e6%9c%89%e7%90%86/" rel="bookmark" title="Permanent Link: 用HTML5无罪，挺CSS3有理">用HTML5无罪，挺CSS3有理</a></li></ol><span>分享本文到：<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/11/kaistique/"><img src="http://a.kainy.cn/201011/xianguo.png" title="分享到鲜果订阅" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/11/kaistique/"><img src="http://a.kainy.cn/201011/sina.png" alt="分享到新浪微博" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/11/kaistique/" title="分享到人人网"><img src="http://a.kainy.cn/201011/renren.png"/></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/11/kaistique/" title="分享到豆瓣网"><img src="http://a.kainy.cn/201011/douban.png" alt="分享到豆瓣网" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/11/kaistique/" title="分享到FaceBook"><img src="http://a.kainy.cn/201011/facebook.png" alt="分享到FaceBook" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/11/kaistique/" title="分享到Twitter"><img src="http://a.kainy.cn/201011/twitter.png" alt="分享到Twitter" /></a>
</span> 
<br />
<h4>版权申明：</h4>
转载请注明作者、出处及原文链接:
<small><blockquote>转自：<br /><a href="http://Kainy.CN/2010/11/kaistique/" title="请以超链接形式注明出处，谢谢！">http://Kainy.CN/2010/11/kaistique/</a>
<br />&copy; 2010 作者及版权归属: <a href="http://www.kainy.cn/index.php/about/about-kainy/">Kainy</a> @ <a href="http://kainy.cn/">Freetao's BLOG</a> &reg; 联络作者:<a href="mailto:gt@kainy.cn?subject=Freetao-Blog-Feed">GT@Kainy.CN</a>.</blockquote> </small>]]></content:encoded>
			<wfw:commentRss>http://Kainy.CN/2010/11/kaistique/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>调用Google Maps API实现HTML5 Geo定位</title>
		<link>http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/</link>
		<comments>http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/#comments</comments>
		<pubDate>Sat, 20 Nov 2010 13:47:44 +0000</pubDate>
		<dc:creator>Kainy</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[作品]]></category>
		<category><![CDATA[应用]]></category>

		<guid isPermaLink="false">http://Kainy.CN/?p=1732</guid>
		<description><![CDATA[HTML5进入人们视线的时间并不长，但我们已经能看到浏览器变得更强大，应用也变得越具智能。充分利用HTML5的新特性能使我们的生活更加便利。这儿就有一个例子——我们结合HTML5技术和地图应用接口来实现定位。 该应用可兼容的浏览器包括：Opera,Chrome, FireFox,Safari。以及……偶滴U8110自带浏览器（Safari Mobile）上测试通过。 . 大致原理是这样的：浏览器通过Google Map Canvas将我们的位置信息发送给API接口，然后显示地图位置。不过目前定位的准确度有时会出问题，比如福州大学城就跑到乌山路去鸟~不太力额。。。 演示地址是：http://kainy.googlecode.com/svn/trunk/HTML5_Geo_location_using_the_Google_API/index.html . 读者评论：2010年11月21日, 万戈：太神奇了，这让我更爱HTML5了2010年11月21日, GuoTao：对啊，期待万戈兄的新主题哦！2010年11月21日, fhcq：好文章2010年11月21日, littlebearz：顶一下～2010年11月24日, 折扣网：楼主写的很不错，没有多余的修饰，文章也显得容易理解。总体感觉很有可读性。顶你一个。欢迎回访哦~2010年11月25日, john：very special2010年11月25日, ugg australia：好先进2010年12月2日, john：makes me want to drink alchoholic beverages2010年12月15日, massage therapist：this post is very usefull thx!2011年01月11日, incorporate business online：I’ve recently started a blog, the information you provide on this site has helped me tremendously. Thank you for [...]]]></description>
			<content:encoded><![CDATA[<p>HTML5进入人们视线的时间并不长，但我们已经能看到浏览器变得更强大，应用也变得越具智能。充分利用HTML5的新特性能使我们的生活更加便利。这儿就有一个例子——我们结合HTML5技术和地图应用接口来实现定位。</p>
<p>该应用可兼容的浏览器包括：Opera,Chrome, FireFox,Safari。以及……偶滴U8110自带浏览器（Safari Mobile）上测试通过。</p>
<p style="text-align: center;"><a href="http://a.kainy.cn/201011/%E6%89%8B%E6%9C%BA%20html5geo%E5%AE%9A%E4%BD%8D%E5%BA%94%E7%94%A8%20%E5%85%81%E8%AE%B8%E5%AE%9A%E4%BD%8Dsnap20101120_212031.png"><img class="shadow aligncenter" src="http://a.kainy.cn/201011/%E6%89%8B%E6%9C%BA%20html5geo%E5%AE%9A%E4%BD%8D%E5%BA%94%E7%94%A8%20%E5%85%81%E8%AE%B8%E5%AE%9A%E4%BD%8Dsnap20101120_212031.png" alt="允许" width="320" height="240" /><span id="more-1732"></span></a>.</p>
<p style="text-align: center;"><a href="http://a.kainy.cn/201011/%E6%89%8B%E6%9C%BA%20html5geo%E5%AE%9A%E4%BD%8D%E5%BA%94%E7%94%A8%20%E6%89%BE%E5%88%B0%E4%BD%8D%E7%BD%AEsnap20101120_212438.png"><img class="shadow aligncenter" src="http://a.kainy.cn/201011/%E6%89%8B%E6%9C%BA%20html5geo%E5%AE%9A%E4%BD%8D%E5%BA%94%E7%94%A8%20%E6%89%BE%E5%88%B0%E4%BD%8D%E7%BD%AEsnap20101120_212438.png" alt="定位成功" width="320" height="240" /></a></p>
<p>大致原理是这样的：浏览器通过Google Map Canvas将我们的位置信息发送给API接口，然后显示地图位置。不过目前定位的准确度有时会出问题，比如福州大学城就跑到乌山路去鸟~不太力额。。。</p>
<p style="text-align: center;"><a href="http://a.kainy.cn/201011/%E5%AE%9A%E4%BD%8D%E5%81%8F%E5%B7%AE.png"><img class="shadow aligncenter" src="http://a.kainy.cn/201011/%E5%AE%9A%E4%BD%8D%E5%81%8F%E5%B7%AE.png" alt="Googlemap定位误差" width="400" height="380" /></a></p>
<p style="text-align: center;">演示地址是：<a href="http://kainy.googlecode.com/svn/trunk/HTML5_Geo_location_using_the_Google_API/index.html" target="_blank">http://kainy.googlecode.com/svn/trunk/HTML5_Geo_location_using_the_Google_API/index.html</a> .</p>
<hr /><h4>读者评论：</h4><ol><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2010年11月21日</a>, <strong>万戈</strong>：太神奇了，这让我更爱HTML5了</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2010年11月21日</a>, <strong>GuoTao</strong>：对啊，期待万戈兄的新主题哦！</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2010年11月21日</a>, <strong>fhcq</strong>：好文章</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2010年11月21日</a>, <strong>littlebearz</strong>：顶一下～</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2010年11月24日</a>, <strong>折扣网</strong>：楼主写的很不错，没有多余的修饰，文章也显得容易理解。总体感觉很有可读性。顶你一个。欢迎回访哦~</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2010年11月25日</a>, <strong>john</strong>：very special</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2010年11月25日</a>, <strong>ugg australia</strong>：好先进</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2010年12月2日</a>, <strong>john</strong>：makes me want to drink alchoholic beverages</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2010年12月15日</a>, <strong>massage therapist</strong>：this post is very usefull thx!</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2011年01月11日</a>, <strong>incorporate business online</strong>：I’ve recently started a blog, the information you provide on this site has helped me tremendously. Thank you for all of your time &amp; work.</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2011年05月16日</a>, <strong>钢丝</strong>：太调皮了，位置差了二十公里以上</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2011年05月16日</a>, <strong>Kainy</strong>：哈哈，在大陆，Google就是爱“逗你玩”.</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2011年11月15日</a>, <strong>长春网站设计</strong>：Google推广挺难的</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2011年11月23日</a>, <strong>长春网站推广</strong>：仔细读过，真的是篇好文章</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2011年11月30日</a>, <strong>长春建网站公司</strong>：合HTML5技术和地图应用接口来实现定位，方法真的很不错</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2011年12月7日</a>, <strong>通化建网站公司</strong>：看了博主的文章真是受益匪浅，支持了！</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2011年12月12日</a>, <strong>道依茨</strong>：博主文章写的很精彩，支持一下！</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2011年12月15日</a>, <strong>长春日租房</strong>：博主的文章非常不错  进来支持一下！</li><li><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/">2012年03月20日</a>, <strong>长春起名</strong>：文物</li></ol><h4>相关文章：</h4><ol><li><a href="http://Kainy.CN/2010/08/u8110%e6%88%aa%e5%b1%8f/" rel="bookmark" title="Permanent Link: 亮亮我的新手机：小幽">亮亮我的新手机：小幽</a></li><li><a href="http://Kainy.CN/2010/08/google-maps-for-android/" rel="bookmark" title="Permanent Link: Google maps for Android纪行">Google maps for Android纪行</a></li><li><a href="http://Kainy.CN/2010/06/%e6%9c%80%e6%96%b0host%e6%96%87%e4%bb%b6/" rel="bookmark" title="Permanent Link: 很全的host记录文件">很全的host记录文件</a></li><li><a href="http://Kainy.CN/2010/11/mac%e4%b8%8a%e7%9a%8430%e4%b8%aa%e6%9c%80%e4%bd%b3web%e5%bc%80%e5%8f%91%e5%b7%a5%e5%85%b7/" rel="bookmark" title="Permanent Link: Mac上的30个最佳Web开发工具">Mac上的30个最佳Web开发工具</a></li></ol><span>分享本文到：<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/"><img src="http://a.kainy.cn/201011/xianguo.png" title="分享到鲜果订阅" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/"><img src="http://a.kainy.cn/201011/sina.png" alt="分享到新浪微博" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/" title="分享到人人网"><img src="http://a.kainy.cn/201011/renren.png"/></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/" title="分享到豆瓣网"><img src="http://a.kainy.cn/201011/douban.png" alt="分享到豆瓣网" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/" title="分享到FaceBook"><img src="http://a.kainy.cn/201011/facebook.png" alt="分享到FaceBook" /></a>
<a rel="nofollow" target="_blank" href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/" title="分享到Twitter"><img src="http://a.kainy.cn/201011/twitter.png" alt="分享到Twitter" /></a>
</span> 
<br />
<h4>版权申明：</h4>
转载请注明作者、出处及原文链接:
<small><blockquote>转自：<br /><a href="http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/" title="请以超链接形式注明出处，谢谢！">http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/</a>
<br />&copy; 2010 作者及版权归属: <a href="http://www.kainy.cn/index.php/about/about-kainy/">Kainy</a> @ <a href="http://kainy.cn/">Freetao's BLOG</a> &reg; 联络作者:<a href="mailto:gt@kainy.cn?subject=Freetao-Blog-Feed">GT@Kainy.CN</a>.</blockquote> </small>]]></content:encoded>
			<wfw:commentRss>http://Kainy.CN/2010/11/%e8%b0%83%e7%94%a8google-maps-api%e5%ae%9e%e7%8e%b0html5-geo%e5%ae%9a%e4%bd%8d/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>

