<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dcterms="http://purl.org/dc/terms/">
 <channel>
  	  <title><![CDATA[enotsl的博客]]></title>
	  <link>http://enotsl.blog.163.com</link>
	  <description><![CDATA[ 个人网文收藏夹，当中大部分来为转贴，未留作者名请告知我将加上]]></description>
	  <language>zh-CN</language>
	  <pubDate>Thu, 17 May 2012 07:14:13 +0800</pubDate>
	  <lastBuildDate>Thu, 17 May 2012 07:14:13 +0800</lastBuildDate>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <generator><![CDATA[NetEase Space]]></generator>
	  <managingEditor><![CDATA[enotsl]]></managingEditor>
	  <webMaster><![CDATA[enotsl]]></webMaster>
		  <ttl>120</ttl>
	  <image>
	  	<title><![CDATA[enotsl的博客]]></title>
	  	<url>http://enotsl.blog.163.com/style/common/user_default.png</url>
	  	<link>http://enotsl.blog.163.com</link>
	  </image>
  <item>
  	<title><![CDATA[jQuery最佳实践：精妙的自定义事件]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020124951627175</link>
    <description><![CDATA[<div><div style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(248, 248, 248); width: 597px; padding-top: 12px; padding-right: 18px; padding-bottom: 0px; padding-left: 18px; margin-top: 10px; border-top-color: rgb(216, 217, 217); border-right-color: rgb(216, 217, 217); border-left-color: rgb(216, 217, 217); border-top-width: 1px; border-right-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-left-style: solid; border-image: initial; border-bottom-style: none; border-bottom-width: initial; border-bottom-color: initial; color: rgb(51, 51, 51); font-family: 宋体; font-size: 12px; line-height: 18px; text-align: -webkit-auto;"  ><h1 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 12px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 0, 0); background-color: transparent; height: 45px; font-size: 22px; line-height: 42px; text-align: center; border-bottom-color: rgb(216, 217, 217); border-bottom-width: 1px; border-bottom-style: solid;"  >jQuery最佳实践：精妙的自定义事件</h1><div style="color: rgb(105, 105, 105); line-height: 36px; text-align: center; position: relative;"  ><div>2010-08-12 09:45 乐纹前端设计 博客园&nbsp;<span><a style="color: rgb(0, 66, 118); text-decoration: none; " target="_self" rel="nofollow" href="http://developer.51cto.com/art/201008/218553.htm#commment"  >我要评论(<span id="pinglun_1"  >0</span>)</a></span>&nbsp;字号：<span style="font-family: arial; font-weight: bold; font-size: 14px;"  ><a style="color: rgb(0, 66, 118); text-decoration: none; " target="_self" rel="nofollow" href="http://developer.51cto.com/art/201008/218553.htm"  >T</a></span>&nbsp;|&nbsp;<span style="font-family: arial; font-weight: bold; font-size: 16px;"  ><a style="color: rgb(0, 66, 118); text-decoration: none; " target="_self" rel="nofollow" href="http://developer.51cto.com/art/201008/218553.htm"  >T</a></span></div><div style="width: 49px; height: 38px; padding-top: 4px; padding-right: 0px; padding-bottom: 0px; padding-left: 8px; position: absolute; top: 5px; right: 0px;"  ><a title="&#19968;&#38190;&#25910;&#34255;&#65292;&#38543;&#26102;&#26597;&#30475;&#65292;&#20998;&#20139;&#22909;&#21451;&#65281;" style="color: rgb(0, 66, 118); text-decoration: none; " target="_self" rel="nofollow" href="http://developer.51cto.com/art/201008/218553.htm"  ><img title="jQuery最佳实践：精妙的自定义事件 - enotsl - enotsl的博客"  src="http://images.51cto.com/images/art/newart1012/images/Fav.gif"  alt="一键收藏，随时查看，分享好友！"  border="0"  style="border-top-width: medium; border-right-width: medium; border-bottom-width: medium; border-left-width: medium; border-style: initial;"  ></a></div></div><div style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); border-top-color: rgb(115, 160, 207); border-right-color: rgb(115, 160, 207); border-bottom-color: rgb(115, 160, 207); border-left-color: rgb(115, 160, 207); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-image: initial; line-height: 26px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; background-position: initial initial; background-repeat: initial initial;"  ><p style="margin-top: 0px; margin-bottom: 0px; color: rgb(0, 102, 0); background-color: transparent; font-size: 14px;"  >本文以作者实际应用开发过程中遇到的一个例子说明“什么时候用jQuery的自定义事件以及怎么用”，希望可以抛砖引玉，对广大JavaScript开发者有所帮助。</p><p style="margin-top: 0px; margin-bottom: 0px; background-color: transparent; text-align: right;"  >AD：</p></div></div><div style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(248, 248, 248); padding-top: 12px; padding-right: 18px; padding-bottom: 0px; padding-left: 18px; border-right-color: rgb(216, 217, 217); border-bottom-color: rgb(216, 217, 217); border-left-color: rgb(216, 217, 217); border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-image: initial; border-top-style: none; border-top-width: initial; border-top-color: initial; line-height: 28px; margin-bottom: 10px; position: relative; min-height: 500px; color: rgb(51, 51, 51); font-family: 宋体; text-align: -webkit-auto;"  ><div id="content"  ><p style="background-color: transparent; text-indent: 28px;"  ></p><p style="background-color: transparent; text-indent: 28px;"  >对于jQuery自定义事件，很多JavaScript开发者都会有所疑惑：在日常开发过程中会不会用到呢？而本文将结合一个开发案例，其中的一些地方应用到了jQuery的自定义事件，而且达到了很好的效果-精简代码的同时充分利用了OO的原则。</p><p style="background-color: transparent; text-indent: 28px;"  >51CTO推荐专题：&nbsp;<a style="color: rgb(0, 66, 118); " target="_blank" rel="nofollow" href="http://developer.51cto.com/art/201005/202450.htm"  ><span style="color: rgb(0, 0, 255);"  >jQuery从入门到精通</span></a></p><p style="background-color: transparent; text-indent: 28px;"  ><strong style="text-align: center;"  >问题</strong></p><p style="background-color: transparent; text-indent: 28px;"  >一个复选框X，你如何便捷地触发它的click事件的处理逻辑，但是又不改变它当前的选中状态？</p><p style="background-color: transparent; text-indent: 28px;"  ><strong style="text-align: center;"  >答案</strong></p><p style="background-color: transparent; text-indent: 28px;"  >其实没有什么标准答案，用传统的方式，写一个函数：</p><pre style="margin-top: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230);"  ><ol style="margin-top: 0px !important; margin-bottom: 1px !important; margin-left: 55px; padding-top: 5px; padding-bottom: 5px; color: rgb(92, 92, 92); list-style-position: initial; list-style-image: initial; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(247, 247, 247);"  ><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-color: inherit;"  >var&nbsp;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: red; background-color: inherit;"  >onClick</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-color: inherit;"  >=</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: blue; background-color: inherit;"  >function</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-color: inherit;"  >(dom){//复选框x的Click事件的处理逻辑};&nbsp;</span></span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  >&nbsp;</li></ol></pre><p style="background-color: transparent; text-indent: 28px;"  >当仅仅需要执行处理逻辑而不改变复选框的状态时：</p><pre style="margin-top: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230);"  ><ol style="margin-top: 0px !important; margin-bottom: 1px !important; margin-left: 55px; padding-top: 5px; padding-bottom: 5px; color: rgb(92, 92, 92); list-style-position: initial; list-style-image: initial; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(247, 247, 247);"  ><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >onClick(X);//X引用复选框&nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  >&nbsp;</li></ol></pre><p style="background-color: transparent; text-indent: 28px;"  >为了响应用户直接点击复选框，你还需要为复选框X添加相应的Click处理函数：</p><pre style="margin-top: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230);"  ><ol style="margin-top: 0px !important; margin-bottom: 1px !important; margin-left: 55px; padding-top: 5px; padding-bottom: 5px; color: rgb(92, 92, 92); list-style-position: initial; list-style-image: initial; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(247, 247, 247);"  ><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >$(X).click(function(evt){&nbsp;&nbsp;//执行处理逻辑&nbsp;&nbsp;onClick(this);});</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;</span></li></ol></pre><p style="background-color: transparent; text-indent: 28px;"  >但是，我要说的是，这里可以利用自定义事件处理函数封装复选框Click事件的处理逻辑！然后触发该自定义事件。而且个人觉得具有必要性和优点：</p><p style="background-color: transparent; text-indent: 28px;"  ><strong style="text-align: center;"  >1，onClick的逻辑是属于复选框自身的，没有必要用一个全局方法来定义并剥离复选框对象。</strong></p><p style="background-color: transparent; text-indent: 28px;"  >从面向对象的角度说，对象由属性和行为（方法）构成，所以onClick的逻辑可以封装在复选框的作用域（context）内。</p><p style="background-color: transparent; text-indent: 28px;"  ><strong style="text-align: center;"  >2，充分利用匿名函数，减少全局变量或者函数的数量，有利于提高脚本的执行效率。</strong></p><p style="background-color: transparent; text-indent: 28px;"  ><strong style="text-align: center;"  >代码示例</strong></p><p style="background-color: transparent; text-indent: 28px;"  >1，首先定义一个变量$x引用缓存我们的复选框对象。这点非常重要但很多js开发员没有意识到：每调用一次jQuery的$方法选中某个元素＝遍历一次html dom树。所以要学会利用JavaScript变量缓存对象。</p><pre style="margin-top: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230);"  ><ol style="margin-top: 0px !important; margin-bottom: 1px !important; margin-left: 55px; padding-top: 5px; padding-bottom: 5px; color: rgb(92, 92, 92); list-style-position: initial; list-style-image: initial; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(247, 247, 247);"  ><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-color: inherit;"  >var&nbsp;$</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: red; background-color: inherit;"  >x</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-color: inherit;"  >=$(X);&nbsp;</span></span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  >&nbsp;</li></ol></pre><p style="background-color: transparent; text-indent: 28px;"  >2，定义一个自定义事件evtClick，封装处理逻辑。</p><pre style="margin-top: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230);"  ><ol style="margin-top: 0px !important; margin-bottom: 1px !important; margin-left: 55px; padding-top: 5px; padding-bottom: 5px; color: rgb(92, 92, 92); list-style-position: initial; list-style-image: initial; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(247, 247, 247);"  ><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >$x.bind("evtClick",function(evt){&nbsp;&nbsp;&nbsp;&nbsp;//onClick的处理逻辑});&nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  >&nbsp;</li></ol></pre><p style="background-color: transparent; text-indent: 28px;"  >3，当要执行处理逻辑又不想改变复选框的选中状态时，利用trigger方法触发evtClick事件。</p><p style="background-color: transparent; text-indent: 28px;"  ></p><pre style="margin-top: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230);"  ><ol style="margin-top: 0px !important; margin-bottom: 1px !important; margin-left: 55px; padding-top: 5px; padding-bottom: 5px; color: rgb(92, 92, 92); list-style-position: initial; list-style-image: initial; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(247, 247, 247);"  ><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >$x.trigger("evtClick");&nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  >&nbsp;</li></ol></pre><p style="background-color: transparent; text-indent: 28px;"  >4，click事件。</p><pre style="margin-top: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230);"  ><ol style="margin-top: 0px !important; margin-bottom: 1px !important; margin-left: 55px; padding-top: 5px; padding-bottom: 5px; color: rgb(92, 92, 92); list-style-position: initial; list-style-image: initial; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(247, 247, 247);"  ><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >$x.click(function(evt){&nbsp;&nbsp;$x.trigger("evtClick");});</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;</span></li></ol></pre><p style="background-color: transparent; text-indent: 28px;"  ><strong style="text-align: center;"  >jQuery触发自定义事件并传参</strong></p><pre style="margin-top: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230);"  ><ol style="margin-top: 0px !important; margin-bottom: 1px !important; margin-left: 55px; padding-top: 5px; padding-bottom: 5px; color: rgb(92, 92, 92); list-style-position: initial; list-style-image: initial; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(247, 247, 247);"  ><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >$("input").bind("myevent",function(event,msg1,msg2){&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert("msg1:"+msg1);&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$("input").click(function(){&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$("input").trigger("myevent",["avalue","bvalue"])&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >$("input").bind("myevent",function(event,msg1,msg2){ &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;alert("msg1:"+msg1); &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;}) &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;$("input").click(function(){ &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;$("input").trigger("myevent",["avalue","bvalue"]) &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;</span></li></ol></pre><p style="background-color: transparent; text-indent: 28px;"  ><strong style="text-align: center;"  >自定义事件：</strong></p><pre style="margin-top: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(230, 230, 230);"  ><ol style="margin-top: 0px !important; margin-bottom: 1px !important; margin-left: 55px; padding-top: 5px; padding-bottom: 5px; color: rgb(92, 92, 92); list-style-position: initial; list-style-image: initial; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(247, 247, 247);"  ><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-color: inherit;"  >var&nbsp;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: red; background-color: inherit;"  >Common</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-color: inherit;"  >&nbsp;=&nbsp;{};&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span></span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: red; background-color: inherit;"  >Common.Dialog</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;=&nbsp;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: blue; background-color: inherit;"  >function</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >(config){};&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: red; background-color: inherit;"  >Common.Dialog.prototype</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;=&nbsp;{&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height:310,&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;init:&nbsp;function(){&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jQuery.event.trigger("submit");&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;};&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >var&nbsp;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: red; background-color: inherit;"  >dlg</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;=&nbsp;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: blue; background-color: inherit;"  >new</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;Common.Dialog({height:200});&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(dlg).bind("submit",function(){alert("submit&nbsp;event")});&nbsp;&nbsp;&nbsp; &nbsp;</span></li><li style="margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important; padding-top: 0px !important; padding-right: 3px !important; padding-bottom: 0px !important; padding-left: 10px !important; color: inherit; list-style-type: decimal; list-style-position: outside !important; list-style-image: none; word-wrap: break-word; word-break: normal; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; line-height: 18px; background-position: -498px -70px; background-repeat: no-repeat repeat;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; color: black; background-color: inherit;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dlg.init();&nbsp;&nbsp;</span></li></ol></pre></div></div><wbr></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020124951627175</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020124951627175</guid>
    <pubDate>Wed, 9 May 2012 17:16:27 +0800</pubDate>
    <dcterms:modified>2012-05-09T17:16:27+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[2012年05月04日]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020124403121597</link>
    <description><![CDATA[<div><span style="color: rgb(255, 0, 0);"  >09年8月底，苹果正式发布了新一代Mac OS X Snow Leopard操作系统。苹果操作系统一直在用户友好度和安全稳定性方面广受好评。<br><br>苹果操作系统只允许在苹果电脑上面安装和使用。和Windows不一样，要在PC上安装，需要一系列的模拟和破解。破解安装的过程很繁琐而具有挑战性，以下是安装10A432雪豹的PC安装指南，附带25张图片帮助说明,没有远景ID的朋友可以打开链接查看。<br><br><br>请准备必要的东西：<br>配备Windows操作系统而且能够上网的PC<br>雪豹安装光盘dmg镜像文件（10A432正式零售版MD5校验码是bcd4957b2f86216dddc8f1472c20f098）<br>23G的可用空间<br>你的勇气和耐性<br><br>这个指南可能最适合从来都没在PC上安装过苹果系统的朋友，因为你<br><br>不需要外加USB键盘鼠标<br>不需要启动U盘<br>不需要DVD刻录机（如果你已经下载有镜像甚至不需要光驱）<br>不需要第二块硬盘和GPT分区表<br>不需要另外一个正常运转的苹果系统（破解操作全都可以在Windows完成，不需要另外的平台）<br>不需要输入一句又一句的命令行。<br><br>全过程快速预览：<br><br>第一步，缩小当前分区，为雪豹和安装盘腾出空间<br>第二步，加载dmg到分区并修改<br>第三步，配置开机引导程序<br>第四步，使用苹果光盘镜像安装雪豹<br>第五步，启动雪豹<br>第六步，安装后操作<br><br><b>第一步：缩小现有分区卷</b><br><br>雪 豹使用自己的文件系统，HFS+，不兼容Windows的NTFS文件系统，这个指南需要2个HFS+分区完成安装任务，其中一个大小是6.3GB，用来 放雪豹安装光盘，另一个用来放雪豹操作系统，大小是20GB（按照自己需要增减，操作系统本身就占了约4.5GB）。为了保证你的文件不会丢失，你需要把 现在的分区（如D盘），一分为三，旧文件放在一起是一个分区不受影响，分区剩下的空余空间被用来新建两个额外HFS+分区（如E盘、F盘）。 <br><br>下面举例说明详细步骤，<br>注意，我的电脑配置与你不同，下面例子只是用于说明过程和方法以帮助你理解我的意思，你需要根据自己的配置灵活变通。<br><br>1.右键点击我的电脑（计算机）——&gt;管理——&gt;弹出来的窗口左边的磁盘管理，这里你可以看见你的硬盘分区状况。<br><br>2. 我的D盘有很多的剩余空间，所以我拿它来开刀，之前说过，我们共需要20+6.3=26.3GB的空间，因此，我要先把D盘缩小26.3G，在D盘上点击 右键——&gt;压缩卷然后在弹出来的框输入26906（1024MB/GB×26.3GB），然后按确定即可。（XP用户和使用FAT32格式的用户如 无法压缩卷可以使用Acronis Disk Director Suite或Paragon  PM实现类似功能）虽然这个指南的操作不会删除你硬盘上的数据，不过，在处理与分区有关的步骤是整个指南里面最危险的一步，稍有不慎，你的数据将在弹指间 烟消云散，请一定不要忽略任何警告框里面的提示。<br> <span id="att_1039939"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_b5bbfdb3447b3b4.jpg"  border="0"  ></span><br><br>3.压缩D盘后你会发现D盘的文件毫发无损，只是分区大小变化了，可用空间少了26.3G。磁盘出现了不属于任何分区的26.3G未分配空间。<br><br>4. 右键点击未分配空间——&gt;新建简单卷，点击下一步后输入6426（1024MB/GB×6.3GB），下一步将此空间分配到E，不要格式化（感谢 387楼mark_ald的提醒）。完成之后Windows会弹出框告诉你需要格式化E才能访问，先谢谢她的好意，不过选择取消，不格式化。<br><br>5.用同样的办法把剩下的20G也新建一个卷。这个卷随便你格不格式化。<br><br>完成后变成这个样子：109G的D盘拆开3部分，82.7G、6.3G、20G，D盘的东西没有任何损失。<br> <span id="att_1039940"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_e915a7ad894ed57.jpg"  border="0"  ></span><br><br>这 里的一个技巧是，6.3GB的盘一定要靠近原来的D盘，等安装完成后把这个光盘拆了，用扩展卷功能又能够让它的空间合到D盘里面。正如我上面所说，你需要 灵活变通，我是用D盘，但是你可以用其他的什么F、G也行，建议不要拿Windows系统盘开刀，因为里面可能有无法移动的顽固文件阻碍你改变分区大小。<br><br></span><b>第二步：加载DVD到硬盘并修改。</b><br>A.我们首先提取苹果安装光盘里面的HFS+的含有文件部分，扔掉阻碍我们下一步操作的引导层等部分<br><br>1.下载HFS-Explorer并安装（文章所有软件的下载链接都已包含在5楼）。<br><br>2.若你的Windows之前没有安装Java VM（Java JRE虚拟机），也另需下载安装。<br><br>3. 打开HFS-Explorer点击"File"—&gt;"Load file system from  file"，在弹出框里找到雪豹的安装光盘DMG文件，然后在弹出框里选含有HFS+那一项，然后点OK即可。已购买苹果DVD的朋友插入光盘后点 击"File"—&gt;"Load file system from device"，然后点击“Load”<br><br>4.打开光盘文件后点 击"Tool"—&gt;"Create disk  image"，在弹出框选择路径，点击保存，如果你硬盘空间紧张连这6.27GB空间都没有的话也可以借用一下之前的20GB分区。这里需要等待硬盘哇哇 叫好几分钟。来杯热茶、弄块巧克力如何？需要注意的是,保存这6.27G文件的目标分区只能是NTFS,FAT32有单一文件不能超越4GB限制。<br> <span id="att_1039950"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_67ecddac6e03220.jpg"  border="0"  ></span><br>B.下面把新建的dmg文件放进6.3G的硬盘里面。<br><br>1.下载leopard硬盘安装助手，这是我们中国人写的软件。<br><br>2.右键以系统管理员身份打开（XP可直接双击打开）<br><br>3.在镜像文件一项选择新建的dmg文件，目标分区自然是6.3G的盘了。下面3个复选框都不要打勾，那些方法已经过时。<br><br>4.点击开始，可以看见蓝色进度条过去，这里又需要等待好几分钟的硬盘嘎嘎声。<br><br>5. 此时如果程序出现没响应也不必担心，耐心等待拷贝完成。确保完成后出现Change Partition type to AF:  success字样如下（感谢夜秋离和huangheyuan的提醒），如果是Failed的话，把分区格式化，再删除重新来一遍，或者手动使用 Acronis Disk Director Suite或Paragon  PM把分区格式标志设为AF，AF是16进制里面175的意思，HFS分区应有AF的标记。<br>&nbsp;&nbsp;<span id="att_1039951"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_8f23297c8e45d69.jpg"  border="0"  ></span><br><br>C.使用MacDrive对E盘进行小修改，使苹果安装盘能识别MBR<br><br>要使Windows访问HFS+分区，安装MacDrive，安装后重新启动就可以看到E盘里面的东西。重启后发现E盘不见了的同学可以把MacDrive从Windows开机自启动列表踢出去，再使用上面提到的分区工具手动添加E:的盘符。<br><br>Windows 默认使用MBR分区表，所以我们硬盘上的分区多数是以MBR分区表构建。而苹果只允许安装在GPT（GUID）分区表下，一个硬盘只能在MBR和GPT二 者选择其一，将MBR改成GPT会把磁盘上所有分区所有数据删除。为此，我们要对DVD作一个小调整，使其能安装在MBR分区表下。<br><br>在文件夹选项打开显示隐藏文件，将5楼附件中的<br><br>OSInstall 文件拖放到E盘的/System/Library/PrivateFrameworks/Install.framework/Frameworks /OSInstall.framework/Versions/A/，覆盖原文件。感谢liudonghua123提醒<br><br>现在我们已经完成对苹果原版光盘的小修改，雪豹将可以安装在MBR分区里面。<br><br>如果你的电脑不是使用Intel的多核CPU，如AMD全系列CPU或Intel的奔腾单核，（10.6.2以后版本Atom系列不再被支持），你还需要把光盘根目录的mach_kernel内核文件替换成破解内核，破解内核的信息可以在其他指南找到。<br><br><b>第三步：使用Bootthink或变色龙Chameleon启动雪豹安装盘</b> <br>下 载Bootthink，并安装。bootthink也是中国人研发的，当然，它同样采用了Dave经典的Boot132代码，现在支持雪豹。安装 后，Windows的启动菜单就会多了Bootthink的选项。在Windows的启动菜单选择Bootthink就会出现选择进入哪个分区的界面，选 择进去我们的6.3G分区Mac OS X Install  DVD就能够启动雪豹。如果选择了Bootthink没有出现下图界面,试把C盘转成NTFS(感谢243楼gaomulei83友情提示)。  从FAT32转到NTFS的过程很快,且数据不会丢失,详见 Windows  帮助文档。选择Bootthink后直接重启的朋友可使用diskpart.exe或其他分区工具将6.3G分区重新标记为AF，代指HFS分区的。如果 Bootthink找不到有AF标记的分区就会自动重启。详细方法见1131楼mvgmy的备忘<br><br>如果你无法解决此类与Bootthink 有关问题，考虑使用替代方案，变色龙启动程序。这个来自wowpc的软件设计非常巧妙。通过调用一个通常用来启动Linux的程序，Grub，来开动一张 只有1M大小的变色龙自启动CD镜像iso。与Bootthink一样，如此灵活的方法真令U盘启动、光盘启动等方法黯然失色。如果无法进入变色龙，可能 是不完整的MBR导致了这个问题，XP用户可以使用安装光盘的FixMBR命令修复，Vista/7的用户使用bootrec /fixmbr。<br><br>在 Windows安装变色龙启动程序后，与Bootthink类似的，启动菜单多了Chameleon一项，选择进入变色龙界面即可。如果两个启动程序都无 法使用，只能尝试通过重装系统来解决问题，这是下策，但如果你确实需要这样做，我的建议是使用微软官方MSDN版本的原版系统或者是随电脑附带的正版光盘 （不是Ghost）来进行安装。<br><span style="color:#FF0000 ;"  >bootthink</span><br> <span id="att_1039952"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_4ade08a18fb4878.jpg"  border="0"  ></span><br><span style="color:#FF0000 ;"  >变色龙</span> <br> <span id="att_1039953"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_a05b9f62e003fe6.jpg"  border="0"  ></span><br><br>如 果你的CPU不支持64位和SSSE3指令集的话，就首先需要在上面界面按F8进入命令行，输入-x32来调用32位系统内核，因为启动程序默认调用64 位内核。如果你不知道究竟CPU是否支持的话，还是建议使用32位的内核，因为64位内核不会带来任何好处，除非你的内存大于4GB。相反，64位内核很 可能引起某些32位kext文件的兼容性问题。输入-x32后点击回车后你就能够进入苹果安装界面了。<br>&nbsp;&nbsp;<span id="att_1039954"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_16d96adba6ce67d.jpg"  border="0"  ></span><br>然而，这仅仅是最理想的情况，多数情况你还需要更多的破解才能进入安装盘界面，在这里你可以先试一试你的人品如何。如果你能够顺利进入安装界面，你已经成功七七八八了。<br><br>不过，很多人在这里会遇到这个情况，<br>&nbsp;&nbsp;<span id="att_1039955"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_b918889ffd7e4f0.jpg"  border="0"  ></span><br>有五国语言提示死机，需要重启系统，俗称“五国”。在上一版本Leopard还只有四国语言。<br><br>还有就是一个禁止标志在苹果上面。<br>&nbsp;&nbsp;<span id="att_1039956"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_06dcbba99b303b9.jpg"  border="0"  ><br><br></span>也或许开机时你的系统闪了一闪就自动重启，没有留下任何线索，很可能问题出现在CPU/内核的问题上，例如，上面说了，一些CPU需要破解内核，或者需要调整BIOS里面的CPU相关设置、又或者需要以-x32启动，或强制多核CPU使用单核以cpus=1启动。<br><br>“五 国”的解决方案比较复杂，稍后在Troubleshooting会告诉你怎么做。解决禁止符号就相对简单一点，你只需要打开BIOS里面的SATA  AHCI功能就可以了。至于如何打开AHCI需要参阅你的电脑说明书。如果打开AHCI功能令你原来的Windows无法启动，不必担心，关闭AHCI后 在Windows安装AHCI驱动即可以解决，详情查看微软网站。如果你的主板没有AHCI功能，又或者是，你的硬盘不是SATA，你需要另外搜索你主板 ATA芯片的kext文件来驱动，如英特尔ICH南桥芯片的kext。然后把kext安装在bootthink上，在下面Kext部分我会详细介绍。<br><br><br>Troubleshooting<br><br>启 动安装盘的过程错误百出，古灵精怪，下面举例介绍遇到问题如何解决。这是整个安装过程最需要技巧和耐性的步骤。出现“五国”问题后，首先需要知道原因，在 Bootthink的界面，按F8，输入-v，可以打开Verbose“啰嗦”模式，啰嗦模式不会解决问题，不过你可以查看启动出错的地方。如果需要同时 32位模式，可以输入-x32 -v。<br> <span id="att_1039959"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_f37adceac2629ed.jpg"  border="0"  ></span><br>例子：AppleIntelCPUPowerManagement错误<br><br>开机出现“五国”，重启后调用啰嗦模式，运行到下面的画面停止<br>&nbsp;&nbsp;<span id="att_1039960"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_a3645e5f3b702cc.jpg"  border="0"  ></span><br>上 面可以看到panic的字样出现在第五行，panic原本是恐慌的意思，在这里表示系统遇到致命错误。panic后面通常写着错误的原因，在这里是No  HPETs available...，段落的最后一行，也就是BSD  Process的上面一行，写明出错的模块，在这里是AppleIntelCPUPowerManagement，得到这些信息后到Google很容易就 能够找到解决方案——安装NullCPUPowerManagement.kext，在下面Kext部分我会详细介绍如何安装。<br><br>很多跟贴 的朋友反映,苹果消失后出现灰屏幕,还有一种情况是,苹果下面的东西无休止地转,开机启动页面中途停止在 ACPI_SMC_Platform_PlugIn,但又没有“五国”,这时你还差一点点就进入了。这些问题可能与显卡有关,你可以尝试-x启动安全模 式,或者加载显卡Kext。<br><br>Kext<br><br>kext是内核扩展的缩写，它就好比积木，构建在内核上面，为内核提供扩展功能。黑 苹果的高手们利用这点来制作破解kext，以解决启动问题，所以很多时候破解需要安装一些kext文件。有些时候把出现问题的Kext删掉也未尝不可，删 掉之前一定要做好备份工作，删除很简单，在E:/System/Library/Extensions下找到引致问题的祸首直接删掉。<br><br>Kext安装<br><span style="color:#FF0000 ;"  >如果你使用Bootthink：</span><br><br>在 Bootthink下面安装kext非常简单，把下载回来的以.kext为后缀的文件夹，移动到路径C:\Darwin\System \LibrarySL\Extensions\下面即可。Bootthink在启动苹果时会加载这些kext。以往的kext安装要在苹果下面进行，还需 要处理权限问题。<br><br>我建议将<br>C:\Darwin\System\LibrarySL\Extensions\Extensions.mkext<br>C:\Darwin\System\LibrarySL\x32\Extensions\Extensions.mkext<br>C:\Darwin\System\LibrarySL\x64\Extensions\Extensions.mkext<br>删除，因为我们不需要这些文件，也不知道这几个mkext会否与新加上的kext冲突。<br><br><span style="color:#FF0000 ;"  >如果你使用变色龙Chameleon：</span><br><br>新建E:\Extra\Extensions，把下载回来的以.kext为后缀的文件夹搬到里面。Chameleon启动时就会自动加载。稍后安装雪豹成功到F:后，同样的要把内容复制到F:\<br><br>---<br>常用的一些kext：<br><br>FakeSMC.kext —— bootthink原来已经带有，这个kext模拟真正苹果机上的SMC部件，必备<br><br>NullCPUPowerManagement.kext <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;—— 将电源管理功能禁用，解决IntelCPUPowerManagement.kext的HPET错误<br><br>OpenHaltRestart.kext　　　—— 解决重启/关机无法断电问题<br>PlatformUUID.kext　　　　 —— 解决Unable to determine UUID for host. Error : 35的问题<br><br>VoodooPS2Controller.kext&nbsp;&nbsp;<br>AppleACPIPS2Nub.kext 组合<br>2个要一起使用，提供传统PS/2插口鼠标/键盘或笔记本触摸板支持<br><br>或<br>ApplePS2Controller.kext<br>AppleACPIPS2Nub.kext 组合<br>2个要一起使用，如果Voodoo不工作，你可用ApplePS2Controller代替。<br><br>如果2个组合都不工作，你可以找网上其他版本的Kext试试。<br><br><br>这些kext都可从5楼连接下载，同时兼容32位和64位。<br><br>以 上的kext文件，你需要它们的可能性从上到下递减，第一个kext基本上是必备的，下面的是你遇到其它问题相对应要的kext。除此之外，你可能还需要 别的kext来解决更多的问题，需要你遇到问题后自行到Google搜索解决方案。有些kext能兼容64位，而有些不可以的，kext如果不兼容64 位，在bootthink界面你需要按F8进入命令行，输入-x32，回车，此时雪豹将使用32位内核模式，同时使用32位的kext。<br><br>这个步骤完成后成功进入到安装程序时，你已经完成了总进程的80%，下面的步骤会相对简单。如果无法进入安装界面，最佳的办法就是不断尝试新的解决方案，在没找到证实你的硬件无法安装苹果系统前不要放弃。如果你连苹果的样子都看不到，检查之前的拷贝DVD步骤有没有弄错。<br><br><b>第四步，安装雪豹</b><br>选择语言后，下一步就是安装了。<br><br>首先我们要先把之前分配好的20GB转变成HFS+分区，打开磁盘工具<br> <span id="att_1039977"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_10e2984c0481337.jpg"  border="0"  ></span><br>&nbsp;&nbsp;<span id="att_1039978"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_c67bece28095c6d.jpg"  border="0"  ></span><br>选中左面20GB的分区，在右边选“抹掉”，在格式选择“Mac OS扩展 （日志式）”，然后在下面写上你喜欢的名字，点击右下角的“抹掉”。你错手抹掉Windows不关我事啊。抹干净后直接点左上角叉叉。<br><br>点选下一步，自定义选择<br>&nbsp;&nbsp;<span id="att_1039979"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_f8602a74be060dd.jpg"  border="0"  ></span><br>打印机的文件不建议安装，随后到网上下载不迟。X11还是不要省，WINE会使用这个软件，它是一个能让你在苹果执行Win32 exe的好东西。<br>&nbsp;&nbsp;<span id="att_1039980"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_95ef826440da4cb.jpg"  border="0"  ></span><br>如果你看见橙色的硬盘分区如上，说明雪豹把你的硬盘识别为外置硬盘。这个错误虽然无伤大雅，不过个人还是喜欢原来的硬盘图标。将IOAHCIBlockStorageInjector.kext安装上就可解决问题。<br><br>在点击安装之前，你需要预备一张可启动的原版Windows安装盘，以策万全，随时准备修复可能会出现的启动问题，因为雪豹安装程序会把雪豹的分区设为“活动分区”。如此，开机的时候就会无法进入bootthink的选项菜单和Windows。<br><br><span style="color:#FF0000 ;"  >为避免你无法进入Windows后手足无措，现在给你复习一下，紧急情况如何恢复Windows启动分区。（不是重装）</span><br><br>Vista和7的用户启动光盘后点击“修复计算机”，“启动修复”，向导会自动修复你的电脑。如无法自动修复，进入命令行运行diskpart程序，重新标记活动分区。另外，修复MBR的命令是bootrec /fixmbr<br>&nbsp;&nbsp;<span id="att_1039981"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_7062013d8916129.jpg"  border="0"  ></span><br>XP用户最好有一份WinPE在手，进入PE打开本指南最起初提及的磁盘管理工具，将C盘设回活动分区。<br><br>做好抗灾准备后点击安装，出现下面界面。<br>&nbsp;&nbsp;<span id="att_1039982"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_a6560ad7a943b02.jpg"  border="0"  ></span><br>安装完成<br> <span id="att_1039983"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_9f95cc430da21af.jpg"  border="0"  ></span>&nbsp;&nbsp;<br><br>30秒倒计时后电脑就会重启动，电脑死不断电的同学们下次记得使用OpenHaltRestart.kext。<br><br>可选：抓紧这30秒打开终端，使用fdisk命令把C盘重新设回活动分区，以策万全。<br>输入：<br><br>diskutil list（查看C：在哪里）<br>fdisk -e /dev/rdisk0<br>f&nbsp;&nbsp;1（根据上一步所见，设置硬盘0分区1为活动分区，这里应该含有Windows引导信息）<br>w<br>y<br>quit<br><br>不喜欢输入命令行的朋友则可以使用上面所说的Windows安装盘的方法。<br><br>重启电脑后进入Bootthink选择新的卷就能进入雪豹<br><br>第五步，启动雪豹<br> <span id="att_1040000"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_80adf55c011f065.jpg"  border="0"  ></span><br>原来如何启动雪豹光盘，现在你就如何进入系统，因此，我之前说，能够进入安装程序是关键。<br><br>成功进入，哈哈，一段动画庆祝一下进入苹果的世界，红光的地方是著名的猎户座大星云M42，时空转移来到这里已经是90%成功了。<br>&nbsp;&nbsp;<span id="att_1040001"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_f0d3b8cec9deeec.jpg"  border="0"  ></span><br>多国语言欢迎之后进入设置界面<br><br>伴随着音乐很轻松的下一步再下一步之后是设置时区，为了你的Windows时间不受干扰，你最好选择英国伦敦格林尼治中央时区，而非北京时间，同时，选择靠近赤道的非洲地方，不会给你个夏令时。如下。<br>&nbsp;&nbsp;<span id="att_1040002"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_1af572eef6e82b7.jpg"  border="0"  ></span><br>完成后会进入雪豹桌面，<br>&nbsp;&nbsp;<span id="att_1040003"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_6fae4f26fd45560.jpg"  border="0"  ></span><br><span style="color:#FF0000 ;"  >进入了桌面固然让人兴奋，不过，我发现，除了能上网，系统没有声音、分辨率不能调整，有些朋友甚至连网络都没有，正式是“三无”。解决这些问题，需要进入下一步。</span><br><br><b>第六步，安装其他Kext和DSDT改写及安装后操作<br> </b><br>每 次开机时在Bootthink选择雪豹分区很麻烦，如果你还需要-x32之类的Flag就更麻烦了。进入F8黑白界面后选择雪豹的20GB分区后，输入 “#  b=0”回车，下次启动时Bootthink就会跳过选择界面，要重现选择界面开机时按住Alt键，你也可以自定义倒计时秒数。进入雪豹后，用 PlistEditPro打开/Library/Preference/SystemConfiguaration /com.apple.Boot.plist文件，添加-x32等你需要的启动选项到Kernel  Flag项下面即可。这样，你只需要在开机时候选择Windows还是Bootthink，选择了bootthink后，就会自动进入。<br> <span id="att_1040004"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_70c9e901b988ad0.jpg"  border="0"  ></span><br>如果你的电脑配置与真的苹果电脑很接近，你不需要其他东西都能运行得很好。不过大多数情况你还需要一两个Kext来驱动硬件。<br><br>声音方面推荐貌似万能的VoodooHDA.kext。<br><br>显卡破解的技术难度最高，你要随时寻找最新的解决方案。在我写这篇文章的时候，除了苹果机曾经或现在使用过的有限品种的集成芯片之外，所有共享系统内存的集成显卡都还没有解决方案，没有任何图形加速功能，分辨率无法改变，始终为1024×768。<br>而独立显卡很多都有支持，对于显卡破解方面最前沿的资讯可以在netkas的部落格<a target="_blank" rel="nofollow" href="http://netkas.org/"  >http://netkas.org</a>找到。如果显卡成功驱动，加减时钟、天气预报小工具界面会看到有水纹效果。<br><br>网卡的解决方案也是一样，多找找看。<br><br>变 色龙（Chameleon）、PC-EFI除了用来启动之外，它们还有导入显卡、网卡的功能。很多时候，单单有Kext还不足以驱动显卡等硬件，还需要导 入程序，这个导入器称为"injector"。同时也有专门的Kext是做"injector"这个工作的。安装变色龙或PC-EFI后，使用 PlistEditPro修改Extra文件夹里面的com.apple.Boot.plist文件，加入GraphicsEnabler项，赋值yes 可以启动显卡导入器，同样的，加入EthernetBuiltIn项，赋值yes导入网卡。导入后，通常还需要硬件对应的Kext来启动。也有把 EFIstring加入com.apple.Boot.plist的方法，原理是类似的。为进一步确保导入信息无误，变色龙还支持读取显卡BIOS的 ROM文件，详细方法参考帮助文档。<br><br>DSDT是BIOS的一部分，改写DSDT可以使雪豹正确读取一些BIOS信息，从而解决一系列的恼 人问题，如无法关机睡眠、BIOS被重置、多核CPU只能使用单核心等，DSDT也可以用来驱动显卡、声卡和网卡，其过程比使用Kext要繁琐，而回报是 使你电脑更像真正的Mac，从源头解决问题，我的建议是，如果其他方法无法解决你的问题，尝试这个更高级的方法。现在无需刷BIOS也可实现DSDT改 写，可以减少不必要的风险。使用DSDT工具生成DSDT.aml后放在Bootthink文件夹C:\Darwin下面，或变色龙的/Extra下面就 能实现DSDT改写。需要注意的是，下载别人的DSDT.aml可能没有效果，因为每块主板的BIOS是不同的，你需要自己生成自己的。<br><br>最 后，当一切顺利完成，是兔死狗烹的时候了——将雪豹安装DVD从硬盘赶走，取回6.3G的空间。很简单，用第一步的方法，打开磁盘管理，对准6.3G的分 区，右键点击删除卷。如果你删除了雪豹分区就是白忙一次了。6.3G变成未分配空间后，在D盘按右键扩展卷，狂按下一步即完成任务。<br>&nbsp;&nbsp;<span id="att_1040005"  ><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://images.weiphone.com/attachments/Day_100715/9_716134_e2b706583ee1d08.jpg"  border="0"  ><br><br></span>以下就是一些所需要的工具的下载链接！<br><br>1<span style="color:#FF0000 ;"  >.《苹果操作系统 - 雪豹 10.6》(</span>Apple Mac OS X - Snow Leopard 10.6)Snow Leopard Universal 10.6(432)GM[光盘镜像]<br><a target="_blank" rel="nofollow" href="http://www.verycd.com/topics/2778507/"  >http://www.verycd.com/topics/2778507/</a><br><br>2.<span style="color:#FF0000 ;"  >OSInstall文件</span><br><a target="_blank" rel="nofollow" href="http://d.namipan.com/d/7d472a19a4350ddcd3489ad34cf199f8e6d7166d88e60300"  >http://d.namipan.com/d/7d472a19a4350ddcd3489ad34cf199f8e6d7166d88e60300</a><br><br>3.<span style="color:#FF0000 ;"  >HFS-explorer v0.21&nbsp;&nbsp;*该软件需要Java VM运行</span><br>HFS-explorer v0.21&nbsp;&nbsp;<a target="_blank" rel="nofollow" href="http://d.namipan.com/d/hf"  >http://d.namipan.com/d/hf</a>***plorer-0_21-setup.exe/3a81a32e70f75ad3c229da9a7dc22f31f69a9a24d5dc1700<br>Java VMhttp://www.greendown.cn/soft/14041.html<br><br>4.<span style="color:#FF0000 ;"  >Leopard硬盘安装助手v0.3 </span><br><a target="_blank" rel="nofollow" href="http://d.namipan.com/d/%e5%ae%89%e8%a3%85%e5%8a%a9%e6%89%8b.exe/25f450eeea341792562589d3ac696434e77890c1004c0b00"  >http://d.namipan.com/d/%e5%ae%89%e8%a3%85%e5%8a%a9%e6%89%8b.exe/25f450eeea341792562589d3ac696434e77890c1004c0b00</a><br><br>5.<span style="color:#FF0000 ;"  >MacDrive v8.0.4 </span>注（此版本只能用7天，目前在win7下有破解版，各位可以自己搜搜）<br><a target="_blank" rel="nofollow" href="http://d.namipan.com/d/ce248f7c9a721ce29bc191e537a590cdd10eaf93e0625800"  >http://d.namipan.com/d/ce248f7c9a721ce29bc191e537a590cdd10eaf93e0625800</a><br><br>6.<span style="color:#FF0000 ;"  >Bootthink v2.3.18 </span><br><a target="_blank" rel="nofollow" href="http://www.brsbox.com/filebox/down/fc/e0ba158074e75430dbaa8edf4a98f401"  >http://www.brsbox.com/filebox/down/fc/e0ba158074e75430dbaa8edf4a98f401</a><br><br>7<span style="color:#FF0000 ;"  >.变色龙 Chameleon RC3 Windows安装WinXP用户需要.Net Framework PlistEditPro v1.4.1</span><br><a target="_blank" rel="nofollow" href="http://www.brsbox.com/filebox/down/fc/ff1f29822e77b532a2611f069c985484"  >http://www.brsbox.com/filebox/down/fc/ff1f29822e77b532a2611f069c985484</a><br><a target="_blank" rel="nofollow" href="http://dl.pconline.com.cn/html_2/1/82/id=10637&amp;pn=0.html"  >http://dl.pconline.com.cn/html_2/1/82/id=10637&amp;pn=0.html</a><br><a target="_blank" rel="nofollow" href="http://www.apple.com/downloads/macosx/development_tools/plisteditpro.html"  >http://www.apple.com/downloads/macosx/development_tools/plisteditpro.html</a><br><br><b>常用的Kext，兼容32/64位:<br></b><br><br><span style="color:#FF0000 ;"  >Voodoo_PS2_Controller</span><br><a target="_blank" rel="nofollow" href="http://d.namipan.com/d/Voodoo_PS2_Controller.zip/60d026baeb9b2afe3618287dc776b2ab4937d119ba170300"  >http://d.namipan.com/d/Voodoo_PS2_Controller.zip/60d026baeb9b2afe3618287dc776b2ab4937d119ba170300</a><br><br><span style="color:#FF0000 ;"  >VoodooHDA.kext </span><br><a target="_blank" rel="nofollow" href="http://d.namipan.com/d/VoodooHDA.kext.zip/cefd54a12f7661ee8262648f8cd780ec0e555fc050760200"  >http://d.namipan.com/d/VoodooHDA.kext.zip/cefd54a12f7661ee8262648f8cd780ec0e555fc050760200</a><br><br><span style="color:#FF0000 ;"  >ACPIPS2Controller.kext </span><br><a target="_blank" rel="nofollow" href="http://d.namipan.com/d/PS2_Univers.zip/b366ba00ee31f27a898e307612266da53514f893229d0200"  >http://d.namipan.com/d/PS2_Univers.zip/b366ba00ee31f27a898e307612266da53514f893229d0200</a><br><br><span style="color:#FF0000 ;"  >NullCPUPowerManagement.kext </span><br><a target="_blank" rel="nofollow" href="http://d.namipan.com/d/NullCPUPowerManagement.zip/14a14343b5e2bffc0ee34bfe60465a5cf1d05e3143600000"  >http://d.namipan.com/d/NullCPUPowerManagement.zip/14a14343b5e2bffc0ee34bfe60465a5cf1d05e3143600000</a><br><br><span style="color:#FF0000 ;"  >PlatformUUID.kext </span><br><a target="_blank" rel="nofollow" href="http://d.namipan.com/d/PlatformUUID.kext.zip/145773ee541d1407aab5c34883399538efc9b562f9490000"  >http://d.namipan.com/d/PlatformUUID.kext.zip/145773ee541d1407aab5c34883399538efc9b562f9490000</a><br><br><span style="color:#FF0000 ;"  >OpenHaltRestart.kext </span><br><a target="_blank" rel="nofollow" href="http://d.namipan.com/d/9504ffb9b5cd1742386e27a88339670df74b47bc9d5c0000"  >http://d.namipan.com/d/9504ffb9b5cd1742386e27a88339670df74b47bc9d5c0000</a><br><br><span style="color:#FF0000 ;"  >IOAHCIBlockStorageInjector.kext</span><br><a target="_blank" rel="nofollow" href="http://d.namipan.com/d/IOAHCIBlockStorageInjector.kext.zip/a6da5b80b6e98a6b6d0dd9775a3090a723fef313ed030000"  >http://d.namipan.com/d/IOAHCIBlockStorageInjector.kext.zip/a6da5b80b6e98a6b6d0dd9775a3090a723fef313ed030000</a><br><br>另外，个人安装和收集的驱动在以下帖子中<br><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://bbs.weiphone.com/images/post/smile/default/%5Bs=009%5D.gif"  >传送门：<a target="_blank" rel="nofollow" href="http://bbs.weiphone.com/read-htm-tid-874465.html"  >http://bbs.weiphone.com/read-htm-tid-874465.html</a><br><br><img title="2012年05月04日 - enotsl - enotsl的博客"  alt="2012年05月04日 - enotsl - enotsl的博客"  src="http://bbs.weiphone.com/images/post/smile/default/%5Bs=009%5D.gif"  > 我在其他论坛发布的相关驱动：<a target="_blank" rel="nofollow" href="http://bbs.pcbeta.com/thread-717387-1-1.html"  >http://bbs.pcbeta.com/thread-717387-1-1.html</a></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020124403121597</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020124403121597</guid>
    <pubDate>Fri, 4 May 2012 12:31:21 +0800</pubDate>
    <dcterms:modified>2012-05-04T12:31:21+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[18个UI原稿图分享]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/90059060201244102311474</link>
    <description><![CDATA[<div><div>              <p>不管你是不是设计一个网页的<strong>UI</strong>或是iphone的app，用一个框架图来开始时一个很好的主意。下面是18个伟大的<strong>UI</strong>的原稿。好好看看吧。希望这些最初的设计想法会给你的设计带来一些灵感。好了，让我们一同来研究研究吧。</p> <p>NationWide / NASCAR<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/43868681%40N02/4066039551/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/ZE5AGlZ0oG48KnyL6VMCtw==/3244280581568243975.jpg"  alt="ui原稿"  ></a></p> <p>5 Years of Firefox<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/29142435%40N08/4089006972/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/mB69pk8IVz-FNO03nBYuNg==/3672122546167463330.jpg"  alt="ui原稿"  ></a><br> <span   ></span><br> Links<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/yhassy/2397670805/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/Q0aW7Buwlv7UGG9W1QzFWg==/3342515348439329918.jpg"  alt="ui原稿"  ></a></p> <p>GEOINT2009 (Microsite)<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/abrandnewway/3792374923/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/qC6AAGyCRWQpDiiFljV6Cw==/3218666358687642808.jpg"  alt="ui原稿"  ></a></p> <p>Coastal Capital Partners<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/rohdesign/3307873748/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/0RwsrrquXvtoQp_jn5cSuA==/3251598930962765343.jpg"  alt="ui原稿"  ></a></p> <p>New Local<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/abiv/4307576961/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/5cgjtn0hUKN9Ip1Z54kDmA==/3285938878121461864.jpg"  alt="ui原稿"  ></a></p> <p>Vimeo Pro<wbr>file Page Idea<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/soxiam/2182204230/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/iQNuC1qHRTxZQrprsQVe4g==/3249065656172369530.jpg"  alt="ui原稿"  ></a></p> <p>Layout for BPgraphics<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/martin-kulakowski/3055870213/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/aaSwL3-Ay26S51EwIuW0Eg==/3303390326677496396.jpg"  alt="ui原稿"  ></a></p> <p>Vimeo Clip Page Top Nav<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/soxiam/3361335195/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/cDGhUz02W1hiN3shldpCxg==/3279183478680398888.jpg"  alt="ui原稿"  ></a></p> <p>Cartoonity.com UI Sketch<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/martin-kulakowski/4347588743/in/photostream/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/u2BaWhdWH2WJlvopwQDNxg==/3339419123695511218.jpg"  alt="ui原稿"  ></a></p> <p>CommLogix Wireframe<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/rohdesign/3307874546/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/GmadnxDl5xSh2OIL8QcDuA==/3684225970166021344.jpg"  alt="ui原稿"  ></a></p> <p>Early Ember Sketches<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/playingwithshapes/3345425396"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/Wky3ENtt2pe2kSb5BjHX0g==/3213318334130128674.jpg"  alt="ui原稿"  ></a></p> <p>Wirethumbs<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/henkc7/4090068359/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/5YMvKNV0ge5i6f1pXyHtRA==/3392336419317614694.jpg"  alt="ui原稿"  ></a></p> <p>More Ember Sketches<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/playingwithshapes/3344591675"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/mDB3cFLWIlIJkHiHe6qglA==/3375729395691681029.jpg"  alt="ui原稿"  ></a></p> <p>iPad App Sketch<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/pixelhalunke/4575190482/in/photostream/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/jeAg1QxSqHGgFUV_UhaI6w==/3346737473090463908.jpg"  alt="ui原稿"  ></a></p> <p>Web Layout Sketches<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/lookatlao/97444767/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/5KOO-u7P9Clk0dloabj7Vg==/3357996472158890609.jpg"  alt="ui原稿"  ></a></p> <p>Librespeak interface sketch<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/dirtyalpaca/3904628439/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/nvCEHQmvusw8o9c3eDjHqQ==/3326189799790105003.jpg"  alt="ui原稿"  ></a></p> <p>Original Twitter Concept<br> <a target="_blank" rel="nofollow" href="http://www.flickr.com/photos/jackdorsey/182613360/"  ><img title="18个UI原稿图分享 - enotsl - enotsl的博客"  src="http://img.ph.126.net/E4ic1GKWxNT32x5_dBwepQ==/3371788746017733172.jpg"  alt="ui原稿"  ></a></p></div></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/90059060201244102311474</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/90059060201244102311474</guid>
    <pubDate>Fri, 4 May 2012 10:23:11 +0800</pubDate>
    <dcterms:modified>2012-05-04T10:23:11+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[window.location.hash属性介绍]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/90059060201241114350915</link>
    <description><![CDATA[<div><p style="margin-top: 0px; margin-bottom: 0px; font-family: 宋体; line-height: 22px; background-color: rgb(245, 248, 253);"  >javascript里边管理地址栏的内置对象，比如location.href就管理页面的url，用location.href=url就可以直接将页面重定向url。而location.hash则可以用来获取或设置页面的标签值。比如http://domain/#admin的location.hash="#admin"。利用这个属性值可以做一个非常有意义的事情。</p><p style="margin-top: 0px; margin-bottom: 0px; font-family: 宋体; line-height: 22px; background-color: rgb(245, 248, 253);"  >很多人都喜欢收藏网页，以便于以后的浏览。不过对于Ajax页面来说的话，一般用一个页面来处理所有的事务，也就是说，如果你浏览到一个Ajax页面里边有意思的内容，想将它收藏起来，可是地址只有一个呀，下次你打开这个地址，还是得像以往一样不断地去点击网页，找到你钟情的那个页面。另外的话，浏览器上的“前进”“后退”按钮也会失效，这于很多习惯了传统页面的用户来说，是一个很大的使用障碍。</p><p style="margin-top: 0px; margin-bottom: 0px; font-family: 宋体; line-height: 22px; background-color: rgb(245, 248, 253);"  ><font face="Verdana"  >那么，怎么用location.hash来解决这两个问题呢？其实一点也不神秘。</font></p><p style="margin-top: 0px; margin-bottom: 0px; font-family: 宋体; line-height: 22px; background-color: rgb(245, 248, 253);"  ><font face="Verdana"  >比如，我的作者管理系统，主要功能有三个：普通搜索、高级搜索、后台管理，我分别给它们分配一个hash值：#search、#advsearch、#admin，在页面初始化的时候，通过window.location.hash来判断用户需要访问的页面，然后通过javascript来调整显示页面。比如：</font></p><p style="margin-top: 0px; margin-bottom: 0px; font-family: 宋体; line-height: 22px; background-color: rgb(245, 248, 253);"  ><span style="margin: 0px; padding: 0px; color: rgb(0, 0, 255);"  >var</span><span style="margin: 0px; padding: 0px;"  >&nbsp;hash;&nbsp;<br>hash</span><span style="margin: 0px; padding: 0px;"  >=</span><span style="margin: 0px; padding: 0px;"  >(</span><span style="margin: 0px; padding: 0px;"  >!</span><span style="margin: 0px; padding: 0px;"  >window.location.hash)</span><span style="margin: 0px; padding: 0px;"  >?</span><span style="margin: 0px; padding: 0px;"  >"</span><span style="margin: 0px; padding: 0px;"  >#search</span><span style="margin: 0px; padding: 0px;"  >"</span><span style="margin: 0px; padding: 0px;"  >:window.location.hash;&nbsp;<br>window.location.hash</span><span style="margin: 0px; padding: 0px;"  >=</span><span style="margin: 0px; padding: 0px;"  >hash;&nbsp;<br>&nbsp;&nbsp;</span><span style="margin: 0px; padding: 0px; color: rgb(0, 128, 0);"  >//</span><span style="margin: 0px; padding: 0px; color: rgb(0, 128, 0);"  >调整地址栏地址，使前进、后退按钮能使用&nbsp;</span><span style="margin: 0px; padding: 0px; color: rgb(0, 128, 0);"  ><br></span><span style="margin: 0px; padding: 0px; color: rgb(0, 0, 255);"  >switch</span><span style="margin: 0px; padding: 0px;"  >(hash){&nbsp;&nbsp;&nbsp;<br></span><span style="margin: 0px; padding: 0px; color: rgb(0, 0, 255);"  >case</span><span style="margin: 0px; padding: 0px;"  >&nbsp;</span><span style="margin: 0px; padding: 0px;"  >"</span><span style="margin: 0px; padding: 0px;"  >#search</span><span style="margin: 0px; padding: 0px;"  >"</span><span style="margin: 0px; padding: 0px;"  >:&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;selectPanel(</span><span style="margin: 0px; padding: 0px;"  >"</span><span style="margin: 0px; padding: 0px;"  >pnlSearch</span><span style="margin: 0px; padding: 0px;"  >"</span><span style="margin: 0px; padding: 0px;"  >);&nbsp;&nbsp;&nbsp;</span><span style="margin: 0px; padding: 0px; color: rgb(0, 128, 0);"  >//</span><span style="margin: 0px; padding: 0px; color: rgb(0, 128, 0);"  >显示普通搜索面板&nbsp;&nbsp;</span><span style="margin: 0px; padding: 0px; color: rgb(0, 128, 0);"  ><br></span><span style="margin: 0px; padding: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="margin: 0px; padding: 0px; color: rgb(0, 0, 255);"  >break</span><span style="margin: 0px; padding: 0px;"  >;&nbsp;&nbsp;&nbsp;&nbsp;<br></span><span style="margin: 0px; padding: 0px; color: rgb(0, 0, 255);"  >case</span><span style="margin: 0px; padding: 0px;"  >&nbsp;</span><span style="margin: 0px; padding: 0px;"  >"</span><span style="margin: 0px; padding: 0px;"  >#advsearch</span><span style="margin: 0px; padding: 0px;"  >"</span><span style="margin: 0px; padding: 0px;"  >:&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></span><span style="margin: 0px; padding: 0px; color: rgb(0, 0, 255);"  >case</span><span style="margin: 0px; padding: 0px;"  >&nbsp;</span><span style="margin: 0px; padding: 0px;"  >"</span><span style="margin: 0px; padding: 0px;"  >#admin</span><span style="margin: 0px; padding: 0px;"  >"</span><span style="margin: 0px; padding: 0px;"  >:&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>}</span></p><span style="margin: 0px; padding: 0px; font-family: 宋体; line-height: 22px; background-color: rgb(245, 248, 253);"  ><p style="margin-top: 0px; margin-bottom: 0px;"  >通过window.location.hash=hash这个语句来调整地址栏的地址，使得浏览器里边的“前进”、“后退”按钮能正常使用（实质上欺骗了浏览器）。然后再根据hash值的不同来显示不同的面板（用户可以收藏对应的面板了），这就使得Ajax页面的浏览趋于传统化了。</p></span><wbr></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/90059060201241114350915</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/90059060201241114350915</guid>
    <pubDate>Tue, 1 May 2012 23:43:50 +0800</pubDate>
    <dcterms:modified>2012-05-01T23:43:50+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[Css3 3d animation Step1---介绍如何实现css动画]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020124111385631</link>
    <description><![CDATA[<div><div style="padding: 20px 0px 1px; font-family: Helvetica, Tahoma, Arial, sans-serif; min-height: 120px; width: 790px; line-height: 1.8em;"  ><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="font-size: 13px; font-weight: bold; line-height: 19px; background-color: rgb(222, 227, 231);"  >作者： rainsilence</span> </p><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="font-size: 13px; font-weight: bold; line-height: 19px; background-color: rgb(222, 227, 231);"  ><br></span></p><p style="margin-top: 0px; margin-bottom: 0px;"  ><strong>前言：</strong></p><p style="margin-top: 0px; margin-bottom: 0px;"  >好久没写文章了，今天看到webQQ又一次升级。我用的chrome的画面切换甚至用到了css 3d animation+3dtransform。</p><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p><p style="margin-top: 0px; margin-bottom: 0px;"  >这是本系列的第一篇文章，用于介绍仅用css实现3d动画。也许这篇文章也许过于超前，因为大部分的浏览器器，甚至包括FF，都还没有实现3d transform。涉及到animation的部分，你可以通过webkit内核的浏览器(Chrome or Safari)或者Firefox来浏览，但是涉及到3d transform的东西请用webkit的浏览器器浏览。</p><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p><p style="margin-top: 0px; margin-bottom: 0px;"  ><strong>Css3 @KeyFrames Rule</strong></p><p style="margin-top: 0px; margin-bottom: 0px;"  >什么是KeyFrames？直译过来就是关键帧。你可以把他理解为flash中的关键帧。他以关键字from开始，to结束。中间的部分都为百分比。意为动画到了某个百分比时，他的状态。而帧与帧之间的补间动画浏览器会帮你自动生成。</p><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p><p style="margin-top: 0px; margin-bottom: 0px;"  >例如：</p><p style="margin-top: 0px; margin-bottom: 0px;"  ></p><div id=""  style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; background-color: transparent; width: 766px; overflow: auto; margin-left: 9px; padding: 1px; word-break: break-all; word-wrap: break-word;"  ><div><div style="padding: 3px; margin: 0px; font-weight: bold;"  >Html代码&nbsp;<embed height="15" allowNetworking="internal" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="clipboard=%3Cstyle%20type%3D%22text%2Fcss%22%3E%20%20%0A%20%20%20%20%20%20%0A%20%20%20%20%40keyframes%20myfirst%20%7B%20%20%0A%20%20%20%20%20%20%20%20from%20%7Bbackground%3A%20red%3B%7D%20%20%0A%20%20%20%20%20%20%20%20to%20%7Bbackground%3A%20yellow%3B%7D%20%20%0A%20%20%20%20%7D%20%20%0A%20%20%0A%20%20%20%20%40-moz-keyframes%20myfirst%20%2F*%20Firefox%20*%2F%20%7B%20%20%0A%20%20%20%20%20%20%20%20from%20%7Bbackground%3A%20red%3B%7D%20%20%0A%20%20%20%20%20%20%20%20to%20%7Bbackground%3A%20yellow%3B%7D%20%20%0A%20%20%20%20%7D%20%20%0A%20%20%0A%20%20%20%20%40-webkit-keyframes%20myfirst%20%2F*%20Safari%20and%20Chrome%20*%2F%20%7B%20%20%0A%20%20%20%20%20%20%20%20from%20%7Bbackground%3A%20red%3B%7D%20%20%0A%20%20%20%20%20%20%20%20to%20%7Bbackground%3A%20yellow%3B%7D%20%20%0A%20%20%20%20%7D%20%20%0A%20%20%20%20%20%20%0A%3C%2Fstyle%3E%20%20" allowScriptAccess="never" width="14" quality="high" invokeurls="false" src="http://www.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf" type="application/x-shockwave-flash" wmode="transparent"  >&nbsp;<a title="&#25910;&#34255;&#36825;&#27573;&#20195;&#30721;" style="color: rgb(0, 102, 153); " rel="nofollow" href="http://www.iteye.com/topic/1116417"  ><img title="Css3 3d animation Step1---介绍如何实现css动画 - enotsl - enotsl的博客"  src="http://www.iteye.com/images/icon_star.png"  alt="收藏代码"  ></a></div></div><ol start="1"  style="font-size: 1em; line-height: 1.4em; margin-top: 0px; margin-bottom: 1px; margin-left: 0px; padding-top: 2px; padding-bottom: 2px; border: 1px solid rgb(209, 215, 220); list-style-position: initial; list-style-image: initial; color: rgb(43, 145, 175);"  ><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >style</span>&nbsp;<span style="color: red;"  >type</span>=<span style="color: blue;"  >"text/css"</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;@keyframes&nbsp;myfirst&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;{background:&nbsp;red;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;{background:&nbsp;yellow;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;@-moz-keyframes&nbsp;myfirst&nbsp;/*&nbsp;Firefox&nbsp;*/&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;{background:&nbsp;red;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;{background:&nbsp;yellow;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;@-webkit-keyframes&nbsp;myfirst&nbsp;/*&nbsp;Safari&nbsp;and&nbsp;Chrome&nbsp;*/&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;{background:&nbsp;red;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;{background:&nbsp;yellow;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >style</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li></ol></div>&nbsp;<span style="line-height: 18px;"  >为了支持将来可能有的标准，你不得不写3遍。</span><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="line-height: 18px;"  ></span></p><p style="margin-top: 0px; margin-bottom: 0px;"  >试着运行下面的代码，里面可能会有你没见过的属性，我们下面会讲到</p><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p><span style="line-height: 18px;"  >&nbsp;大家等待了两秒后，突然从画面左上角出现一个方块，花费5秒从红色变到黄色。可能大家已经猜到了</span><span style="line-height: 18px;"  ><p style="margin-top: 0px; margin-bottom: 0px;"  ></p><div id=""  style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; background-color: transparent; width: 766px; overflow: auto; margin-left: 9px; padding: 1px; word-break: break-all; word-wrap: break-word;"  ><div><div style="padding: 3px; margin: 0px; font-weight: bold;"  >Html代码&nbsp;<embed height="15" allowNetworking="internal" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="clipboard=%3C!DOCTYPE%20html%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20HTML%204.01%20Transitional%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FTR%2Fhtml4%2Floose.dtd%22%3E%20%20%0A%3Chtml%3E%20%20%0A%3Chead%3E%20%20%0A%3Cmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%3E%20%20%0A%3Ctitle%3EInsert%20title%20here%3C%2Ftitle%3E%20%20%0A%20%20%0A%20%20%0A%3Cstyle%20type%3D%22text%2Fcss%22%3E%20%20%0A%20%20%20%20%20%20%0A%20%20%20%20%40keyframes%20myfirst%20%7B%20%20%0A%20%20%20%20%20%20%20%20from%20%7Bbackground%3A%20red%3B%7D%20%20%0A%20%20%20%20%20%20%20%20to%20%7Bbackground%3A%20yellow%3B%7D%20%20%0A%20%20%20%20%7D%20%20%0A%20%20%0A%20%20%20%20%40-moz-keyframes%20myfirst%20%2F*%20Firefox%20*%2F%20%7B%20%20%0A%20%20%20%20%20%20%20%20from%20%7Bbackground%3A%20red%3B%7D%20%20%0A%20%20%20%20%20%20%20%20to%20%7Bbackground%3A%20yellow%3B%7D%20%20%0A%20%20%20%20%7D%20%20%0A%20%20%0A%20%20%20%20%40-webkit-keyframes%20myfirst%20%2F*%20Safari%20and%20Chrome%20*%2F%20%7B%20%20%0A%20%20%20%20%20%20%20%20from%20%7Bbackground%3A%20red%3B%7D%20%20%0A%20%20%20%20%20%20%20%20to%20%7Bbackground%3A%20yellow%3B%7D%20%20%0A%20%20%20%20%7D%20%20%0A%20%20%20%20%20%20%0A%20%20%20%20%23sample%20%7B%20%20%0A%20%20%20%20%20%20%20%20animation-name%3A%20myfirst%3B%20%20%0A%20%20%20%20%20%20%20%20animation-duration%3A%205s%3B%20%20%0A%20%20%20%20%20%20%20%20animation-timing-function%3A%20linear%3B%20%20%0A%20%20%20%20%20%20%20%20animation-delay%3A%202s%3B%20%20%0A%20%20%20%20%20%20%20%20animation-iteration-count%3A%20infinite%3B%20%20%0A%20%20%20%20%20%20%20%20animation-direction%3A%20alternate%3B%20%20%0A%20%20%20%20%20%20%20%20animation-play-state%3A%20running%3B%20%20%0A%20%20%20%20%20%20%20%20%2F*%20Firefox%3A%20*%2F%20%20%0A%20%20%20%20%20%20%20%20-moz-animation-name%3A%20myfirst%3B%20%20%0A%20%20%20%20%20%20%20%20-moz-animation-duration%3A%205s%3B%20%20%0A%20%20%20%20%20%20%20%20-moz-animation-timing-function%3A%20linear%3B%20%20%0A%20%20%20%20%20%20%20%20-moz-animation-delay%3A%202s%3B%20%20%0A%20%20%20%20%20%20%20%20-moz-animation-iteration-count%3A%20infinite%3B%20%20%0A%20%20%20%20%20%20%20%20-moz-animation-direction%3A%20alternate%3B%20%20%0A%20%20%20%20%20%20%20%20-moz-animation-play-state%3A%20running%3B%20%20%0A%20%20%20%20%20%20%20%20%2F*%20Safari%20and%20Chrome%3A%20*%2F%20%20%0A%20%20%20%20%20%20%20%20-webkit-animation-name%3A%20myfirst%3B%20%20%0A%20%20%20%20%20%20%20%20-webkit-animation-duration%3A%205s%3B%20%20%0A%20%20%20%20%20%20%20%20-webkit-animation-timing-function%3A%20linear%3B%20%20%0A%20%20%20%20%20%20%20%20-webkit-animation-delay%3A%202s%3B%20%20%0A%20%20%20%20%20%20%20%20-webkit-animation-iteration-count%3A%20infinite%3B%20%20%0A%20%20%20%20%20%20%20%20-webkit-animation-direction%3A%20alternate%3B%20%20%0A%20%20%20%20%20%20%20%20-webkit-animation-play-state%3A%20running%3B%20%20%0A%20%20%20%20%7D%20%20%0A%20%20%20%20%20%20%0A%3C%2Fstyle%3E%20%20%0A%20%20%0A%3C%2Fhead%3E%20%20%0A%3Cbody%3E%20%20%0A%20%20%20%20%3Cdiv%20id%3D%22sample%22%20style%3D%22width%3A120px%3B%20height%3A120px%3B%22%3E%20%20%0A%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%3C%2Fdiv%3E%20%20%0A%3C%2Fbody%3E%20%20%0A%3C%2Fhtml%3E%20%20" allowScriptAccess="never" width="14" quality="high" invokeurls="false" src="http://www.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf" type="application/x-shockwave-flash" wmode="transparent"  >&nbsp;<a title="&#25910;&#34255;&#36825;&#27573;&#20195;&#30721;" style="color: rgb(0, 102, 153); " rel="nofollow" href="http://www.iteye.com/topic/1116417"  ><img title="Css3 3d animation Step1---介绍如何实现css动画 - enotsl - enotsl的博客"  src="http://www.iteye.com/images/icon_star.png"  alt="收藏代码"  ></a></div></div><ol start="1"  style="font-size: 1em; line-height: 1.4em; margin-top: 0px; margin-bottom: 1px; margin-left: 0px; padding-top: 2px; padding-bottom: 2px; border: 1px solid rgb(209, 215, 220); list-style-position: initial; list-style-image: initial; color: rgb(43, 145, 175);"  ><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&lt;!DOCTYPE&nbsp;html&nbsp;PUBLIC&nbsp;"-//W3C//DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional//EN"&nbsp;"http://www.w3.org/TR/html4/loose.dtd"<span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >html</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >head</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >meta</span>&nbsp;<span style="color: red;"  >http-equiv</span>=<span style="color: blue;"  >"Content-Type"</span>&nbsp;<span style="color: red;"  >content</span>=<span style="color: blue;"  >"text/html;&nbsp;charset=UTF-8"</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >title</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>Insert&nbsp;title&nbsp;here<span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >title</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >style</span>&nbsp;<span style="color: red;"  >type</span>=<span style="color: blue;"  >"text/css"</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;@keyframes&nbsp;myfirst&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;{background:&nbsp;red;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;{background:&nbsp;yellow;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;@-moz-keyframes&nbsp;myfirst&nbsp;/*&nbsp;Firefox&nbsp;*/&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;{background:&nbsp;red;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;{background:&nbsp;yellow;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;@-webkit-keyframes&nbsp;myfirst&nbsp;/*&nbsp;Safari&nbsp;and&nbsp;Chrome&nbsp;*/&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;{background:&nbsp;red;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;{background:&nbsp;yellow;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;#sample&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation-name:&nbsp;myfirst;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation-duration:&nbsp;5s;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation-timing-function:&nbsp;linear;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation-delay:&nbsp;2s;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation-iteration-count:&nbsp;infinite;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation-direction:&nbsp;alternate;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation-play-state:&nbsp;running;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Firefox:&nbsp;*/&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-moz-animation-name:&nbsp;myfirst;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-moz-animation-duration:&nbsp;5s;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-moz-animation-timing-function:&nbsp;linear;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-moz-animation-delay:&nbsp;2s;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-moz-animation-iteration-count:&nbsp;infinite;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-moz-animation-direction:&nbsp;alternate;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-moz-animation-play-state:&nbsp;running;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Safari&nbsp;and&nbsp;Chrome:&nbsp;*/&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-animation-name:&nbsp;myfirst;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-animation-duration:&nbsp;5s;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-animation-timing-function:&nbsp;linear;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-animation-delay:&nbsp;2s;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-animation-iteration-count:&nbsp;infinite;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-animation-direction:&nbsp;alternate;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-animation-play-state:&nbsp;running;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >style</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >head</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >body</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >div</span>&nbsp;<span style="color: red;"  >id</span>=<span style="color: blue;"  >"sample"</span>&nbsp;<span style="color: red;"  >style</span>=<span style="color: blue;"  >"width:120px;&nbsp;height:120px;"</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >div</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >body</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >html</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li></ol></div>&nbsp;</span><p style="margin-top: 0px; margin-bottom: 0px;"  ></p><span style="line-height: 18px;"  ><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="font-size: 13px;"  ><strong>animation-name</strong>： 和上面的@keyframe的名字对应起来，代表当前用的是何种变换</span></p><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="font-size: 13px;"  ><strong>animation-duration</strong>: 代表动画开始到结束总共耗时多少时间</span></p><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="font-size: 13px;"  ><strong>animation-timing-function</strong>： 代表动画的进行是均匀的还是先快后慢还是？他有这几个枚举值：</span><span style="font-size: 13px;"  >linear:线性，ease:默认值，先慢后快，到了快一半的时候再变慢，ease-in:先</span><span style="font-size: 13px;"  >慢</span><span style="font-size: 13px;"  >后</span><span style="font-size: 13px;"  >快</span><span style="font-size: 13px;"  >,ease-out:</span><span style="font-size: 13px;"  >先快后慢。ease-in-out:两头慢，中间快。</span>cubic-bezier(<em>n</em>,<em>n</em>,<em>n</em>,<em>n</em>)：自定义，n只能输入0-1之间的值。输入的值越大，移动的越慢，4个n代表了动画的4个阶段25%，50%，75%，100%。</p><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p><p style="margin-top: 0px; margin-bottom: 0px;"  >也就是说，linear,ease等值，只是cubic-bezier在浏览器中的预设值，可以简单表示如下：</p><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p></span><span style="line-height: 18px;"  ><strong>animation-delay</strong>：代表动画延迟多少时间开始，默认为0</span><span style="line-height: 18px;"  ><p style="margin-top: 0px; margin-bottom: 0px;"  ></p><div id=""  style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; background-color: transparent; width: 766px; overflow: auto; margin-left: 9px; padding: 1px; word-break: break-all; word-wrap: break-word;"  ><div><div style="padding: 3px; margin: 0px; font-weight: bold;"  >Html代码&nbsp;<embed height="15" allowNetworking="internal" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="clipboard=%23linear%20%7Banimation-timing-function%3A%20cubic-bezier(0%2C0%2C1%2C1%3B%7D%20%20%0A%23ease%20%7Banimation-timing-function%3A%20cubic-bezier(0.25%2C0.1%2C0.25%2C1)%3B%7D%20%20%0A%23ease-in%20%7Banimation-timing-function%3A%20cubic-bezier(0.42%2C0%2C1%2C1)%3B%7D%20%20%0A%23ease-out%20%7Banimation-timing-function%3A%20cubic-bezier(0%2C0%2C0.58%2C1)%3B%7D%20%20%0A%23ease-in-out%20%7Banimation-timing-function%3A%20cubic-bezier(0.42%2C0%2C0.58%2C1)%3B%7D%20" allowScriptAccess="never" width="14" quality="high" invokeurls="false" src="http://www.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf" type="application/x-shockwave-flash" wmode="transparent"  >&nbsp;<a title="&#25910;&#34255;&#36825;&#27573;&#20195;&#30721;" style="color: rgb(0, 102, 153); " rel="nofollow" href="http://www.iteye.com/topic/1116417"  ><img title="Css3 3d animation Step1---介绍如何实现css动画 - enotsl - enotsl的博客"  src="http://www.iteye.com/images/icon_star.png"  alt="收藏代码"  ></a></div></div><ol start="1"  style="font-size: 1em; line-height: 1.4em; margin-top: 0px; margin-bottom: 1px; margin-left: 0px; padding-top: 2px; padding-bottom: 2px; border: 1px solid rgb(209, 215, 220); list-style-position: initial; list-style-image: initial; color: rgb(43, 145, 175);"  ><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >#linear&nbsp;{animation-timing-function:&nbsp;cubic-bezier(0,0,1,1;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >#ease&nbsp;{animation-timing-function:&nbsp;cubic-bezier(0.25,0.1,0.25,1);}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >#ease-in&nbsp;{animation-timing-function:&nbsp;cubic-bezier(0.42,0,1,1);}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >#ease-out&nbsp;{animation-timing-function:&nbsp;cubic-bezier(0,0,0.58,1);}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >#ease-in-out&nbsp;{animation-timing-function:&nbsp;cubic-bezier(0.42,0,0.58,1);}&nbsp;&nbsp;&nbsp;</span></li></ol></div>&nbsp;</span><span style="line-height: 18px;"  ><p style="margin-top: 0px; margin-bottom: 0px;"  ><strong>animation-iteration-count</strong>:代表动画执行多少次，默认为1.如果输入infinite，则代表无限次</p><p style="margin-top: 0px; margin-bottom: 0px;"  ><strong>animation-direction</strong>：默认值为normal，代表动画执行完后从头开始。如果设置为alternate，那么动画在结束后，第二遍会反着执行一遍</p><p style="margin-top: 0px; margin-bottom: 0px;"  ><strong>animation-play-state</strong>：默认值running，代表现在是执行状态。如果要让动画停止，只需要把这个值赋值为paused</p><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p><p style="margin-top: 0px; margin-bottom: 0px;"  >好，接下来把上面的代码串联起来。</p></span><span style="line-height: 18px;"  ><p style="margin-top: 0px; margin-bottom: 0px;"  ></p><div id=""  style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; background-color: transparent; width: 766px; overflow: auto; margin-left: 9px; padding: 1px; word-break: break-all; word-wrap: break-word;"  ><div><div style="padding: 3px; margin: 0px; font-weight: bold;"  >Html代码&nbsp;<embed height="15" allowNetworking="internal" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="clipboard=%3C!DOCTYPE%20html%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20HTML%204.01%20Transitional%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FTR%2Fhtml4%2Floose.dtd%22%3E%20%20%0A%3Chtml%3E%20%20%0A%3Chead%3E%20%20%0A%3Cmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%3E%20%20%0A%3Ctitle%3EInsert%20title%20here%3C%2Ftitle%3E%20%20%0A%20%20%0A%20%20%0A%3Cstyle%20type%3D%22text%2Fcss%22%3E%20%20%0A%20%20%20%20%20%20%0A%20%20%20%20%40keyframes%20myfirst%20%7B%20%20%0A%20%20%20%20%20%20%20%20from%20%7Bleft%3A0px%3B%20top%3A0px%3B%20background%3A%20red%3B%20%7D%20%20%0A%20%20%20%20%20%20%20%2050%25%20%7Bleft%3A100px%3B%20top%3A80px%3B%7D%20%20%0A%20%20%20%20%20%20%20%2070%25%2C%2080%25%20%7Btransform%3A%20rotate(-360deg)%3Bleft%3A240px%3B%20top%3A240px%3B%7D%20%20%0A%20%20%20%20%20%20%20%20to%20%7Bleft%3A279px%3B%20top%3A279px%3B%20background%3A%20yellow%3B%7D%20%20%0A%20%20%20%20%7D%20%20%0A%20%20%0A%20%20%20%20%40-moz-keyframes%20myfirst%20%2F*%20Firefox%20*%2F%20%7B%20%20%0A%20%20%20%20%20%20%20%20from%20%7Bleft%3A0px%3B%20top%3A0px%3B%20background%3A%20red%3B%20%7D%20%20%0A%20%20%20%20%20%20%20%2050%25%20%7Bleft%3A100px%3B%20top%3A80px%3B%7D%20%20%0A%20%20%20%20%20%20%20%2070%25%2C%2080%25%20%7B-moz-transform%3A%20rotate(-360deg)%3Bleft%3A240px%3B%20top%3A240px%3B%7D%20%20%0A%20%20%20%20%20%20%20%20to%20%7Bleft%3A279px%3B%20top%3A279px%3B%20background%3A%20yellow%3B%7D%20%20%0A%20%20%20%20%7D%20%20%0A%20%20%0A%20%20%20%20%40-webkit-keyframes%20myfirst%20%2F*%20Safari%20and%20Chrome%20*%2F%20%7B%20%20%0A%20%20%20%20%20%20%20%20from%20%7Bleft%3A0px%3B%20top%3A0px%3B%20background%3A%20red%3B%20%7D%20%20%0A%20%20%20%20%20%20%20%2050%25%20%7Bleft%3A100px%3B%20top%3A80px%3B%7D%20%20%0A%20%20%20%20%20%20%20%2070%25%2C%2080%25%20%7B-webkit-transform%3A%20rotate(-360deg)%20scale(0.5%2C%200.5)%3Bleft%3A240px%3B%20top%3A240px%3B%7D%20%20%0A%20%20%20%20%20%20%20%20to%20%7Bleft%3A279px%3B%20top%3A279px%3B%20background%3A%20yellow%3B%7D%20%20%0A%20%20%20%20%7D%20%20%0A%20%20%20%20%20%20%0A%20%20%20%20%23sample%20%7B%20%20%0A%20%20%20%20%20%20%20%20animation-name%3A%20myfirst%3B%20%20%0A%20%20%20%20%20%20%20%20animation-duration%3A%205s%3B%20%20%0A%20%20%20%20%20%20%20%20animation-timing-function%3A%20linear%3B%20%20%0A%20%20%20%20%20%20%20%20animation-iteration-count%3A%20infinite%3B%20%20%0A%20%20%20%20%20%20%20%20animation-direction%3A%20alternate%3B%20%20%0A%20%20%20%20%20%20%20%20%2F*%20Firefox%3A%20*%2F%20%20%0A%20%20%20%20%20%20%20%20-moz-animation-name%3A%20myfirst%3B%20%20%0A%20%20%20%20%20%20%20%20-moz-animation-duration%3A%205s%3B%20%20%0A%20%20%20%20%20%20%20%20-moz-animation-timing-function%3A%20linear%3B%20%20%0A%20%20%20%20%20%20%20%20-moz-animation-iteration-count%3A%20infinite%3B%20%20%0A%20%20%20%20%20%20%20%20-moz-animation-direction%3A%20alternate%3B%20%20%0A%20%20%20%20%20%20%20%20%2F*%20Safari%20and%20Chrome%3A%20*%2F%20%20%0A%20%20%20%20%20%20%20%20-webkit-animation-name%3A%20myfirst%3B%20%20%0A%20%20%20%20%20%20%20%20-webkit-animation-duration%3A%205s%3B%20%20%0A%20%20%20%20%20%20%20%20-webkit-animation-timing-function%3A%20linear%3B%20%20%0A%20%20%20%20%20%20%20%20-webkit-animation-iteration-count%3A%20infinite%3B%20%20%0A%20%20%20%20%20%20%20%20-webkit-animation-direction%3A%20alternate%3B%20%20%0A%20%20%20%20%7D%20%20%0A%20%20%20%20%20%20%0A%3C%2Fstyle%3E%20%20%0A%20%20%0A%3C%2Fhead%3E%20%20%0A%3Cbody%3E%20%20%0A%20%20%20%20%3Cdiv%20style%3D%22width%3A400px%3B%20height%3A400px%3B%20border-style%3Adashed%3B%20border-width%3A1px%3B%20position%3Arelative%3B%22%3E%20%20%0A%20%20%20%20%20%20%20%20%3Cdiv%20id%3D%22sample%22%20style%3D%22width%3A120px%3B%20height%3A120px%3B%20position%3Aabsolute%3B%22%3E%3C%2Fdiv%3E%20%20%0A%20%20%20%20%3C%2Fdiv%3E%20%20%0A%20%20%20%20%20%20%0A%3C%2Fbody%3E%20%20%0A%3C%2Fhtml%3E%20%20" allowScriptAccess="never" width="14" quality="high" invokeurls="false" src="http://www.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf" type="application/x-shockwave-flash" wmode="transparent"  >&nbsp;<a title="&#25910;&#34255;&#36825;&#27573;&#20195;&#30721;" style="color: rgb(0, 102, 153); " rel="nofollow" href="http://www.iteye.com/topic/1116417"  ><img title="Css3 3d animation Step1---介绍如何实现css动画 - enotsl - enotsl的博客"  src="http://www.iteye.com/images/icon_star.png"  alt="收藏代码"  ></a></div></div><ol start="1"  style="font-size: 1em; line-height: 1.4em; margin-top: 0px; margin-bottom: 1px; margin-left: 0px; padding-top: 2px; padding-bottom: 2px; border: 1px solid rgb(209, 215, 220); list-style-position: initial; list-style-image: initial; color: rgb(43, 145, 175);"  ><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&lt;!DOCTYPE&nbsp;html&nbsp;PUBLIC&nbsp;"-//W3C//DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional//EN"&nbsp;"http://www.w3.org/TR/html4/loose.dtd"<span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >html</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >head</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >meta</span>&nbsp;<span style="color: red;"  >http-equiv</span>=<span style="color: blue;"  >"Content-Type"</span>&nbsp;<span style="color: red;"  >content</span>=<span style="color: blue;"  >"text/html;&nbsp;charset=UTF-8"</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >title</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>Insert&nbsp;title&nbsp;here<span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >title</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >style</span>&nbsp;<span style="color: red;"  >type</span>=<span style="color: blue;"  >"text/css"</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;@keyframes&nbsp;myfirst&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;{left:0px;&nbsp;top:0px;&nbsp;background:&nbsp;red;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;50%&nbsp;{left:100px;&nbsp;top:80px;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;70%,&nbsp;80%&nbsp;{transform:&nbsp;rotate(-360deg);left:240px;&nbsp;top:240px;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;{left:279px;&nbsp;top:279px;&nbsp;background:&nbsp;yellow;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;@-moz-keyframes&nbsp;myfirst&nbsp;/*&nbsp;Firefox&nbsp;*/&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;{left:0px;&nbsp;top:0px;&nbsp;background:&nbsp;red;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;50%&nbsp;{left:100px;&nbsp;top:80px;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;70%,&nbsp;80%&nbsp;{-moz-transform:&nbsp;rotate(-360deg);left:240px;&nbsp;top:240px;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;{left:279px;&nbsp;top:279px;&nbsp;background:&nbsp;yellow;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;@-webkit-keyframes&nbsp;myfirst&nbsp;/*&nbsp;Safari&nbsp;and&nbsp;Chrome&nbsp;*/&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from&nbsp;{left:0px;&nbsp;top:0px;&nbsp;background:&nbsp;red;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;50%&nbsp;{left:100px;&nbsp;top:80px;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;70%,&nbsp;80%&nbsp;{-webkit-transform:&nbsp;rotate(-360deg)&nbsp;scale(0.5,&nbsp;0.5);left:240px;&nbsp;top:240px;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;{left:279px;&nbsp;top:279px;&nbsp;background:&nbsp;yellow;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;#sample&nbsp;{&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation-name:&nbsp;myfirst;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation-duration:&nbsp;5s;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation-timing-function:&nbsp;linear;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation-iteration-count:&nbsp;infinite;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animation-direction:&nbsp;alternate;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Firefox:&nbsp;*/&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-moz-animation-name:&nbsp;myfirst;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-moz-animation-duration:&nbsp;5s;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-moz-animation-timing-function:&nbsp;linear;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-moz-animation-iteration-count:&nbsp;infinite;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-moz-animation-direction:&nbsp;alternate;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;Safari&nbsp;and&nbsp;Chrome:&nbsp;*/&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-animation-name:&nbsp;myfirst;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-animation-duration:&nbsp;5s;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-animation-timing-function:&nbsp;linear;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-animation-iteration-count:&nbsp;infinite;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-webkit-animation-direction:&nbsp;alternate;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >style</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >head</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >body</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >div</span>&nbsp;<span style="color: red;"  >style</span>=<span style="color: blue;"  >"width:400px;&nbsp;height:400px;&nbsp;border-style:dashed;&nbsp;border-width:1px;&nbsp;position:relative;"</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >div</span>&nbsp;<span style="color: red;"  >id</span>=<span style="color: blue;"  >"sample"</span>&nbsp;<span style="color: red;"  >style</span>=<span style="color: blue;"  >"width:120px;&nbsp;height:120px;&nbsp;position:absolute;"</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >div</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >div</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >body</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li style="font-size: 1em; margin: 0px 0px 0px 38px; padding: 0px 0px 0px 10px; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(209, 215, 220); background-color: rgb(250, 250, 250); line-height: 18px;"  ><span style="color: black;"  ><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&lt;/</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >html</span><span style="color: rgb(0, 102, 153); font-weight: bold;"  >&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;</span></li></ol></div><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p></span><span style="line-height: 18px;"  >上面的sample可以参考附件。以上就是css-animation标准的全部内容</span><span style="line-height: 18px;"  >上面的sample可以参考附件。</span><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p></div><div style="border-top-width: 1px; border-top-style: solid; border-top-color: rgb(153, 153, 153); margin-top: 10px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px;"  ><ul style="margin-right: 5px; margin-left: 5px; padding: 5px; list-style: none; border: 1px solid rgb(204, 204, 204);"  ><li style="margin: 0px 0px 0.25em 30px; padding: 0px;"  ><a style="color: rgb(0, 102, 153); text-decoration: none; " rel="nofollow" href="http://dl.iteye.com/topics/download/18d24077-e9a9-3beb-92da-d273f3e9e875"  >animation.zip</a>&nbsp;(764 Bytes)</li><li style="margin: 0px 0px 0.25em 30px; padding: 0px;"  >下载次数: 32</li></ul></div><wbr></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020124111385631</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020124111385631</guid>
    <pubDate>Tue, 1 May 2012 23:38:05 +0800</pubDate>
    <dcterms:modified>2012-05-01T23:38:05+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[什么是响应式Web设计？怎样进行？]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020124111324412</link>
    <description><![CDATA[<div><h1 style="margin: 26px 0px 0px; padding: 0px; font-size: 24px; border: 0px; outline: 0px; color: rgb(63, 131, 192); line-height: 46px; height: 46px; text-align: center; font-family: arial, 宋体, sans-serif;"  ><span style="color: rgb(114, 117, 120); font-size: 12px; margin: 0px 0px 0px 20px; padding: 0px; border: 0px; outline: 0px;"  >来源：</span><span style="color: rgb(114, 117, 120); font-size: 12px; margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >beforweb.com</span><span style="color: rgb(114, 117, 120); font-size: 12px; line-height: 26px;"  >&nbsp;</span></h1><div style="margin: 0px; padding: 19px 60px; border: 0px; outline: 0px; color: rgb(51, 51, 51); line-height: 28px; font-family: arial, 宋体, sans-serif;"  ><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >在Web设计和开发领域，很快的，我们将会无法跟上设备与分辨率革新的步伐。对于多数网站来说，为每种新设备及分辨率创建其独立的版本根本就是不切实际的；结果就是，我们将会赢得使用某些设备的用户群，而失去那些使用其他设备的用户。不过，或许会有另外一种方式，可以帮助我们避免这种情况的发生。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >响应式Web设计(Responsive Web design)的理念是，页面的设计与开发应当根据用户行为以及设备环境(系统平台、屏幕尺寸、屏幕定向等)进行相应的响应和调整。具体的实践方式由多方面组成，包括弹性网格和布局、图片、CSS media query的使用等。无论用户正在使用笔记本还是iPad，我们的页面都应该能够自动切换分辨率、图片尺寸及相关脚本功能等，以适应不同设备；换句话说，页面应该有能力去自动响应用户的设备环境。这样，我们就可以不必为不断到来的新设备做专门的版本设计和开发了<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >。</font></a></p><h3 style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px;"  >响应式Web设计的概念</h3><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://ethanmarcotte.com/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Ethan Marcotte</font></a>曾经在A List Apart发表过一篇文章“<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.alistapart.com/articles/responsive-web-design/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Responsive Web Design</font></a>”，文中援引了响应式建筑设计的概念：</p><blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; quotes: none;"  ><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >最近出现了一门新兴的学科——“响应式建筑(responsive architecture)”——提出，物理空间应该可以根据存在于其中的人的情况进行响应。结合嵌入式机器人技术以及可拉伸材料的应用，建筑师们正在尝试建造一种可以根据周围人群的情况进行弯曲、伸缩和扩展的墙体结构；还可以使用运动传感器配合气候控制系统，调整室内的温度及环境光。已经有公司在生产“智能玻璃”：当室内人数达到一定的阀值时，这种玻璃可以自动变为不透明，确保隐私。</p></blockquote><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >将这个思路延伸到Web设计的领域，我们就得到了一个全新的概念。为什么一定要为每个用户群各自打造一套设计和开发方案？和响应式建筑相似，Web设计同样应该做到根据不同设备环境自动响应及调整。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >显然，我们无法也无需使用运动传感器或是机器人技术，响应式Web设计更多需要的是抽象思维。好在，一些相关的概念已经得到了实践，比如液态布局、帮助页面重新格式化的media queries和脚本等。但是响应式Web设计不仅仅是关于屏幕分辨率自适应以及自动缩放的图片等等，它更像是一种对于设计的全新思维模式。</p><h3 style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px;"  >调整分辨率</h3><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >不同的设备都有各自的屏幕分辨率、清晰度以及屏幕定向方式，不断被研发着的各种新设备也将带来新的屏幕尺寸规格。有些设备基于横屏(portrait)，有些是竖屏(landscape)，甚至还有正方形；对于日益流行的iPhone、iPad及其他一些智能手机、平板电脑，用户还可以通过转动设备来任意切换屏幕的定向方式。怎样才能做到让一种设计方案满足所有情况？</p><p sizcache="7"  sizset="4"  style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  ><img title="什么是响应式Web设计？怎样进行？ - enotsl - enotsl的博客"  alt="responsive-web-design-screen-portrait-landscape"  src="http://www.chinaui.com/UserFile/News/images/2011/11/25/14021111250003/201111252022245072846.jpg"  style="margin: 0px; padding: 0px; outline: 0px;"  ></p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >要想做到同时兼容横、竖屏(用户还有可能在页面加载的过程中切换方向)，我们就必须考虑N种屏幕尺寸规格。诚然，我们可以将这些规格划分为几个大类，然后为每一类做一种方案，确保该方案至少在本组中尽量具有弹性。但即使这样，结果也将是无比焦虑的，谁知道某类设备在5年之后的占有率是多少？而且<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.456bereastreet.com/archive/200704/poll_results_504_of_respondents_maximise_windows/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >很多用户甚至不去将浏览器的窗口最大化</font></a>；类似这样的变数，我们还要考虑多少呢？</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >Morten Hjerde和他的同事们对2005至2008年市场中的400余种移动设备进行了统计(<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.quirksmode.org/mobile/mobilemarket.html"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >查看报告</font></a>)，下图展示了大致的统计结果：</p><p sizcache="7"  sizset="5"  style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  ><img title="什么是响应式Web设计？怎样进行？ - enotsl - enotsl的博客"  alt="responsive-web-design-screen-sizes"  src="http://www.chinaui.com/UserFile/News/images/2011/11/25/14021111250003/201111252022247412675.jpg"  style="margin: 0px; padding: 0px; outline: 0px;"  ></p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >在08年之后，更多更有代表性的新设备问世并普及了。显然，我们不可以沿着“多方案”的思路继续走下去；那么我们应该怎样做呢？</p><h4 style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >部分解决方案：一切弹性化</h4><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >几年前，弹性布局(flexible layout)几乎是一种奢侈品，所谓弹性，也只是体现在竖排布局以及字号等方面；图片始终可以轻易的破坏页面结构，而且即使是哪些弹性的元素结构，在很极端的情况下，仍会破坏布局。所以，所谓的弹性布局其实并非那样弹性，它有时甚至不能适应台式机与笔记本的屏幕分辨率差异，更不用说手机等移动设备了。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >现在，我们可以通过响应式的设计和开发思路让页面更加“弹性”了。图片的尺寸可以被自动调整，页面布局再不会被破坏。虽然永远没有最完美的解决方案，但它给了我们更多选择。无论用户切换设备的屏幕定向方式，还是从台式机屏幕转到iPad上浏览，页面都会真正的富有弹性。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >在前文提到的Ethan Marcotte的文章中，他通过<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.alistapart.com/d/responsive-web-design/ex/ex-site-flexible.html"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >一个实例</font></a>展示了响应式Web设计在页面弹性方面的特性：</p><p sizcache="7"  sizset="6"  style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  ><img title="什么是响应式Web设计？怎样进行？ - enotsl - enotsl的博客"  alt="responsive-web-design-flexible-demo"  src="http://www.chinaui.com/UserFile/News/images/2011/11/25/14021111250003/201111252022248192167.jpg"  style="margin: 0px; padding: 0px; outline: 0px;"  ></p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >该实例的实现方式完美的结合了<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.alistapart.com/articles/fluidgrids/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >液态网格</font></a>和<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://unstoppablerobotninja.com/entry/fluid-images"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >液态图片</font></a>技术，并且聪明的在正确的地方使用了正确的HTML标记。“液态网格”是一种很常见的实践方式；对于“液态图片”技术，下面的文章做了不错的介绍：</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; border: 0px; outline: 0px; list-style: none;"  ><li style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://zomigi.com/blog/hiding-and-revealing-portions-of-images/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Hiding and Revealing Portions of Images</font></a></li><li style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://zomigi.com/blog/creating-sliding-composite-images/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Creating Sliding Composite Images</font></a></li><li style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://zomigi.com/blog/foreground-images-that-scale-with-the-layout/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Foreground Images That Scale With the Layout</font></a></li></ul><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >说到创建液态页面，最好看看Zoe Mickley Gillenwater的那本《Flexible Web Design: Creating Liquid and Elastic Layouts with CSS》，或是下载个样章先：“<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.flexiblewebbook.com/bonus.html"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >怎样创建弹性图片</font></a>”。另外，Zoe的这篇“<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://zomigi.com/blog/essential-resources-for-creating-liquid-and-elastic-layouts/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Essential Resources for Creating Liquid and Elastic Layouts.</font></a>”提供了不少关于创建弹性网格和布局的教程、资源、创意指导和最佳实践方式。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >从技术角度讲，虽然听上去这些都简单可行，但它比“将这些功能结合在一起”要复杂些。举个例子，仔细观察Ethan Marcotte提供的实例中的logo图片：</p><p sizcache="7"  sizset="7"  style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  ><img title="什么是响应式Web设计？怎样进行？ - enotsl - enotsl的博客"  alt="responsive-web-design-flexible-demo-logo"  src="http://www.chinaui.com/UserFile/News/images/2011/11/25/14021111250003/201111252022249440992.jpg"  style="margin: 0px; padding: 0px; outline: 0px;"  ></p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >如果我们将浏览器窗口不断调小，会发现logo图片的文字部分始终会保持同比缩小，保证其完整可读，而不会和周围的插图一样被两边裁掉。所以整个logo其实包括两部分：插图作为页面标题的背景图片，会保持尺寸，但会随着布局调整而被裁切；文字部分则是一张单独的图片。</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_799353"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >h1</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >id</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"logo"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >a</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >href</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"#"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >img</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >src</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"site/logo.png"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >alt</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"The Baker Street Inquirer"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/&gt;&lt;/</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >a</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;/</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >h1</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >其中，&lt;h1&gt;元素使用插图作为背景，文字部分的图片始终保持与背景的对齐<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >。</font></a></p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >这个实例小小的展示一下响应式Web设计的思路。不过这点小努力还不足以避免整个布局在小尺寸窗口中变的过窄或过短，并且logo文字最终会变的小到难以识别，背景图片也会被过多的裁切。</p><h3 style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px;"  >弹性图片</h3><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >响应式Web设计的思路中，一个重要的因素是怎样处理图片方面的问题。有很多同比缩放图片的技术，其中有不少是简单易行的。其中，由Richard Rutter最先尝试的一种做法比较流行，即使用CSS的max-width属性。这个方法在Ethan Marcotte的<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://unstoppablerobotninja.com/entry/fluid-images/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >液态图片</font></a>一文中也有提到。</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_947549"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/1#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >img {&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >max-width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >100%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;}</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >只要没有其他涉及到图片宽度的样式代码覆盖掉这一行规则，页面上所有的图片就会以其原始宽度进行加载，除非其容器可视部分的宽度小于图片的原始宽度。上面的代码确保图片最大的宽度不会超过浏览器窗口或是其容器可视部分的宽度，所以当窗口或容器的可视部分开始变窄时，图片的最大宽度值也会相应的减小，图片本身永远不会容器边缘隐藏和覆盖。实际上，就像Jason Grigsby在他的<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >CSS Media Query for Mobile is Fool’s Gold</font></a>一文中提到的，“液态图片背后的思路，就是无论何时，都确保在其原始宽度范围内，以最大的宽度同比完整的显示图片。我们不必在样式表中为图片设置宽度和高度，只需要让样式表在窗口尺寸发生变化时辅助浏览器对图片进行缩放。” 一种简而美的方法。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >图片本身的分辨率及加载时间是另外一个需要考虑的问题。虽然通过上面的方法，可以很轻松的缩放图片，确保在移动设备的窗口中可以被完整浏览，但如果原始图片本身过大，便会显著降低图片文件的下载速度，对存储空间也会造成没有必要的消耗。</p><h4 style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >响应式图片</h4><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >由Filament Group提出的“响应式图片”技术思想，有助于解决上面提到的问题：不仅要同比的缩放图片，还要在小设备上降低图片自身的分辨率。可以看下<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://filamentgroup.com/examples/responsive-images/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >demo页面</font></a>先。</p><p sizcache="7"  sizset="8"  style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  ><img title="什么是响应式Web设计？怎样进行？ - enotsl - enotsl的博客"  alt="responsive-web-design-flexible-image-filamentgroup"  src="http://www.chinaui.com/UserFile/News/images/2011/11/25/14021111250003/201111252022250688484.jpg"  style="margin: 0px; padding: 0px; outline: 0px;"  ></p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >这个技术的实现需要使用几个相关文件，我们可以<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="https://github.com/filamentgroup/Responsive-Images"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >在Github上获取</font></a>。包括一个JavaScript文件(rwd-images.js)，一个.htaccess文件，以及一些范例资源文件。具体使用方法可以参考<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="https://github.com/filamentgroup/Responsive-Images#readme"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Responsive Images的说明文档</font></a>。大致的原理是，rwd-images.js会检测当前设备的屏幕分辨率，如果是大屏幕设备，则向页面head部分中添加BASE标记，并将后续的图片、脚本和样式表加载请求定向到一个虚拟路径“/rwd-router”。当这些请求到达服务器端，.htacces文件会决定这些请求所需要的是原始图片还是小尺寸的“响应式图片”，并进行相应的反馈输出。对于小屏幕的移动设备，原始尺寸的大图片永远不会被用到。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >这项技术支持多数的现代浏览器，包括IE8+、Safari、Chrome和Opera，以及这些浏览器的移动设备版本；在FireFox及一些旧浏览器中，则会优雅降级：我们仍可得到小图片的输出，但同时，原始大图也会被下载。</p><h4 style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >禁用iPhone中的图片自动缩放</h4><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >在iPhone及iPod Touch中，页面会被自动的同比例缩小至最适合屏幕大小的尺寸，x轴不会产生滚动条，用户可以上下拖拽浏览全部页面，或在需要的时候放大页面的局部。这里会产生一个问题，即使我们运用响应式Web设计的思想，专门为iPhone的小屏输出小图片，它同样会随着整个页面一起被同比例缩小，如下图左侧所示<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >。</font></a></p><p sizcache="7"  sizset="9"  style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><img title="什么是响应式Web设计？怎样进行？ - enotsl - enotsl的博客"  alt="responsive-web-design-iphone"  src="http://www.chinaui.com/UserFile/News/images/2011/11/25/14021111250003/201111252022253340613.jpg"  style="margin: 0px; padding: 0px; outline: 0px;"  ></font></p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >我们可以使用苹果专有的一些meta标记来解决类似的问题。在页面的&lt;head&gt;部分添加以下代码(详情可以参考<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://thinkvitamin.com/design/responsive-design-image-gotcha/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Think Vitamin的相关文章</font></a>)：</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_318851"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/1#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >meta</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >name</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"viewport"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >content</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"width=device-width; initial-scale=1.0"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >将initial-scale的值设定为“1”，即可覆写默认的缩放方式，保持原始的尺寸及比例。更多关于viewport meta标记的用法，可以参考苹<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safarihtmlref/Articles/MetaTags.html"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >果官方的文档</font></a>。</p><h3 style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px;"  >打造布局结构</h3><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >当页面所需要适应的不同设备的屏幕尺寸差异过大时，除了图片方面，我们也应该考虑到整个布局结构的响应式调整；我们可以使用独立的样式表，或者更有效的，使用CSS media query。这不会引起多大的麻烦，多数样式设定不会被影响和改变，只有一些特定的元素会通过浮动、宽度和高度等的设置来改变位置。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >我们可以使用一个默认主样式表来定义页面的主要结构元素，比如#wrapper、#content、#sidebar、#nav等的默认布局方式，以及一些全局性的配色和字体方案。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >我们可以监测页面布局随着不同的浏览环境而产生的变化，如果它们变的过窄过短或是过宽过长，则通过一个子级样式表来继承主样式表的设定，并专门针对某些布局结构进行样式覆写。我们来看下代码示例：</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >下面的代码可以放在默认主样式表style.css中：</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_845669"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >6</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >7</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >8</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >9</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >10</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >11</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >12</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >13</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >14</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >15</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >16</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >17</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >18</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >19</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >20</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >21</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >22</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >23</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >24</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >25</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >26</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >27</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >28</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >29</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >30</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >31</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >32</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >33</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >34</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >35</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >36</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/* Default styles that will carry to the child style sheet */</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >html,body{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >background...</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >font...</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >color...</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >h</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >1</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >,h</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >2</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >,h</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >3</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >{}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >p, blockquote,&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >pre</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >,&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >code</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >, ol, ul{}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/* Structural elements */</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#wrapper{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >80%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >margin</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >0</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >auto</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >background</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#fff</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >padding</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >20px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#content{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >54%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >float</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >left</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >margin-right</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >3%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#sidebar-</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >left</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >20%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >float</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >left</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >margin-right</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >3%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#sidebar-</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >right</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >20%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >float</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >left</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >下面的代码可以放在子级样式表mobile.css中，专门针对移动设备进行样式覆写：</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_188688"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >6</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >7</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >8</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >9</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >10</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >11</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >12</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >13</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >14</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >15</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >16</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >17</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >18</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >19</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >20</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >21</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >22</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >23</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >24</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >25</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#wrapper{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >90%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#content{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >100%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#sidebar-</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >left</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >100%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >clear</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >both</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/* Additional styling for our new layout */</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >border-top</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >1px</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >solid</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#ccc</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >margin-top</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >20px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#sidebar-</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >right</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >100%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >clear</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >both</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/* Additional styling for our new layout */</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >border-top</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >1px</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >solid</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#ccc</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >margin-top</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >20px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >大致的视觉效果如下图所示：</p><p sizcache="7"  sizset="10"  style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  ><img title="什么是响应式Web设计？怎样进行？ - enotsl - enotsl的博客"  alt="responsive-web-design-moving-structure"  src="http://www.chinaui.com/UserFile/News/images/2011/11/25/14021111250003/201111252022254744834.jpg"  style="margin: 0px; padding: 0px; outline: 0px;"  ></p><h4 style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Media Queries</h4><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >CSS3支持CSS2.1所支持的所有媒体类型，例如screen、print、handheld等，同时添加了很多涉及媒体类型的功能属性，包括max-width(最大宽度)、device-width(设备宽度)、orientation(屏幕定向，横屏或竖屏)和color。在CSS3发布之后出现的新玩具，如iPad或Android相关设备，都可以完美的支持这些属性。所以我们可以通过media query为新设备设置独特的样式，而忽略那些不支持CSS3的台式机中的旧浏览器<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >。</font></a></p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >在Ethan的文章中，我们能看到一段media query使用实例：</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_125955"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >link</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >rel</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"stylesheet"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >type</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"text/css"</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >media</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"screen and (max-device-width: 480px)"</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >href</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"shetland.css"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/&gt;</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >代码本身可以很好的说明工作机制：如果页面通过屏幕呈现(非打印一类)，并且屏幕宽度不超过480px，则加载shetland.css样式表。要了解更多关于CSS3媒体新属性的信息，可以参考“<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.quirksmode.org/blog/archives/2010/04/the_orientation.html"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >The Orientation Media Query</font></a>”一文。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >我们可以创建多个样式表，以适应不同设备类型的宽度范围。<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.alistapart.com/articles/responsive-web-design/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Ethan的文章</font></a>中的“Meet the media query”部分有更多的范例及解释。更有效率的做法是，将多个media queries整合在一个样式表文件中：</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_464722"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >6</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >7</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >8</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >9</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >10</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >11</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >12</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >13</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >14</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >15</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >16</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >17</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >18</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/* Smartphones (portrait and landscape) ----------- */</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >@media only&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >screen</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >and (min-device-width :&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >320px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >)</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >and (max-device-width :&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >480px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >) {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/* Styles */</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/* Smartphones (landscape) ----------- */</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >@media only&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >screen</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >and (min-width :&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >321px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >) {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/* Styles */</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/* Smartphones (portrait) ----------- */</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >@media only&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >screen</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >and (max-width :&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >320px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >) {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/* Styles */</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >上面的代码来自于Andy Clark创建的可以兼容各种主流设备的免费模板。这样整合多个media queries于一个样式表文件的方式，与通过media queries调用不同样式表的方式之间的区别与联系，可以参考“<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Hardboiled CSS3 Media Queries</font></a>”一文。</p><h4 style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >CSS3 Media Queries</h4><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >上面演示的一些代码范例是CSS2.1与CSS3通吃的。现在让我们来看看怎样使用CSS3专有的media queries功能来创建响应式Web设计。其中某些方法在当前就有切实的使用价值，不久的将来则一定会全部派上用场。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  ><strong style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >min-width</strong>和<strong style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >max-width</strong>这两个属性很靠谱。通过min-width的设置，我们可以在浏览器窗口或设备屏幕宽度高于这个值的情况下，为页面指定一个特定的样式表；max-width则反之。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >下面的几个示例中，我们使用的是将多个media queries整合在单一样式表中进行编码的句法。如前文所述，这样做更加高效，减少请求数量。</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_807912"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >6</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >@media&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >screen</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >and (</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >min-width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >600px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >) {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >.hereIsMyClass {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >30%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >float</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >right</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >上面代码中定义的类(hereIsMyClass)只有在浏览器或屏幕宽度超过600px时才会有效。</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_987287"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >6</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >@media&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >screen</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >and (</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >max-width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >600px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >) {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >.aClassforSmallScreens {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >clear</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >both</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >font-size</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >1.3em</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >而这段代码的作用则相反：aClassforSmallScreens类只有在浏览器或屏幕宽度小于600px时才会有效。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >可以看出min-width和max-width可以同时判断设备屏幕尺寸与浏览器实际宽度。有些时候，我们希望通过media queries作用于某种特定的设备，而忽略其上运行的浏览器是否由于没有最大化而在尺寸上与设备屏幕尺寸产生不一致的情况。这时，我们需要使用<strong style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >min-device-width</strong>与<strong style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >max-device-width</strong>，用来判断设备本身的屏幕尺寸。</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_448247"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >@media&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >screen</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >and (max-device-</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >480px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >) {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >.classForiPhoneDisplay {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >font-size</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >1.2em</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div></div></td></tr></table></div></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_197139"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >6</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >@media&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >screen</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >and (min-device-</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >768px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >) {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >.minimumiPadWidth {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >clear</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >both</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >margin-bottom</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >2px</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >solid</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#ccc</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >还有一些其他方法，可以帮我们有效的使用media queries锁定某些指定的设备。可以参考下面两篇出自Thomas Maier的文章：</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; border: 0px; outline: 0px; list-style: none;"  ><li style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://thomasmaier.me/2010/06/css-for-iphone-4-retina-display/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >CSS for iPhone 4 (Retina display)</font></a></li><li style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://thomasmaier.me/2010/03/howto-css-for-the-ipad/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >How To: CSS for the iPad</font></a></li></ul><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >对于iPad来说，<strong style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >orientation</strong>属性尤其有用。它的值可以是landscape(横屏)或portrait(竖屏)。</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_901833"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >6</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >@media&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >screen</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >and (orientation:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >landscape</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >) {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >.iPadLandscape {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >30%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >float</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >right</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div></div></td></tr></table></div></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_794650"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >@media&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >screen</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >and (orientation:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >portrait</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >) {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >.iPadPortrait {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >clear</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >both</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >不幸的是，这个属性目前确实只在iPad上有效。对于其他可以转屏的设备，譬如iPhone，可以使用min-device-width和max-device-width来变通实现；详情可以参考“<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.thecssninja.com/css/iphone-orientation-css"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Determine iPhone orientation using CSS</font></a>”一文。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >我们还可以将上述属性组合使用，来锁定某个屏幕尺寸范围：</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_811233"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >6</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >7</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >@media&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >screen</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >and (</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >min-width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >800px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >) and (</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >max-width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >1200px</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >) {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >.classForaMediumScreen {</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >background</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#cc0000</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >30%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >float</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >right</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >上面的代码可以作用于浏览器窗口或屏幕宽度在800px至1200px之间的所有设备。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >其实，很多设计师和开发者仍会选择使用多个样式表的方式来实现media queries。如果从资源的组织和维护的角度出发，其益处确实高于效率的损耗的话，那么这样做也完全不坏：</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_514353"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >link</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >rel</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"stylesheet"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >media</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"screen and (max-width: 600px)"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >href</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"small.css"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >link</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >rel</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"stylesheet"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >media</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"screen and (min-width: 600px)"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >href</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"large.css"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >link</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >rel</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"stylesheet"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >media</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"print"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >href</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"print.css"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >/&gt;</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >所以呐，凡事没有绝对，最好根据实际情况决定使用media queries的方式。比如，对于iPad，我们可以将多个media queries直接写在一个样式表中。因为iPad用户随时有可能切换屏幕定向，这种情况下，要保证页面在极短的时间内响应屏幕尺寸的调整，我们必须选择效率最高的方式。</p><h4 style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >JavaScript</h4><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >JavaScript也是我们的武器之一，特别是当某些旧设备无法完美支持CSS3的media query时，它可以作为后备支援。幸运的是，已经有专门的JS库来帮助旧浏览器(IE 5+，Firefox 1+，Safari 2等)支持CSS3的media queries。使用方法很简单，下载<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://code.google.com/p/css3-mediaqueries-js/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >css3-mediaqueries.js</font></a>并在你的页面中调用它。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >而下面的代码则演示了怎样使用简单的几行jQuery代码来检测浏览器宽度，并为不同的情况调用不同的样式表：</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_902426"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/2#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >6</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >7</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >8</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >9</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >10</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >11</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >12</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >13</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >14</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >15</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;script type=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"text/javascript"</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >src=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"  >http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js</a>"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;&lt;/script&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;script type=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"text/javascript"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >$(document).ready(</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >function</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >(){</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >$(window).bind(</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"resize"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >, resizeWindow);</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >function</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >resizeWindow(e){</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >var</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >newWindowWidth = $(window).width();</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >// If width width is below 600px, switch to the mobile stylesheet</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >if</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >(newWindowWidth &lt; 600){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $(</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"link[rel=stylesheet]"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >).attr({href :&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"mobile.css"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >});&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >// Else if width is above 600px, switch to the large stylesheet&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if(newWindowWidth &gt; 600){</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >$(</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"link[rel=stylesheet]"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >).attr({href :&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"style.css"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >});</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >});</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;/script&gt;</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >类似这样的解决方案还有很多。所以我们要清楚，media queries不是一个绝对唯一的答案，它只是一个以纯CSS方式实现响应式Web设计思路的手段。借助JavaScript，我们则可以实现更多的变化。这篇“<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.quirksmode.org/blog/archives/2010/08/combining_media.html"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Combining Media Queries and JavaScript</font></a>”向我们展示了JavaScript配合media queries的更多细节信息。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >&nbsp;</p><h3 style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px;"  >显示或隐藏内容</h3><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >通过前文的学习，我们已经了解到，对于响应式Web设计，同比例缩减元素尺寸以及调整页面结构布局，是两个重要的方式方法。但是对于页面中的文字内容信息来说，则不能简单的只从“同比缩小”和“调整布局结构”这两方面去处理。对于手机等移动设备来说，在文字内容方面，已经有了很多最佳实践方式和指导原则：简化的导航、更易聚焦的内容、以信息列表代替传统的多行文案内容等。</p><p sizcache="7"  sizset="11"  style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  ><img title="什么是响应式Web设计？怎样进行？ - enotsl - enotsl的博客"  alt="responsive-web-design-digg-app"  src="http://www.chinaui.com/UserFile/News/images/2011/11/25/14021111250003/201111252022257240820.jpg"  style="margin: 0px; padding: 0px; outline: 0px;"  ></p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >响应式Web设计的思想，一方面要保证页面元素及布局具有足够的弹性，来兼容各类设备平台和屏幕尺寸；另一方面，则是增强可读性和易用性，帮助用户在任何设备环境中都能更容易的获取最重要的内容信息。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >有一条样式代码，我们已经使用了多年：</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_193991"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/3#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >display</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >none</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >我们可以在一个针对某类小屏幕设备的样式表中使用它来隐藏掉页面中的某些块级元素，也可以使用前文的方法，通过JS判断当前硬件屏幕规格，在小屏幕设备的情况下直接为需要隐藏的元素添加工具类class。比如，对于手机类设备，我们可以隐藏掉大块的文字内容区，而只显示一个简单的导航结构，其中的导航元素可以指向详细内容页面<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >。</font></a></p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >注意，不要使用visibility: hidden的方式，因为这只能使元素在视觉上不做呈现；display属性则可帮助我们设置整块内容是否需要被输出。对于移动设备来说，避免这些不必要的资源浪费还是很重要的。我们来看一个简单的示例：</p><p sizcache="7"  sizset="12"  style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  ><img title="什么是响应式Web设计？怎样进行？ - enotsl - enotsl的博客"  alt="responsive-web-design-content"  src="http://www.chinaui.com/UserFile/News/images/2011/11/25/14021111250003/201111252022259580255.jpg"  style="margin: 0px; padding: 0px; outline: 0px;"  ></p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >图中上半部分是大屏幕设备所显示的完整页面，下面的则是该页面在小屏幕设备的呈现方式。页面HTML代码如下：</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_432926"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/3#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >6</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >7</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >8</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >9</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >10</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >11</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >12</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >13</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >14</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >p</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >class</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"sidebar-nav"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >a</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >href</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"#"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;Left Sidebar Content&lt;/</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >a</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt; | &lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >a</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >href</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"#"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;Right Sidebar Content&lt;/</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >a</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;&lt;/</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >p</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >div</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >id</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"content"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >h2</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;Main Content&lt;/</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >h2</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;/</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >div</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >div</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >id</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"sidebar-left"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >h2</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;A Left Sidebar&lt;/</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >h2</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;/</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >div</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >div</code>&nbsp;<code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >id</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >=</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >"sidebar-right"</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >h2</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;A Right Sidebar&lt;/</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >h2</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&lt;/</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >div</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >&gt;</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >下面是默认的主样式表，其中，我们要隐藏掉链接导航部分(sidebar-nav)，因为默认样式适用的设备屏幕会足够大，足够显示包括两个侧边栏在内的所有内容。</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_315652"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/3#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >6</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >7</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >8</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >9</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >10</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >11</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >12</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >13</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >14</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >15</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >16</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >17</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#content{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >54%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >float</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >left</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >margin-right</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >3%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#sidebar-</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >left</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >20%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >float</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >left</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >margin-right</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >3%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#sidebar-</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >right</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >20%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >float</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >left</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >.sidebar-nav{</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >display</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >none</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;}</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >下面是用于小屏幕移动设备的样式表代码。现在，我们要隐藏掉两个侧边栏，并使sidebar-nav显示出来。借助JavaScript，当用户点击sidebar-nav中的链接时，对应的侧边栏可以恢复显示。当然，触发恢复显示的方式有很多种，即可以通过JS改变侧边栏的display属性值，也可以为其添加额外的布局样式。</p><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div id="highlighter_784502"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " rel="nofollow" href="http://beforweb.com/node/6/page/0/3#"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >?</font></a></div><table border="0"  cellpadding="0"  cellspacing="0"  style="margin: 0px; padding: 0px; font-size: 14px; border: 0px; outline: 0px; border-collapse: collapse; border-spacing: 0px;"  ><tbody style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><tr style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >1</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >2</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >3</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >4</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >5</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >6</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >7</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >8</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >9</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >10</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >11</div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >12</div></td><td style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#content{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >width</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >100%</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#sidebar-</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >left</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >display</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >none</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >#sidebar-</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >right</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >{</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >display</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >none</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >}</code></div><div style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >.sidebar-nav{</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >display</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >:&nbsp;</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >inline</code><code style="margin: 0px; padding: 0px; border: 0px; outline: 0px; font-family: 'courier new', courier, monospace;"  >;}</code></div></div></td></tr></table></div></div><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >现在，我们的页面已经可以随着设备和屏幕规格的变更，响应式的做到元素的同比缩放、布局结构的改变、内容的优化调整。特别是对于手机设备，我们还要在实践过程中注意一些该类设备共有的设计指导原则。比如，针对手机设备，使用一个特定的样式，将页面原有的文字导航元素变为更易操作的图标形式。下面的一些文章资源可作参考阅读：</p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; border: 0px; outline: 0px; list-style: none;"  ><li style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.smashingmagazine.com/2009/01/13/mobile-web-design-trends-2009/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Mobile Web Design Trends For 2009</font></a></li><li style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  ><a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.webcredible.co.uk/user-friendly-resources/web-usability/mobile-guidelines.shtml"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >7 Usability Guidelines for Websites on Mobile Devices</font></a></li></ul><h4 style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >触屏与鼠标</h4><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >触屏设备已经成为主流。虽然目前多数触屏设备还是小屏幕类型的产品，比如手机，但是市场上越来越多的大屏幕设备也开始使用触屏技术；且不说iPad一类的平板电脑，就连一些笔记本和台式机也加入了这一行列。比如<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.shopping.hp.com/webapp/shopping/store_access.do?template_type=series_detail&amp;category=notebooks&amp;series_name=tm2t_series&amp;aoid=51320&amp;keyword=hp+touchsmart+tm2&amp;tafcjnef=fy10&amp;DS_KWID=p117477087"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >HP Touchsmart tm2t</font></a>，即使用传统的键鼠设备，同时也加入了触屏技术。</p><p sizcache="7"  sizset="13"  style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  ><img title="什么是响应式Web设计？怎样进行？ - enotsl - enotsl的博客"  alt="responsive-web-design-touchscreen"  src="http://www.chinaui.com/UserFile/News/images/2011/11/25/14021111250003/201111252022262076165.jpg"  style="margin: 0px; padding: 0px; outline: 0px;"  ></p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >相比于传统的基于鼠标指针的互动，触屏技术显然带来了截然不同的交互方式与相应的设计规范；两者又有各自所适用的领域。所幸，要使我们的设计方案同时满足这两类设备的规范，并非一件难事，只是有些地方需要注意。比如，触屏设备无法反映CSS定义的hover行为及相应的样式，因为它没有鼠标指针的概念，手指点击就是click行为。所以不要让任何功能依赖于对hover状态的触发。</p><p style="margin-top: 0px; margin-bottom: 0px; border: 0px; outline: 0px;"  >有兴趣的话，可以读读这篇“<a style="margin: 0px; padding: 0px; border: 0px; outline: 0px; text-decoration: none; color: rgb(51, 51, 51); " target="_blank" rel="nofollow" href="http://www.whatcreative.co.uk/blog/tips/designing-for-touch-screen/"  ><font color="#003366"  style="margin: 0px; padding: 0px; border: 0px; outline: 0px;"  >Designing for Touchscreen</font></a>”，这里提到的很多建议即有利于改进针对触屏设备的设计方式，同时也不会削弱传统键鼠设备上的用户体验。比如，放在页面右侧的导航列表可以对触屏设备的用户更加友好。因为多数人习惯用右手点击操作，而左手负责握住设备；这样，放在右侧的导航列表即方便右手的点击，又可以避免被握着设备的左手不小心触碰到。而这一点与键鼠设备用户的习惯完全不矛盾。</p></div><wbr></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020124111324412</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020124111324412</guid>
    <pubDate>Tue, 1 May 2012 23:32:44 +0800</pubDate>
    <dcterms:modified>2012-05-01T23:32:44+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[在Webkit浏览器中，使用CSS3替代JavaScript效果]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/90059060201241112525932</link>
    <description><![CDATA[<div><div style="clear: both; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; background-color: rgb(247, 247, 247);"  ><div><h3 style="font-size: 16px; margin: 0px 0px 0.5em 100px; padding: 0px;"  ><br></h3></div></div><div id="news_content"  style="line-height: 1.8em; font-family: Helvetica, Tahoma, Arial, sans-serif; background-color: rgb(247, 247, 247);"  ><p style="margin-top: 0px; margin-bottom: 0px;"  >众所周知，这段时间CSS3一直很火，大有成为“JavaScript杀手”的可能。此文将会介绍7个很酷的CSS3动画的示例，使用WebKit浏览器（如Google Chrome 和Safari）。</p><div><p style="margin-top: 0px; margin-bottom: 0px;"  ><br><span style="font-size: medium;"  ><a style="color: rgb(0, 102, 153); " rel="nofollow" href="http://webdeveloperjuice.com/demos/css/css3effects.html"  ><strong>点击此处查看Demo</strong></a></span></p><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p><p style="margin-top: 0px; margin-bottom: 0px;"  >以下为Demo的代码：</p><h3 style="line-height: 1.5em; margin: 0px 0px 0.5em; padding: 0px;"  >Effect 1: Fade Block</h3><p style="margin-top: 0px; margin-bottom: 0px;"  >html：</p><div><pre style="font-size: 1em;"  >&lt;div id="fade"&gt;Place mouse on  me i will fade!&lt;/div&gt;</pre></div><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="font-size: 10px; color: rgb(153, 204, 0);"  >CSS：</span></p><div><pre style="font-size: 1em;"  ><span style="color: rgb(204, 0, 204);"  >#fade</span><span style="color: rgb(0, 170, 0);"  >{</span>opacity<span style="color: rgb(0, 170, 0);"  >:</span> <span style="color: rgb(204, 102, 204);"  >1</span><span style="color: rgb(0, 170, 0);"  >;</span>-webkit-transition<span style="color: rgb(0, 170, 0);"  >:</span> opacity 1s linear<span style="color: rgb(0, 170, 0);"  >;</span><span style="color: rgb(0, 170, 0);"  >}</span> <span style="color: rgb(204, 0, 204);"  >#fade</span><span style="color: rgb(51, 51, 255);"  >:hover</span><span style="color: rgb(0, 170, 0);"  >{</span>opacity<span style="color: rgb(0, 170, 0);"  >:</span> <span style="color: rgb(204, 102, 204);"  >0</span><span style="color: rgb(0, 170, 0);"  >;</span><span style="color: rgb(0, 170, 0);"  >}</span></pre></div><h5 style="font-size: 1.1em; line-height: 1.3em; margin: 0px 0px 0.25em; padding: 0px; color: rgb(255, 255, 255);"  >.<span style="color: rgb(0, 0, 0); font-size: 14px;"  >效果2: Pulsate Block</span></h5><p style="margin-top: 0px; margin-bottom: 0px;"  >html：</p><div><span style="font-size: medium;"  ><pre style="font-size: 1em;"  >&lt;div id="pulsate"&gt;Place mouse on  me i will pulsate!&lt;/div&gt;</pre></span></div><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="font-size: 10px; color: rgb(153, 204, 0);"  >CSS：</span></p><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="font-size: 10px; color: rgb(153, 204, 0);"  ><span style="color: rgb(204, 0, 204);"  >#pulsate</span><span style="color: rgb(51, 51, 255);"  >:hover&nbsp;</span><span style="color: rgb(0, 170, 0);"  >{</span>-webkit-animation-name<span style="color: rgb(0, 170, 0);"  >:</span>&nbsp;pulsate<span style="color: rgb(0, 170, 0);"  >;</span>-webkit-animation-duration<span style="color: rgb(0, 170, 0);"  >:</span>&nbsp;20s<span style="color: rgb(0, 170, 0);"  >;</span>-webkit-animation-timing-function<span style="color: rgb(0, 170, 0);"  >:</span>&nbsp;ease-in-out<span style="color: rgb(0, 170, 0);"  >;</span><span style="color: rgb(0, 170, 0);"  >}</span></span></p><div><span style="font-size: medium;"  ><pre style="font-size: 1em;"  > <span style="color: rgb(161, 161, 0);"  >@-webkit-keyframes pulsate {</span>  <span style="color: rgb(153, 51, 51);"  ><span style="color: rgb(204, 102, 204);"  >0</span>%</span> <span style="color: rgb(0, 170, 0);"  >{</span> <span style="font-weight: bold;"  >width</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >140px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="color: rgb(0, 170, 0);"  >}</span>  <span style="color: rgb(153, 51, 51);"  ><span style="color: rgb(204, 102, 204);"  >5</span>%</span> <span style="color: rgb(0, 170, 0);"  >{</span> <span style="font-weight: bold;"  >width</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >190px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="font-weight: bold;"  >left</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >-25px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="color: rgb(0, 170, 0);"  >}</span>  <span style="color: rgb(153, 51, 51);"  ><span style="color: rgb(204, 102, 204);"  >10</span>%</span> <span style="color: rgb(0, 170, 0);"  >{</span> <span style="font-weight: bold;"  >width</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >140px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="font-weight: bold;"  >left</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >0px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="color: rgb(0, 170, 0);"  >}</span>  <span style="color: rgb(153, 51, 51);"  ><span style="color: rgb(204, 102, 204);"  >15</span>%</span> <span style="color: rgb(0, 170, 0);"  >{</span> <span style="font-weight: bold;"  >width</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >190px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="font-weight: bold;"  >left</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >-25px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="color: rgb(0, 170, 0);"  >}</span>  <span style="color: rgb(153, 51, 51);"  ><span style="color: rgb(204, 102, 204);"  >20</span>%</span> <span style="color: rgb(0, 170, 0);"  >{</span> <span style="font-weight: bold;"  >width</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >140px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="font-weight: bold;"  >left</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >0px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="color: rgb(0, 170, 0);"  >}</span>   <span style="color: rgb(153, 51, 51);"  ><span style="color: rgb(204, 102, 204);"  >40</span>%</span> <span style="color: rgb(0, 170, 0);"  >{</span> <span style="font-weight: bold;"  >width</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >140px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="color: rgb(0, 170, 0);"  >}</span>  <span style="color: rgb(153, 51, 51);"  ><span style="color: rgb(204, 102, 204);"  >45</span>%</span> <span style="color: rgb(0, 170, 0);"  >{</span> <span style="font-weight: bold;"  >width</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >190px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="font-weight: bold;"  >left</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >-25px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="color: rgb(0, 170, 0);"  >}</span>  <span style="color: rgb(153, 51, 51);"  ><span style="color: rgb(204, 102, 204);"  >50</span>%</span> <span style="color: rgb(0, 170, 0);"  >{</span> <span style="font-weight: bold;"  >width</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >140px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="font-weight: bold;"  >left</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >0px</span><span style="color: rgb(0, 170, 0);"  >;</span><span style="color: rgb(0, 170, 0);"  >}</span>  <span style="color: rgb(153, 51, 51);"  ><span style="color: rgb(204, 102, 204);"  >55</span>%</span> <span style="color: rgb(0, 170, 0);"  >{</span> <span style="font-weight: bold;"  >width</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >190px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="font-weight: bold;"  >left</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >-25px</span><span style="color: rgb(0, 170, 0);"  >;</span><span style="color: rgb(0, 170, 0);"  >}</span>  <span style="color: rgb(153, 51, 51);"  ><span style="color: rgb(204, 102, 204);"  >60</span>%</span> <span style="color: rgb(0, 170, 0);"  >{</span> <span style="font-weight: bold;"  >width</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >140px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="font-weight: bold;"  >left</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >0px</span><span style="color: rgb(0, 170, 0);"  >;</span><span style="color: rgb(0, 170, 0);"  >}</span>  <span style="color: rgb(153, 51, 51);"  ><span style="color: rgb(204, 102, 204);"  >80</span>%</span> <span style="color: rgb(0, 170, 0);"  >{</span> <span style="font-weight: bold;"  >width</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >140px</span><span style="color: rgb(0, 170, 0);"  >;</span> <span style="color: rgb(0, 170, 0);"  >}</span>  <span style="color: rgb(153, 51, 51);"  ><span style="color: rgb(204, 102, 204);"  >100</span>%</span> <span style="color: rgb(0, 170, 0);"  >{</span> <span style="font-weight: bold;"  >width</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >140px</span><span style="color: rgb(0, 170, 0);"  >;</span>  <span style="color: rgb(0, 170, 0);"  >}</span>  <span style="color: rgb(0, 170, 0);"  >}</span></pre></span></div><h5 style="font-size: 1.1em; line-height: 1.3em; margin: 0px 0px 0.25em; padding: 0px; color: rgb(255, 255, 255);"  >.<span style="color: rgb(0, 0, 0); font-size: 14px;"  >效果3: Nudge</span></h5><p style="margin-top: 0px; margin-bottom: 0px;"  >html：</p><div><span style="font-size: medium;"  ><pre style="font-size: 1em;"  >&lt;div id="nudge"&gt;Place mouse on  me my text will shift!&lt;/div&gt;</pre></span></div><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="font-size: 10px; color: rgb(153, 204, 0);"  >CSS：</span></p><div><span style="font-size: medium;"  ><pre style="font-size: 1em;"  ><span style="color: rgb(204, 0, 204);"  >#nudge</span><span style="color: rgb(0, 170, 0);"  >{</span>-webkit-transition-property<span style="color: rgb(0, 170, 0);"  >:</span><span style="font-weight: bold;"  >color</span><span style="color: rgb(0, 170, 0);"  >,</span><span style="font-weight: bold;"  >background-color</span><span style="color: rgb(0, 170, 0);"  >,</span><span style="font-weight: bold;"  >padding-left</span><span style="color: rgb(0, 170, 0);"  >;</span>-webkit-transition-duration<span style="color: rgb(0, 170, 0);"  >:</span>500ms<span style="color: rgb(0, 170, 0);"  >,</span>500ms<span style="color: rgb(0, 170, 0);"  >,</span>500ms<span style="color: rgb(0, 170, 0);"  >}</span> <span style="color: rgb(204, 0, 204);"  >#nudge</span><span style="color: rgb(51, 51, 255);"  >:hover</span><span style="color: rgb(0, 170, 0);"  >{</span><span style="font-weight: bold;"  >background-color</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(204, 0, 204);"  >#efefef</span><span style="color: rgb(0, 170, 0);"  >;</span>color<span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(204, 0, 204);"  >#333</span><span style="color: rgb(0, 170, 0);"  >;</span>padding-<span style="font-weight: bold;"  >left</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >50px</span><span style="color: rgb(0, 170, 0);"  >}</span></pre></span></div><h5 style="font-size: 1.1em; line-height: 1.3em; margin: 0px 0px 0.25em; padding: 0px; color: rgb(255, 255, 255);"  >.<span style="color: rgb(0, 0, 0); font-size: 14px;"  >效果4: Expand Block</span></h5><p style="margin-top: 0px; margin-bottom: 0px;"  >html：</p><div><span style="font-size: medium;"  ><pre style="font-size: 1em;"  >&lt;div id="expand"&gt;Place mouse on  me my border will expand&lt;/div&gt;</pre></span></div><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="font-size: 10px; color: rgb(153, 204, 0);"  >CSS：</span></p><div><span style="font-size: medium;"  ><pre style="font-size: 1em;"  ><span style="color: rgb(204, 0, 204);"  >#expand</span><span style="color: rgb(0, 170, 0);"  >{</span><span style="font-weight: bold;"  >background-color</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(204, 0, 204);"  >#eee</span><span style="color: rgb(0, 170, 0);"  >;</span>-webkit-transition<span style="color: rgb(0, 170, 0);"  >:</span> all 500ms linear<span style="color: rgb(0, 170, 0);"  >;</span> <span style="font-weight: bold;"  >border</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >10px</span> <span style="color: rgb(153, 51, 51);"  >solid</span> <span style="font-weight: bold;"  >black</span><span style="color: rgb(0, 170, 0);"  >}</span> <span style="color: rgb(204, 0, 204);"  >#expand</span><span style="color: rgb(51, 51, 255);"  >:hover</span><span style="color: rgb(0, 170, 0);"  >{</span><span style="font-weight: bold;"  >border</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >30px</span> <span style="color: rgb(153, 51, 51);"  >solid</span> <span style="color: rgb(204, 0, 204);"  >#800</span><span style="color: rgb(0, 170, 0);"  >}</span></pre></span></div><h5 style="font-size: 1.1em; line-height: 1.3em; margin: 0px 0px 0.25em; padding: 0px; color: rgb(255, 255, 255);"  >.<span style="color: rgb(0, 0, 0); font-size: 14px;"  >效果5: Bounce Block</span></h5><p style="margin-top: 0px; margin-bottom: 0px;"  >html：</p><div><span style="font-size: medium;"  ><pre style="font-size: 1em;"  >&lt;div id="bounce"&gt;Place mouse on  me i will bounce!&lt;/div&gt;</pre></span></div><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="font-size: 10px; color: rgb(153, 204, 0);"  >CSS：</span></p><div><span style="font-size: medium;"  ><pre style="font-size: 1em;"  ><span style="color: rgb(204, 0, 204);"  >#bounce</span><span style="color: rgb(51, 51, 255);"  >:hover </span><span style="color: rgb(0, 170, 0);"  >{</span>-webkit-animation-name<span style="color: rgb(0, 170, 0);"  >:</span>bounce<span style="color: rgb(0, 170, 0);"  >;</span>-webkit-animation-duration<span style="color: rgb(0, 170, 0);"  >:</span>1s<span style="color: rgb(0, 170, 0);"  >;</span>-webkit-animation-iteration-count<span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(204, 102, 204);"  >2</span><span style="color: rgb(0, 170, 0);"  >;</span>-webkit-animation-<span style="font-weight: bold;"  >direction</span><span style="color: rgb(0, 170, 0);"  >:</span>alternate<span style="color: rgb(0, 170, 0);"  >}</span>  <span style="color: rgb(161, 161, 0);"  >@-webkit-keyframes bounce{from{margin-left:0px;}</span>   to<span style="color: rgb(0, 170, 0);"  >{</span><span style="font-weight: bold;"  >margin-left</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >250px</span><span style="color: rgb(0, 170, 0);"  >;</span><span style="color: rgb(0, 170, 0);"  >}</span>   <span style="color: rgb(0, 170, 0);"  >}</span></pre></span></div><h5 style="font-size: 1.1em; line-height: 1.3em; margin: 0px 0px 0.25em; padding: 0px; color: rgb(255, 255, 255);"  >.<span style="color: rgb(0, 0, 0); font-size: 14px;"  >效果6: Spin Block</span></h5><div><span style="font-size: medium;"  ></span>&nbsp;html：<pre style="font-size: 1em;"  >&lt;div id="spin"&gt;Place mouse on  me i will spin&lt;/div&gt;</pre></div><p style="margin-top: 0px; margin-bottom: 0px;"  >CSS：</p><div><span style="font-size: medium;"  ><pre style="font-size: 1em;"  ><span style="color: rgb(204, 0, 204);"  >#spin</span><span style="color: rgb(0, 170, 0);"  >{</span>-webkit-transition<span style="color: rgb(0, 170, 0);"  >:</span> -webkit-transform 3s ease-in<span style="color: rgb(0, 170, 0);"  >;</span><span style="color: rgb(0, 170, 0);"  >}</span> <span style="color: rgb(204, 0, 204);"  >#spin</span><span style="color: rgb(51, 51, 255);"  >:hover</span><span style="color: rgb(0, 170, 0);"  >{</span>-webkit-transform<span style="color: rgb(0, 170, 0);"  >:</span>rotate<span style="color: rgb(0, 170, 0);"  >(</span>360deg<span style="color: rgb(0, 170, 0);"  >)</span><span style="color: rgb(0, 170, 0);"  >}</span></pre></span></div><h5 style="font-size: 1.1em; line-height: 1.3em; margin: 0px 0px 0.25em; padding: 0px; color: rgb(255, 255, 255);"  >.<span style="color: rgb(0, 0, 0); font-size: 14px;"  >效果7: Accordion</span></h5><p style="margin-top: 0px; margin-bottom: 0px;"  >html：</p><div><span style="font-size: medium;"  ><pre style="font-size: 1em;"  >&lt;div id="accordion" class="accordion"&gt;   &lt;a href="#first"&gt;This is first tab&lt;/a&gt;&lt;div id="first"&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. &lt;/p&gt; &lt;/div&gt;   &lt;a href="#second"&gt;This is second tab&lt;/a&gt;&lt;div id="second"&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. &lt;/p&gt; &lt;/div&gt;   &lt;a href="#third"&gt;This is third tab&lt;/a&gt;&lt;div id="third"&gt;&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. &lt;/p&gt; &lt;/div&gt;  &lt;/div&gt; </pre></span></div><p style="margin-top: 0px; margin-bottom: 0px;"  ><span style="font-size: 10px; color: rgb(153, 204, 0);"  >CSS：</span></p><div><span style="font-size: medium;"  ><pre style="font-size: 1em;"  ><span style="color: rgb(102, 102, 255);"  >.accordion</span> a<span style="color: rgb(0, 170, 0);"  >{</span><span style="font-weight: bold;"  >display</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >block</span><span style="color: rgb(0, 170, 0);"  >;</span>padding<span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >5px</span> <span style="color: rgb(153, 51, 51);"  >10px</span><span style="color: rgb(0, 170, 0);"  >;</span>background-<span style="font-weight: bold;"  >color</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(204, 0, 204);"  >#333</span><span style="color: rgb(0, 170, 0);"  >;</span>color<span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(204, 0, 204);"  >#eee</span><span style="color: rgb(0, 170, 0);"  >;</span>text-decoration<span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >none</span><span style="color: rgb(0, 170, 0);"  >}</span> <span style="color: rgb(102, 102, 255);"  >.accordion</span> a<span style="color: rgb(51, 51, 255);"  >:hover</span><span style="color: rgb(0, 170, 0);"  >{</span><span style="font-weight: bold;"  >background-color</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(204, 0, 204);"  >#999</span><span style="color: rgb(0, 170, 0);"  >}</span> <span style="color: rgb(102, 102, 255);"  >.accordion</span> div<span style="color: rgb(0, 170, 0);"  >{</span><span style="font-weight: bold;"  >background-color</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(204, 0, 204);"  >#ccc</span><span style="color: rgb(0, 170, 0);"  >;</span>color<span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(204, 0, 204);"  >#222</span><span style="color: rgb(0, 170, 0);"  >;</span><span style="color: rgb(0, 170, 0);"  >}</span> <span style="color: rgb(102, 102, 255);"  >.accordion</span> div p<span style="color: rgb(0, 170, 0);"  >{</span><span style="font-weight: bold;"  >padding</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >20px</span><span style="color: rgb(0, 170, 0);"  >}</span> &nbsp; <span style="color: rgb(204, 0, 204);"  >#accordion</span> div<span style="color: rgb(0, 170, 0);"  >{</span><span style="font-weight: bold;"  >height</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(204, 102, 204);"  >0</span><span style="color: rgb(0, 170, 0);"  >;</span>overflow<span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >hidden</span><span style="color: rgb(0, 170, 0);"  >;</span>-webkit-transition<span style="color: rgb(0, 170, 0);"  >:</span><span style="font-weight: bold;"  >height</span> 600ms ease<span style="color: rgb(0, 170, 0);"  >}</span> <span style="color: rgb(204, 0, 204);"  >#accordion</span> div<span style="color: rgb(51, 51, 255);"  >:target</span><span style="color: rgb(0, 170, 0);"  >{</span><span style="font-weight: bold;"  >height</span><span style="color: rgb(0, 170, 0);"  >:</span><span style="color: rgb(153, 51, 51);"  >110px</span><span style="color: rgb(0, 170, 0);"  >}</span></pre></span></div></div><p style="margin-top: 0px; margin-bottom: 0px;"  >&nbsp;</p><p style="margin-top: 0px; margin-bottom: 0px;"  >查看Demo：<a style="color: rgb(0, 102, 153); " rel="nofollow" href="http://webdeveloperjuice.com/demos/css/css3effects.html"  >http://webdeveloperjuice.com/demos/css/css3effects.html</a></p></div><wbr></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/90059060201241112525932</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/90059060201241112525932</guid>
    <pubDate>Tue, 1 May 2012 23:25:25 +0800</pubDate>
    <dcterms:modified>2012-05-01T23:25:25+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[2012年05月01日]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/90059060201241112157515</link>
    <description><![CDATA[<div><pre class="prettyprint"  ><p><a id="cb_post_title_url" style="line-height: 44px; font-family: &#24494;&#36719;&#38597;&#40657;, 'Microsoft YaHei', verdana, 'ms song', &#23435;&#20307;, Arial, Helvetica, sans-serif; font-size: 28px; text-align: -webkit-auto; white-space: normal; padding: 0px; margin: 0px; text-decoration: none; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  >webkit+css3</a></p></pre><div style="padding: 0px; margin: 0px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all; text-align: -webkit-auto;"  ><div id="cnblogs_post_body"  style="padding: 0px; margin: 0px; line-height: 25px; word-break: break-all;"  ><p style="margin: 5px auto; clear: both;"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  ><span style="background-color: rgb(255, 255, 255);"  >1、表单应用</span></strong></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif; line-height: 25px;"  >　　WebKit同样提供一些可用于你的页面全新的控制。下面的例子演示一个水平滑动条、一些新样式的按钮以及一个很像Safari工具栏的搜索框，</span>代码如下：</span></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >input </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >type</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="range"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="-webkit-appearance:slider-horizontal;"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >br</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >br</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >button </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="-webkit-appearance:button;width:200px;height:30px;"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>gradient button<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >button</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >button </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="-webkit-appearance:push-button;width:200px;"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>aqua button<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >button</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >input </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >type</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="-webkit-appearance:searchfield;"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > value</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="kitten"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >input</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span></span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >预览效果：</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://pic002.cnblogs.com/images/2011/219392/2011011316545815.jpg"  alt=""  style="padding: 0px; margin: 0px;"  ></span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >&nbsp;</span></p><p style="margin: 5px auto; clear: both;"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  ><span style="background-color: rgb(255, 255, 255);"  >二、圆角</span></strong></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif; line-height: 25px; background-color: rgb(255, 255, 255);"  >　　圆角可能会给页面的实现带来一些难度，比如，它可能需要为每个角使用一张图片，但是这可能会引起某些表现上的问题（比如不同的浏览器可能表现上会有细微的差别）。在WebKit中被支持的CSS3的”border-radius”属性让实现圆角变得非常简单，它只需要几行简单的CSS代码。如下所示：</span></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  >#boxes div { border: 2px solid black; padding: 10px; margin:5px; width:200px;<br style="padding: 0px; margin: 0px;"  >text-align:center; background:#eee; }<br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >id</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="boxes"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="-webkit-border-radius:15px;"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >        All sides<br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="-webkit-border-bottom-left-radius:15px;-webkit-border-top-right-radius:15px;"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >        Opposite corners<br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="-webkit-border-top-left-radius:15px;-webkit-border-top-right-radius:15px;"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >        Top<br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="-webkit-border-top-right-radius:15px;-webkit-border-bottom-right-radius:15px;"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >        Side<br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span></span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif; line-height: 25px; background-color: rgb(255, 255, 255);"  >　　这段样式代码定义所有的在boxes里面的DIV都要有一个比较大的border（边框）、边距、宽度、背景等。然后每个div标签的border-radius被设置为不同的方式。你可以在下面看到运行结果：</span></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif; line-height: 25px; background-color: rgb(255, 255, 255);"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://pic002.cnblogs.com/images/2011/219392/2011011317165480.jpg"  alt=""  style="padding: 0px; margin: 0px;"  ><br style="padding: 0px; margin: 0px;"  ></span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >&nbsp;</span></p><p style="margin: 5px auto; clear: both;"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  ><span style="background-color: rgb(255, 255, 255);"  >三、简单的阴影</span></strong></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;!</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >xmlns</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="http://www.w3.org/1999/xhtml"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >meta </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >http-equiv</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="Content-Type"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > content</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text/html; charset=utf-8"</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>无标题文档<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >　　&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="height:100px; width:200px; background-color:#414247;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >-webkit-transform:rotate(5deg);-webkit-box-shadow:3px 3px 3px #888;" </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span></span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >预览效果：</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://pic002.cnblogs.com/images/2012/219392/2012032812144793.jpg"  alt=""  style="padding: 0px; margin: 0px;"  ></span></p><p style="margin: 5px auto; clear: both;"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  ><span style="background-color: rgb(255, 255, 255);"  >四、翻转与弹出</span></strong></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;!</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >xmlns</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="http://www.w3.org/1999/xhtml"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >meta </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >http-equiv</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="Content-Type"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > content</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text/html; charset=utf-8"</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>无标题文档<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    img </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > -webkit-transform</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > scale(0.5)</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    img:hover </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > -webkit-transform</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > scale(1)</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > -webkit-transform</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >rotate(5deg)</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >-webkit-box-shadow</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >10px 10px 50px #888</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >img </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >src</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="http://images.cnblogs.com/cnblogs_com/aspirant1314/279062/r_94dd4.png"</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span></span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >拷贝代码运行可观看效果</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >&nbsp;</span></p><p style="margin: 5px auto; clear: both;"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  ><span style="background-color: rgb(255, 255, 255);"  >五、纯CSS的渐变效果</span></strong></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;!</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >xmlns</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="http://www.w3.org/1999/xhtml"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >meta </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >http-equiv</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="Content-Type"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > content</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text/html; charset=utf-8"</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>无标题文档<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >type</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text/css"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    div.swapper img </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > -webkit-transition</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > opacity 1s ease-in-out</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    img.img1, div.swapper:hover img.img2 </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > opacity</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 1.0</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    div.swapper:hover img.img1, img.img2 </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > opacity</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 0</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >class</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="swapper"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >img </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >class</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="img1"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="position: absolute;"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > src</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="http://images.cnblogs.com/cnblogs_com/aspirant1314/279062/r_94dd4.png"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >img </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >src</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="http://images.cnblogs.com/cnblogs_com/aspirant1314/279062/t_944.png"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > width</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="574"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > class</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="img2"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;<br style="padding: 0px; margin: 0px;"  >&lt;/body&gt;<br style="padding: 0px; margin: 0px;"  >&lt;/html&gt;&nbsp;</span></span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  >拷贝代码运行可观看效果</span></span></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  >使用说明：</span></span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >transition:当一个元素的状态改变时，将一个元素的表现样式动态的进行过渡转换。<br style="padding: 0px; margin: 0px;"  >当一个元素的状态改变时，将一个元素的表现样式动态的进行过渡转换。个人认为是一个里程碑了。在未来，js就不必再去设定网页的表现，而专注于网页的行为了。<br style="padding: 0px; margin: 0px;"  >使用时，仍需带前缀：-webkit-transition,-moz-transition,-o-transition.目前，webkit内核浏览器支持的最全面，请使用webkit内核最新版浏览器浏览该文章以保证CSS3效果能够完全呈现<br style="padding: 0px; margin: 0px;"  >transition:transition-property transition-duration transition-timing-function transition-delay<br style="padding: 0px; margin: 0px;"  >transition-property:要实现动态转换的css属性名。可以设定为all,则动态转换所有改变的属性值，包括transform<br style="padding: 0px; margin: 0px;"  >transition-duration:设定转换的时间，单位s(秒)<br style="padding: 0px; margin: 0px;"  >transition-timing-function:过渡时的效果，可以想象下幻灯片切换时的效果。常用值：ease | linear | ease-in | ease-out | ease-in-out<br style="padding: 0px; margin: 0px;"  >transition-delay:动态转换产生的延迟时间。不常用</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >&nbsp;</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >附可以转换的CSS属性列表：</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >CSS属性 改变的对象<br style="padding: 0px; margin: 0px;"  >background-color 色彩<br style="padding: 0px; margin: 0px;"  >background-image 只是渐变<br style="padding: 0px; margin: 0px;"  >background-position 百分比，长度<br style="padding: 0px; margin: 0px;"  >border-bottom-color 色彩<br style="padding: 0px; margin: 0px;"  >border-bottom-width 长度<br style="padding: 0px; margin: 0px;"  >border-color 色彩<br style="padding: 0px; margin: 0px;"  >border-left-color 色彩<br style="padding: 0px; margin: 0px;"  >border-left-width 长度<br style="padding: 0px; margin: 0px;"  >border-right-color 色彩<br style="padding: 0px; margin: 0px;"  >border-right-width 长度<br style="padding: 0px; margin: 0px;"  >border-spacing 长度<br style="padding: 0px; margin: 0px;"  >border-top-color 色彩<br style="padding: 0px; margin: 0px;"  >border-top-width 长度<br style="padding: 0px; margin: 0px;"  >border-width 长度<br style="padding: 0px; margin: 0px;"  >bottom 百分比，长度<br style="padding: 0px; margin: 0px;"  >color 色彩<br style="padding: 0px; margin: 0px;"  >crop 百分比<br style="padding: 0px; margin: 0px;"  >font-size 百分比，长度<br style="padding: 0px; margin: 0px;"  >font-weight 数字<br style="padding: 0px; margin: 0px;"  >grid-* 数量<br style="padding: 0px; margin: 0px;"  >height 百分比，长度<br style="padding: 0px; margin: 0px;"  >left 百分比，长度<br style="padding: 0px; margin: 0px;"  >letter-spacing 长度<br style="padding: 0px; margin: 0px;"  >line-height 百分比，长度，数字<br style="padding: 0px; margin: 0px;"  >margin-bottom 长度<br style="padding: 0px; margin: 0px;"  >margin-left 长度<br style="padding: 0px; margin: 0px;"  >margin-right 长度<br style="padding: 0px; margin: 0px;"  >margin-top 长度<br style="padding: 0px; margin: 0px;"  >max-height 百分比，长度<br style="padding: 0px; margin: 0px;"  >max-width 百分比，长度<br style="padding: 0px; margin: 0px;"  >min-height 百分比，长度<br style="padding: 0px; margin: 0px;"  >min-width 百分比，长度<br style="padding: 0px; margin: 0px;"  >opacity 数字<br style="padding: 0px; margin: 0px;"  >outline-color 色彩<br style="padding: 0px; margin: 0px;"  >outline-offset 整数<br style="padding: 0px; margin: 0px;"  >outline-width 长度<br style="padding: 0px; margin: 0px;"  >padding-bottom 长度<br style="padding: 0px; margin: 0px;"  >padding-left 长度<br style="padding: 0px; margin: 0px;"  >padding-right 长度<br style="padding: 0px; margin: 0px;"  >padding-top 长度<br style="padding: 0px; margin: 0px;"  >right 百分比，长度<br style="padding: 0px; margin: 0px;"  >text-indent 百分比，长度<br style="padding: 0px; margin: 0px;"  >text-shadow 阴影<br style="padding: 0px; margin: 0px;"  >top 百分比，长度<br style="padding: 0px; margin: 0px;"  >vertical-align 百分比，长度，关键词<br style="padding: 0px; margin: 0px;"  >visibility 可见性<br style="padding: 0px; margin: 0px;"  >width 百分比，长度<br style="padding: 0px; margin: 0px;"  >word-spacing 百分比，长度<br style="padding: 0px; margin: 0px;"  >z-index 正整数<br style="padding: 0px; margin: 0px;"  >zoom 数字</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >&nbsp;</span></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  >六、CSS 多卷布局</strong></span></span></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;!</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >xmlns</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="http://www.w3.org/1999/xhtml"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >meta </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >http-equiv</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="Content-Type"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > content</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text/html; charset=utf-8"</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>无标题文档<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >type</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text/css"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >#columns </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >text-align</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > justify</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -moz-column-count</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 3</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -moz-column-gap</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 1.5em</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -moz-column-rule</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 1px solid #dedede</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -webkit-column-count</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 3</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -webkit-column-gap</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 1.5em</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -webkit-column-rule</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 1px solid #dedede</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >使用纯CSS，而不用HTML的table来实现多卷是件相当棘手的事情。但是，由于CSS3用于多卷布局的属性在WebKit中已经被支持，你可以通过明确的定义卷数，正确实现你所想要的效果。先看一下下面的CSS和HTML代码：<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >br </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >br </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >id</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="columns"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>Column A<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>Column B<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>ColumnC<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>Column 1<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>Column 2<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>Column3<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>Column 1<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>Column 2<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>Column3<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span></span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  >预览效果：</span></span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://pic002.cnblogs.com/images/2012/219392/2012032812174051.jpg"  alt=""  style="padding: 0px; margin: 0px;"  ></span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >&nbsp;</span></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  >七、一个简单的Pop-Out</strong></span></span></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;!</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >xmlns</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="http://www.w3.org/1999/xhtml"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >meta </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >http-equiv</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="Content-Type"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > content</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text/html; charset=utf-8"</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>无标题文档<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >type</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text/css"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >#box1 </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    z-index</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 100</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    position</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >absolute</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    top</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >5px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > left</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >5px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    width</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >100px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    height</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >250px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    padding</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >5px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -webkit-border-radius</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >10px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    border</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 2px solid black</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    background</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > #dddddd</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    z-index</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 200</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >#slider </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    z-index</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 100</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    position</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >absolute</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    top</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >30px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > left</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >5px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    height</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >200px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    width</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >90px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    padding-top</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >10px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    padding-left</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >15px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -webkit-border-radius</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >10px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    border</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 1px solid black</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    background</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > #eeeeee</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -webkit-transition</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > -webkit-transform 0.5s ease-in</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >script</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >function</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > popout() {<br style="padding: 0px; margin: 0px;"  >    document.getElementById(</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >'</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >slider</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >'</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >).style.webkitTransform </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >=</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >'</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >translate(105px,0)</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >'</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;<br style="padding: 0px; margin: 0px;"  >}<br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >script</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >id</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="slider"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>Slider<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >br</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span>Content<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >id</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="box1"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >a </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >href</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="javascript:popout();"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>Popout<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >a</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span></span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >&nbsp;预览效果：</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://pic002.cnblogs.com/images/2012/219392/2012032812190832.jpg"  alt=""  style="padding: 0px; margin: 0px;"  ></span></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  ><br style="padding: 0px; margin: 0px;"  ></strong></span></span></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  >八、CSS3线性渐变</strong></span></span></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;!</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >xmlns</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="http://www.w3.org/1999/xhtml"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >meta </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >http-equiv</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="Content-Type"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > content</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text/html; charset=utf-8"</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>无标题文档<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >type</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text/css"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/*</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > -webkit-gradient(&lt;type&gt;, &lt;point&gt; [, &lt;radius&gt;]?, &lt;point&gt; [, &lt;radius&gt;]? [, &lt;stop&gt;]*)实际用法... </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >*/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >.back</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >background</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > -webkit-gradient(linear, 0 0, 0 100%, from(red), to(blue))</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > width</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >300px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > height</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >200px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >.back1</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    background</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > white</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/*</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 为较旧的或者不支持的浏览器设置备用属性 </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >*/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    background</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > -moz-linear-gradient(top, #dedede, white 8%)</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    background</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > -webkit-gradient(linear, 0 0, 0 20%, from(#dedede), to(white))</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    border</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 1px solid #dedede</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    width</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >300px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    height</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >200px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >.back2</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    background</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > white</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/*</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 备用属性 </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >*/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    background</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > -moz-linear-gradient(top, #dedede, white 8%, red 20%)</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    background</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > -webkit-gradient(linear, 0 0, 0 100%, from(#ff6e02), color-stop(30%, #ffff00), color-stop(60%, #ce5100),color-stop(100%, #fff))</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -webkit-border-top-left-radius</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >8px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -webkit-border-top-right-radius</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >18px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    border</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >1px solid #ff6e02</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    width</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >300px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    height</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >200px<br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >.bord</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >    <br style="padding: 0px; margin: 0px;"  >    width</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >107px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    height</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >33px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -webkit-border-top-left-radius</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >5px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -webkit-border-top-right-radius</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >5px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    border</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >1px inset #8f2e09</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    border-bottom</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >none</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >.back3</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    background</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > white</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/*</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 备用属性 </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >*/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    background</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > -webkit-gradient(linear, 0 0, 0 100%, from(#35353b), color-stop(65%, #45454a), color-stop(100%, #050505))</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -webkit-border-top-left-radius</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >5px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    -webkit-border-top-right-radius</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >5px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    border</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >1px inset #d87d39</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    width</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >105px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    height</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >32px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    border-bottom</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >none</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    color</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >#f09341</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    line-height</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >32px</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    text-align</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >center</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span></span></pre><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span>双色渐变<br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >class</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="back"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >br </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span></span></pre><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span>双色控制高度渐变<br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >class</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="back1"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >br </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span><br style="padding: 0px; margin: 0px;"  ><br style="padding: 0px; margin: 0px;"  >圆角多色渐变<br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >class</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="back2"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >br </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span></span></pre><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    ff下面渐变设置语法，参考自: http://hacks.mozilla.org/2009/11/css-gradients-firefox-36/ */ -moz-linear-gradient( [<br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >point</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span> || <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >angle</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>,]? <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >stop</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>, <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >stop</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span> [, <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >stop</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>]* ) <br style="padding: 0px; margin: 0px;"  >/* 实际用法*/<br style="padding: 0px; margin: 0px;"  >background: -moz-linear-gradient(top, red, blue);<br style="padding: 0px; margin: 0px;"  >background: white; /* 为较旧的或者不支持的浏览器设置备用属性 */<br style="padding: 0px; margin: 0px;"  >background: -moz-linear-gradient(top, #dedede, white 8%);<br style="padding: 0px; margin: 0px;"  >background: -webkit-gradient(linear, 0 0, 0 8%, from(#dedede), to(white));<br style="padding: 0px; margin: 0px;"  >border-top: 1px solid white;<br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >div</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span></span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  >预览效果：</span></span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://pic002.cnblogs.com/images/2012/219392/2012032812202924.jpg"  alt=""  style="padding: 0px; margin: 0px;"  ></span></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  ></span></span></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  >九、再谈清楚浮动</strong></span></span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >这个是一个很流行的清除浮动的方法，在很多大项目上已经被完全采用。<br style="padding: 0px; margin: 0px;"  >这个方法来源于positioniseverything ，通过after伪类:after和IEhack来实现，完全兼容当前主流浏览器。</span></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  >.clearfix:after {<br style="padding: 0px; margin: 0px;"  >content: ".";<br style="padding: 0px; margin: 0px;"  >display: block;<br style="padding: 0px; margin: 0px;"  >height: 0;<br style="padding: 0px; margin: 0px;"  >clear: both;<br style="padding: 0px; margin: 0px;"  >visibility: hidden;<br style="padding: 0px; margin: 0px;"  >}<br style="padding: 0px; margin: 0px;"  >.clearfix {display: inline-block;}  /* for IE/Mac */</span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; background-color: rgb(255, 255, 255);"  >刚刚看到一篇日志说这个问题，受到了点启发：</span></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  >.clearfix:after {<br style="padding: 0px; margin: 0px;"  >    content: "020";<br style="padding: 0px; margin: 0px;"  >    display: block;<br style="padding: 0px; margin: 0px;"  >    height: 0;<br style="padding: 0px; margin: 0px;"  >    clear: both;<br style="padding: 0px; margin: 0px;"  >}<br style="padding: 0px; margin: 0px;"  >.clearfix {<br style="padding: 0px; margin: 0px;"  >    zoom: 1;<br style="padding: 0px; margin: 0px;"  >}</span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >这个是优化版的清除浮动的样式，很值得推荐。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >另外，我见到了一个无敌的清除浮动的样式，这个是通过独立的代码来清除的。</span></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  >html body div.clear,<br style="padding: 0px; margin: 0px;"  >html body span.clear<br style="padding: 0px; margin: 0px;"  >{<br style="padding: 0px; margin: 0px;"  >     background: none;<br style="padding: 0px; margin: 0px;"  >     border: 0;<br style="padding: 0px; margin: 0px;"  >     clear: both;<br style="padding: 0px; margin: 0px;"  >     display: block;<br style="padding: 0px; margin: 0px;"  >     float: none;<br style="padding: 0px; margin: 0px;"  >     font-size: 0;<br style="padding: 0px; margin: 0px;"  >     margin: 0;<br style="padding: 0px; margin: 0px;"  >     padding: 0;<br style="padding: 0px; margin: 0px;"  >     overflow: hidden;<br style="padding: 0px; margin: 0px;"  >     visibility: hidden;<br style="padding: 0px; margin: 0px;"  >     width: 0;<br style="padding: 0px; margin: 0px;"  >     height: 0;<br style="padding: 0px; margin: 0px;"  >}</span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >这个样式可以通过在页面中添加&lt;div class=”clear”&gt;&lt;/div&gt; 或 &lt;span class=”clear”&gt; &lt;/span&gt;来清除页面中的浮动。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >这个页面正是著名的<a style="padding: 0px; margin: 0px; text-decoration: none; " target="_blank" rel="nofollow" href="http://960.gs/"  >960 CSS 框架</a>的作者的博客。而他却在960 CSS框架中</span><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  ><span style="background-color: rgb(255, 255, 255);"  >同时使用</span></strong><span style="background-color: rgb(255, 255, 255);"  >了这两种方法。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >&nbsp;</span></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  >十、960网格技术</strong></span></span></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  >http://960.gs/</span></pre></div><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  ><br style="padding: 0px; margin: 0px;"  ></strong></span></span></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  >十一、文字阴影</strong></span></span></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >meta </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >http-equiv</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="Content-Type"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > content</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text/html; charset=utf-8"</span> <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >/&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>无标题文档<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >title</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >type</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >="text/css"</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    h1,h2,h3,h4,h5,h6</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >{</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    text-shadow</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  > 1px 1px 3px rgba(20, 20, 20, 0.5)</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    font-family</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >"微软雅黑",Arial,verdana</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    font-weight</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >:</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >normal</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  >    </span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >}</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  ><br style="padding: 0px; margin: 0px;"  ></span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >style</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >head</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >h1</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>文字阴影<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >h1</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >h2</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>文字阴影<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >h2</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >h3</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>文字阴影<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >h3</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >h4</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>文字阴影<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >h4</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >h5</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>文字阴影<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >h5</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  >    <span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >h6</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span>文字阴影<span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >h6</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >body</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span><br style="padding: 0px; margin: 0px;"  ><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&lt;/</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >html</span><span style="padding: 0px; margin: 0px; line-height: 1.5;"  >&gt;</span></span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  >预览效果：</span></span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://pic002.cnblogs.com/images/2012/219392/2012032812271614.jpg"  alt=""  style="padding: 0px; margin: 0px;"  ></span></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  ></span></span></p><p style="margin: 5px auto; clear: both;"  ><span style="padding: 0px; margin: 0px; font-family: 微软雅黑, helvetica, Arial, sans-serif;"  ><span style="padding: 0px; margin: 0px; line-height: 25px; background-color: rgb(255, 255, 255);"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  >十二、滚动条</strong></span></span></p><p style="margin: 5px auto; clear: both;"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  ><span style="background-color: rgb(255, 255, 255);"  >IE下的滚动条样式</span></strong><span style="background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  >IE是最早提供滚动条的样式支持，嗯，好多年了，但是其它浏览器一直没有支持，IE独孤求败了。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >这些样式规则很简单：</span></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  >scrollbar-arrow-color: color; /*三角箭头的颜色*/<br style="padding: 0px; margin: 0px;"  >scrollbar-face-color: color; /*立体滚动条的颜色（包括箭头部分的背景色）*/<br style="padding: 0px; margin: 0px;"  >scrollbar-3dlight-color: color; /*立体滚动条亮边的颜色*/<br style="padding: 0px; margin: 0px;"  >scrollbar-highlight-color: color; /*滚动条的高亮颜色（左阴影？）*/<br style="padding: 0px; margin: 0px;"  >scrollbar-shadow-color: color; /*立体滚动条阴影的颜色*/<br style="padding: 0px; margin: 0px;"  >scrollbar-darkshadow-color: color; /*立体滚动条外阴影的颜色*/<br style="padding: 0px; margin: 0px;"  >scrollbar-track-color: color; /*立体滚动条背景颜色*/<br style="padding: 0px; margin: 0px;"  >scrollbar-base-color:color; /*滚动条的基色*/</span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >大概就这些，你也可以定义cursor来定义滚动条的鼠标手势。<br style="padding: 0px; margin: 0px;"  ><br style="padding: 0px; margin: 0px;"  ></span></p><p style="margin: 5px auto; clear: both;"  ><strong style="padding: 20px 0px 0px; margin: 0px; font-size: 18px !important; text-shadow: rgba(255, 255, 255, 0.199219) 1px 1px 3px; display: block;"  ><span style="background-color: rgb(255, 255, 255);"  >webkit的自定义滚动条样式</span></strong><span style="background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  >yes，这里才是今天要重点介绍的。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >从上一部分的样式名中就可以看到，IE只能定义相关部分的color等属性，这样太不灵活了。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >不过，webkit不再是用简单的几个CSS属性，而是一坨的CSS伪元素：</span></p><div style="padding: 5px; margin: 0px; font-size: 16px !important; font-family: 'Courier New'; line-height: 28px; word-break: break-all; border: 1px solid rgb(16, 16, 15) !important; overflow: auto; -webkit-box-shadow: rgb(185, 185, 179) 0px 0px 0px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; background-image: -webkit-gradient(linear, 0 0, 0 100%, from(rgb(50, 50, 48)), to(rgb(19, 19, 18)));"  ><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div><pre style="padding: 0px; margin-top: 0px; margin-bottom: 0px; white-space: pre-wrap; word-wrap: break-word; font-family: 'Courier New';"  ><span style="background-color: rgb(255, 255, 255);"  >::-webkit-scrollbar /*滚动条整体部分*/<br style="padding: 0px; margin: 0px;"  >::-webkit-scrollbar-button /*滚动条两端的按钮*/<br style="padding: 0px; margin: 0px;"  >::-webkit-scrollbar-track /*外层轨道*/<br style="padding: 0px; margin: 0px;"  >::-webkit-scrollbar-track-piece /*内层轨道，滚动条中间部分（除去）*/<br style="padding: 0px; margin: 0px;"  >::-webkit-scrollbar-thumb /*（拖动条？滑块？滚动条里面可以拖动的那个，肿么翻译好呢？）*/<br style="padding: 0px; margin: 0px;"  >::-webkit-scrollbar-corner /*边角*/<br style="padding: 0px; margin: 0px;"  >::-webkit-resizer/* 定义右下角拖动块的样式*/</span></pre><div style="padding: 0px; margin: 0px; font-size: 14px; font-family: 微软雅黑, 'Microsoft YaHei', verdana, 'ms song', 宋体, Arial, Helvetica, sans-serif; line-height: 25px; word-break: break-all;"  ><span style="padding: 0px 5px 0px 0px; margin: 0px; font-family: 'Courier New'; font-size: 12px; line-height: 1.5; background-color: rgb(255, 255, 255);"  ><a title="&#22797;&#21046;&#20195;&#30721;" style="padding: 0px; margin: 0px; text-decoration: none; border: none !important; " rel="nofollow" href="http://www.cnblogs.com/aspirant1314/archive/2011/01/13/1934729.html"  ><img title="2012年05月01日 - enotsl - enotsl的博客"  src="http://common.cnblogs.com/images/copycode.gif"  alt="复制代码"  style="padding: 0px; margin: 0px; border: none !important;"  ></a></span></div></div><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >通过这些伪元素，可以完全的重写一个网站的滚动条样式。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >当然webkit提供的不止这些，还有很多伪类，可以更丰富滚动条样式：</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >:horizontal – horizontal伪类应用于水平方向的滚动条</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >&nbsp;</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >:vertical – vertical伪类应用于竖直方向的滚动条</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  >:decrement – decrement伪类应用于按钮和内层轨道(track piece)。它用来指示按钮或者内层轨道是否会减小视窗的位置(比如，垂直滚动条的上面，水平滚动条的左边。)</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  >:increment – increment伪类和decrement类似，用来指示按钮或内层轨道是否会增大视窗的位置(比如，垂直滚动条的下面和水平滚动条的右边。)</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  >:start – start伪类也应用于按钮和滑块。它用来定义对象是否放到滑块的前面。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  >:end – 类似于start伪类，标识对象是否放到滑块的后面。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  >:double-button – 该伪类以用于按钮和内层轨道。用于判断一个按钮是不是放在滚动条同一端的一对按钮中的一个。对于内层轨道来说，它表示内层轨道是否紧靠一对按钮。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  >:single-button – 类似于double-button伪类。对按钮来说，它用于判断一个按钮是否自己独立的在滚动条的一段。对内层轨道来说，它表示内层轨道是否紧靠一个single-button。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  >:no-button – 用于内层轨道，表示内层轨道是否要滚动到滚动条的终端，比如，滚动条两端没有按钮的时候。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  >:corner-present – 用于所有滚动条轨道，指示滚动条圆角是否显示。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  >:window-inactive – 用于所有的滚动条轨道，指示应用滚动条的某个页面容器(元素)是否当前被激活。(在webkit最近的版本中，该伪类也可以用于::selection伪元素。webkit团队有计划扩展它并推动成为一个标准的伪类)</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  ><br style="padding: 0px; margin: 0px;"  >另外，:enabled、:disabled、:hover 和 :active 等伪类同样可以用于滚动条中。</span></p><p style="margin: 5px auto; clear: both;"  ><span style="background-color: rgb(255, 255, 255);"  >值得一提的是，webkit的这个伪类和伪元素的实现很强大，虽然类目有些多，但是我们可以把滚动条当成一个页面元素来定义，也差不多可以用上一些高级的CSS3属性，比如渐变、圆角、RGBa等等，当然有些地方也可以用图片，然后图片也可以转换成Base64，总之，可以尽情发挥了。</span></p></div></div><span style="background-color: rgb(255, 255, 255);"  ><wbr></span></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/90059060201241112157515</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/90059060201241112157515</guid>
    <pubDate>Tue, 1 May 2012 23:21:57 +0800</pubDate>
    <dcterms:modified>2012-05-01T23:21:57+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[使用正则表达式解析SQL语句]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/900590602011111621146378</link>
    <description><![CDATA[<div>   <p>本文详细代码请见：<br> <a rel="nofollow" href="http://www.blogjava.net/sitinspring/archive/2008/03/14/186372.html"  >http://www.blogjava.net/sitinspring/archive/2008/03/14/186372.html</a> </p> <p><strong></strong>&nbsp;</p> <p><strong>问题:将左边的SQL语句解析成右边的形式</strong></p> <p>Select c1,c2,c3 From t1,t2,t3 Where condi1=5 and condi6=6 or condi7=7 Group&nbsp; by g1,g2,g3 order&nbsp; by g2,g3</p> <p>select<br> &nbsp;&nbsp;&nbsp;&nbsp; c1,<br> &nbsp;&nbsp;&nbsp; c2,<br> &nbsp;&nbsp;&nbsp; c3 <br> from<br> &nbsp;&nbsp;&nbsp;&nbsp; t1,<br> &nbsp;&nbsp;&nbsp; t2,<br> &nbsp;&nbsp;&nbsp; t3 <br> where<br> &nbsp;&nbsp;&nbsp;&nbsp; condi1=5 and<br> &nbsp;&nbsp;&nbsp;&nbsp; condi6=6 or<br> &nbsp;&nbsp;&nbsp;&nbsp; condi7=7 <br> group by<br> &nbsp;&nbsp;&nbsp;&nbsp; g1,<br> &nbsp;&nbsp;&nbsp; g2,<br> &nbsp;&nbsp;&nbsp; g3 <br> order by<br> &nbsp;&nbsp;&nbsp;&nbsp; g2,<br> &nbsp;&nbsp;&nbsp; g3</p> <p><strong>按关键字找出SQL语句中各部分</strong></p> <p>我们阅读SQL语句会把整句分来成列,表,条件,分组字段,排序字段来理解,解析SQL的目的也是这样.<br> 分解SQL语句有规律可循,以列为例,它必定包含在select和from之间,我们只要能找到SQL语句中的关键字select和from,就能找到查询的列.<br> 怎么找到select和from之间的文字呢?其实一个正则表达式就能解决:(select)(.+)(from),其中第二组(.+)代表的文字就是select和from之间的文字.<br> 程序见右边.</p> <p>/**<br> &nbsp;* 从文本text中找到regex首次匹配的字符串，不区分大小写<br> &nbsp;* @param regex： 正则表达式<br> &nbsp;* @param text：欲查找的字符串<br> &nbsp;* @return regex首次匹配的字符串，如未匹配返回空<br> &nbsp;*/<br> private static String getMatchedString(String regex,String text){<br> &nbsp; Pattern pattern=Pattern.compile(regex,Pattern.CASE_INSENSITIVE);<br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; Matcher matcher=pattern.matcher(text);</p> <p>&nbsp;&nbsp;&nbsp; while(matcher.find()){<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return matcher.group(2);<br> &nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; return null;<br> }</p> <p><strong>解析函数分析</strong></p> <p>private static String getMatchedString(String regex,String text){<br> &nbsp; Pattern pattern=Pattern.compile(regex,Pattern.CASE_INSENSITIVE);<br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; Matcher matcher=pattern.matcher(text);</p> <p>&nbsp;&nbsp;&nbsp; while(matcher.find()){<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return matcher.group(2);<br> &nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; return null;<br> }</p> <p>左边的这个函数,第一个参数是拟定的正则表达式,第二个是整个SQL语句.<br> 当正则表达式为(select)(.+)(from)时,程序将在SQL中查找第一次匹配的地方(有Pattern.CASE_INSENSITIVE的设置,查找不区分大小写),如果找到了则返回模式中的第二组代表的文字.<br> 如果sql是select a,b from tc,则返回的文字是a,b.</p> <p><strong>选择的表对应的查找正则表达式</strong></p> <p>选择的表比较特殊,它不想选择的列一样固定处于select和from之间,当没有查找条件存在时,它处于from和结束之间;当有查找条件存在时,它处于from和where之间.<br> 因此查询函数写为右边的形式:</p> <p>/**<br> &nbsp;* 解析选择的表<br> &nbsp;*<br> &nbsp;*/<br> private void parseTables(){<br> &nbsp;&nbsp;&nbsp; String regex="";&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; if(isContains(sql,"\\s+where\\s+")){<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; regex="(from)(.+)(where)";&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; else{<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; regex="(from)(.+)($)";&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; tables=getMatchedString(regex,sql);<br> }</p> <p><br> <strong>isContains函数</strong></p> <p>isContains函数用于在lineText中查找word,其中不区分大小些,只要找到了即返回真.</p> <p>/**<br> &nbsp;* 看word是否在lineText中存在，支持正则表达式<br> &nbsp;* @param lineText<br> &nbsp;* @param word<br> &nbsp;* @return<br> &nbsp;*/<br> private static boolean isContains(String lineText,String word){<br> &nbsp; Pattern pattern=Pattern.compile(word,Pattern.CASE_INSENSITIVE);<br> &nbsp; Matcher matcher=pattern.matcher(lineText);<br> &nbsp; return matcher.find();<br> }</p> <p><strong>解析查找条件的函数</strong></p> <p>private void parseConditions(){<br> &nbsp;&nbsp;&nbsp; String regex="";&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; if(isContains(sql,"\\s+where\\s+")){<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 包括Where，有条件<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(isContains(sql,"group\\s+by")){<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 条件在where和group by之间<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; regex="(where)(.+)(group\\s+by)";&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if(isContains(sql,"order\\s+by")){<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 条件在where和order by之间<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; regex="(where)(.+)(order\\s+by)";&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else{<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 条件在where到字符串末尾<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; regex="(where)(.+)($)";&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; else{<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 不包括where则条件无从谈起，返回即可<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br> &nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; conditions=getMatchedString(regex,sql);<br> }</p> <p><strong>解析GroupBy的字段</strong></p> <p>private void parseGroupCols(){<br> &nbsp;&nbsp;&nbsp; String regex="";&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; if(isContains(sql,"group\\s+by")){<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 包括GroupBy，有分组字段</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(isContains(sql,"order\\s+by")){<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // group by 后有order by<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; regex="(group\\s+by)(.+)(order\\s+by)";&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else{<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // group by 后无order by<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; regex="(group\\s+by)(.+)($)";&nbsp; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; else{<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 不包括GroupBy则分组字段无从谈起，返回即可<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br> &nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; groupCols=getMatchedString(regex,sql);<br> }</p> <p><br> <strong>解析OrderBy的字段</strong></p> <p>private void parseOrderCols(){<br> &nbsp;&nbsp;&nbsp; String regex="";&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; if(isContains(sql,"order\\s+by")){<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 包括order by，有分组字段<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; regex="(order\\s+by)(.+)($)";&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp; else{<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // 不包括GroupBy则分组字段无从谈起，返回即可<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<br> &nbsp;&nbsp;&nbsp; }<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; orderCols=getMatchedString(regex,sql);<br> }</p> <p><strong>得到解析后的各部分</strong></p> <p>按以上解析方法获得了列,表,条件,分组条件,排序条件各部分之后,它们会存储到各个成员变量中.<br> 注意这些成员变量的原值都是null,如果在SQL语句中能够找到对应的部分的话它们将借助getMatchedString获得值,否则还是null.我们通过判断这些成员变量是否为空就能知道它对应的部分是否被解析出来.</p> <p>&nbsp;/**<br> &nbsp;&nbsp; * 待解析的SQL语句<br> &nbsp;&nbsp; */<br> &nbsp; private String sql;<br> &nbsp; <br> &nbsp; /**<br> &nbsp;&nbsp; * SQL中选择的列<br> &nbsp;&nbsp; */<br> &nbsp; private String cols;<br> &nbsp; <br> &nbsp; /**<br> &nbsp;&nbsp; * SQL中查找的表<br> &nbsp;&nbsp; */<br> &nbsp; private String tables;<br> &nbsp; <br> &nbsp; /**<br> &nbsp;&nbsp; * 查找条件<br> &nbsp;&nbsp; */<br> &nbsp; private String conditions;<br> &nbsp; <br> &nbsp; /**<br> &nbsp;&nbsp; * Group By的字段<br> &nbsp;&nbsp; */<br> &nbsp; private String groupCols;<br> &nbsp; <br> &nbsp; /**<br> &nbsp;&nbsp; * Order by的字段<br> &nbsp;&nbsp; */<br> &nbsp; private String orderCols;</p> <p><strong>取得不需要单行显示时的SQL语句</strong></p> <p>进展到这一步,SQL语句中列,表,条件,分组条件,排序条件各部分都被获取了出来,这时把它们重新组合一下就能得到整理后的SQL语句.<br> 如下面的SQL语句将变成右边的部分(先使静态成员isSingleLine=false):<br> Select c1,c2,c3 From t1,t2,t3 Where condi1=5 and condi6=6 or condi7=7 Group&nbsp; by g1,g2,g3 order&nbsp; by g2,g3</p> <p>select<br> &nbsp;&nbsp;&nbsp;&nbsp; c1,c2,c3 <br> from<br> &nbsp;&nbsp;&nbsp;&nbsp; t1,t2,t3 <br> where<br> &nbsp;&nbsp;&nbsp;&nbsp; condi1=5 and condi6=6 or condi7=7 <br> group by<br> &nbsp;&nbsp;&nbsp;&nbsp; g1,g2,g3 <br> order by<br> &nbsp;&nbsp;&nbsp;&nbsp; g2,g3</p> <p><br> <strong>进一步解析</strong></p> <p>有时我们需要把列,表,条件,分组条件,排序条件单行显示以方便查看或加上注释,这就要求我们对列,表,条件,分组条件,排序条件等进行进一步解析.<br> 初看解析很方便,以固定的分隔符劈分即可,但需要注意的是查询条件中分隔符有and和or两种,如果贸然分隔会使重新组合时使SQL失真.<br> 推荐一种做法,我们可以在分隔符后加上一个标志如空行,然后再以这个标志来劈分.这样就不会使SQL失真了.<br> 请见下页的getSplitedParagraph函数.</p> <p>getSplitedParagraph函数</p> <p>private static List&lt;String&gt; getSplitedParagraph(String paragraph,String splitStr){<br> &nbsp; List&lt;String&gt; ls=new ArrayList&lt;String&gt;();&nbsp;&nbsp;&nbsp; <br> &nbsp; <br> &nbsp; // 先在分隔符后加空格<br> &nbsp; Pattern p = Pattern.compile(splitStr,Pattern.CASE_INSENSITIVE);</p> <p>&nbsp; Matcher m = p.matcher(paragraph);<br> &nbsp; StringBuffer sb = new StringBuffer();</p> <p>&nbsp; boolean result = m.find();<br> &nbsp; while (result) {<br> &nbsp;&nbsp;&nbsp; m.appendReplacement(sb, m.group(0) + Crlf);<br> &nbsp;&nbsp;&nbsp; result = m.find();<br> &nbsp; }<br> &nbsp; m.appendTail(sb);<br> &nbsp; <br> &nbsp; // 再按空格断行<br> &nbsp; String[] arr=sb.toString().split("[\n]+");<br> &nbsp; for(String temp:arr){<br> &nbsp;&nbsp;&nbsp; ls.add(FourSpace+temp+Crlf);<br> &nbsp; }<br> &nbsp; <br> &nbsp; return ls;<br> }</p> <p><strong>处理结果</strong></p> <p>把静态成员变量isSingleLine=true后我们来看看执行结果:<br> select<br> &nbsp;&nbsp;&nbsp;&nbsp; c1,<br> &nbsp;&nbsp;&nbsp; c2,<br> &nbsp;&nbsp;&nbsp; c3 <br> from<br> &nbsp;&nbsp;&nbsp;&nbsp; t1,<br> &nbsp;&nbsp;&nbsp; t2,<br> &nbsp;&nbsp;&nbsp; t3 <br> where<br> &nbsp;&nbsp;&nbsp;&nbsp; condi1=5 and<br> &nbsp;&nbsp;&nbsp;&nbsp; condi6=6 or<br> &nbsp;&nbsp;&nbsp;&nbsp; condi7=7 <br> group by<br> &nbsp;&nbsp;&nbsp;&nbsp; g1,<br> &nbsp;&nbsp;&nbsp; g2,<br> &nbsp;&nbsp;&nbsp; g3 <br> order by<br> &nbsp;&nbsp;&nbsp;&nbsp; g2,<br> &nbsp;&nbsp;&nbsp; g3</p> <p><strong>小结</strong></p> 从这个例子中我们体会了分治的思想:分治是把一个大问题分解成小问题,然后分别解决小问题,再组合起来大问题的解决方法就差不多了.这种思想在工程领域解决问题时很普遍,我们要学会使用这种思想来看待,分析和解决问题,不要贪多求大,结果导致在大问题面前一筹莫展.<br> 其次我们可以从这个例子中学习找规律,然后借助规律的过程,现实世界千变万化,但都有规律可循,只要我们找到了规律,就等于找到了事物之门的钥匙.<br> 接下了我们复习了正则表达式用于查找的方法,以前的正则表达式学习多用于验证匹配,其实这只是正则表达式的一部分功能.<br> 最后从解析条件成单行的过程中,我们可以学习到一种解决问题的技巧,即当现实中的规律存在变数时加入人为设置的规律,这有时能使我们更好更快的解决问题.</div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/900590602011111621146378</comments>
    <slash:comments>2</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/900590602011111621146378</guid>
    <pubDate>Fri, 16 Dec 2011 02:11:46 +0800</pubDate>
    <dcterms:modified>2011-12-16T02:11:46+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[ExtJS 中使用Asp.net编写后台服务器程序的几种方式]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020111015144744</link>
    <description><![CDATA[<div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 10px; padding-right: 2px; padding-bottom: 5px; padding-left: 5px; line-height: 1.5; border-bottom-width: 0px; border-bottom-style: initial; border-bottom-color: initial; font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; font-size: 12px; background-color: rgb(245, 250, 254);"  ><div id="cnblogs_post_body"  style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >现在大多数使用Extjs的程序都使用Java来编写后台服务器程序,下面简单介绍一下如何使用Asp.net来编写后台服务器程序.</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >使用Asp.net编写Extjs的后台服务器程序大概有下面几种方式:</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >1.使用 .net Framework 3.5中的WCF来实现,因为.net 3.5 中的WCF 中新增加了一个Attributes来支持这种方式,但是具体没有使用过,有兴趣的朋友可以关注一下.</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >2.在Asp.net中定义一个.aspx页面,然后在aspx.cs中文件中添加一个方法来相应Extjs的web 请求,具体方式如下:</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.1:</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; background-color: yellow;"  >public partial class _Default : System.Web.UI.Page<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp; {<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protected void Page_Load(object sender, EventArgs e)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!IsPostBack)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ExtJsRequest();<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span></p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; background-color: yellow;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public string ExtJsRequest()<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string sRtn = string.Empty;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string sReq = Request["req"].ToString();</span></p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  ><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; background-color: yellow;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sRtn = "{'success':true,'Message':" + sReq + "}";<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return sRtn;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp; }</span></p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;这种方法使用起来比较简单,但是会在Server 端生成很多不需要的aspx页面,基本上每定义一个方法就需要在服务端定义一个页面,不利于代码的维护.</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;3:借鉴Java 中的Servlet原理,将Extjs的请求分流到Server端具体的类中去,避免了不需要的aspx页面的生成,具体的实现如下:</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.1:在Server端实现一个继承IHttpHandler接口的类,在其中实现对Extjs请求的分流.</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public class Servlet : System.Web.IHttpHandler<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp; {<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public DataSet ds;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public Servlet()<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ds = new DataSet();<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string path = HttpContext.Current.Server.MapPath<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; background-color: yellow;"  >("../Config.xml</span>");&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ds.ReadXml(path);<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public void ProcessRequest(HttpContext ctx)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string name = ctx.Request.Url.AbsolutePath;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name = name.Substring(0, name.IndexOf('.'));</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataRow[] dc = ds.Tables[0].Select("url ='" + name + "'");<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (dc.Length &gt; 0)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; background-color: rgb(255, 102, 0);"  >Type ht = Type.GetType(dc[0]["Class"].ToString());<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object obj = Activator.CreateInstance(ht);<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MethodInfo mi = ht.GetMethod(dc[0]["function"].ToString());<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; object objRtn = mi.Invoke(obj, new object[] { ctx.Request });<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ctx.Response.Write(objRtn as string);<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; catch (Exception ex)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throw ex;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; public bool IsReusable<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; get<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return true;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp; }</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;代码中标记为黄色的部分是一个自定义的配置文件格式.</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.2 :自定义配置文件</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;?xml version="1.0" encoding="utf-8" ?&gt;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ConfigNode&gt;</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Mapping url="/YouProject/User/List" Class="WebUI.Bll.User" Function="List"&gt;&lt;/Mapping&gt;</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ConfigNode&gt;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;配置文件中相关属性介绍:</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;URL:请求ExtJs的请求地址;</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Class:该请求分流到的Server端具体的类;</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Function:Server具体类中的对应Extjs请求的方法;</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;标记为红色的代码是使用反射来定位到Server端具体类的具体方法;</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.3:定义相关实体类</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WebUI.Bll.User 定义如下:</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;namespace WebUI.Bll<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public class User<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public string List(HttpRequest request)<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...具体逻辑<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;需要注意的是:</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.WebUI.Bll.User 的方法必须定义为public;</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.List 方法必须带一个HttpRequest的参数,因为要获取相应的Extjs的请求参数;</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.4:在WebConfig 进行配置</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;httpHandlers&gt;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;remove verb="*" path="*.asmx"/&gt;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; background-color: rgb(255, 255, 0);"  >&lt;add verb="*" path="/YouProject/login.aspx" type="System.Web.UI.PageHandlerFactory"/&gt; ---不拦截<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; background-color: rgb(255, 0, 255);"  >&lt;add verb="*" path="*.aspx" type="Servlet"/&gt;</span><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.5; background-color: rgb(255, 0, 255);"  >&nbsp;&nbsp; ---使用自定义的Httphander&nbsp;来进行处理<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/&gt;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/&gt;<br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/httpHandlers&gt;</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;因为Asp.net会对.aspx页面使用默认的HttpHandler来进行拦截:System.Web.UI.PageHandlerFactory,所以如果在你的程序中你有的页面不想拦截比如:login.aspx,logout.aspx,Index.aspx ,那你可以在&lt;httpHandler&gt;配置节中进行配置。</p><p style="margin-top: 5px; margin-right: auto; margin-bottom: 5px; margin-left: auto;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;通过第3种方法,在Server 端可以很好的组织代码,并且无需增加不必要的.aspx页面,可以将实体类定义到 Bussiness Layer 中,符合三层架构.</p></div></div><wbr></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020111015144744</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020111015144744</guid>
    <pubDate>Tue, 15 Nov 2011 13:04:04 +0800</pubDate>
    <dcterms:modified>2011-11-15T13:04:04+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[C# []、List、Array、ArrayList 区别及应用]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/90059060201110141217155</link>
    <description><![CDATA[<div><p style="line-height: 28px; font-size: 14px; margin-top: 14px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 2em; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  >[] 是针对<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-color: transparent; color: rgb(0, 0, 255);"  >特定类型</span>、<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-color: transparent; color: rgb(0, 0, 255);"  >固定长度</span>的。</p><p style="line-height: 28px; font-size: 14px; margin-top: 14px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 2em; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><a style="line-height: 21px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-color: transparent; color: rgb(153, 51, 51); text-decoration: underline; " target="_blank" rel="nofollow" href="http://www.cftea.com/c/2009/06/EYR713KMPJ2U1QZL.asp"  >List</a><span>&nbsp;</span>是针对<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-color: transparent; color: rgb(0, 0, 255);"  >特定类型</span>、<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-color: transparent; color: rgb(0, 0, 255);"  >任意长度</span>的。</p><p style="line-height: 28px; font-size: 14px; margin-top: 14px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 2em; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  >Array 是针对<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-color: transparent; color: rgb(0, 0, 255);"  >任意类型</span>、<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-color: transparent; color: rgb(0, 0, 255);"  >固定长度</span>的。</p><p style="line-height: 28px; font-size: 14px; margin-top: 14px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 2em; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><a style="line-height: 21px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-color: transparent; color: rgb(153, 51, 51); text-decoration: underline; " target="_blank" rel="nofollow" href="http://www.cftea.com/c/2007/07/WIS4B22S06BLB9CQ.asp"  >ArrayList</a><span>&nbsp;</span>是针对<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-color: transparent; color: rgb(0, 0, 255);"  >任意类型</span>、<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; background-color: transparent; color: rgb(0, 0, 255);"  >任意长度</span>的。</p><p style="line-height: 28px; font-size: 14px; margin-top: 14px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 2em; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  >Array 和 ArrayList 是通过存储 object 实现任意类型的，所以使用时要转换。</p><p style="line-height: 28px; font-size: 14px; margin-top: 14px; margin-right: 0px; margin-bottom: 14px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-indent: 2em; color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="line-height: 21px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-weight: bold;"  >应用示例</span></p><div style="line-height: 19px; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; border-left-width: 2px; border-left-style: solid; border-left-color: rgb(0, 153, 153); background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"  ><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >using</span><span>&nbsp;</span>System;<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >using</span><span>&nbsp;</span>System.Collections.Generic;<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >using</span><span>&nbsp;</span>System.Linq;<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >using</span><span>&nbsp;</span>System.Web;<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >using</span><span>&nbsp;</span>System.Web.UI;<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >using</span><span>&nbsp;</span>System.Web.UI.WebControls;<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >using</span><span>&nbsp;</span>System.Collections;<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >public</span><span>&nbsp;</span>partial<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >class</span><span>&nbsp;</span>_Default : System.Web.UI.Page<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >{<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >protected</span><span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >void</span><span>&nbsp;</span>Page_Load(<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >object</span><span>&nbsp;</span>sender, EventArgs e)<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;{<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// System.Int32 是结构</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >int</span>[] arr =<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 0);"  >new</span><span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >int</span>[] { 1, 2, 3 };<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Write(arr[0]);<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 1</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change(arr);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Write(arr[0]);<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 2</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// List 的命名空间是 System.Collections.Generic</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List&lt;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >int</span>&gt; list =<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 0);"  >new</span><span>&nbsp;</span>List&lt;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >int</span>&gt;();<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list.Add(1);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list.Add(2);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list.Add(3);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Write(list[0]);<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 1</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change(list);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Write(list[0]);<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 2</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// Array 的命名空间是 System</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Array array = Array.CreateInstance(System.Type.GetType(<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(153, 0, 0);"  >"System.Int32"</span>), 3);<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// Array 是抽象类，不能使用 new Array 创建。</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array.SetValue(1, 0);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array.SetValue(2, 1);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array.SetValue(3, 2);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Write(array.GetValue(0));<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 1</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change(array);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Write(array.GetValue(0));<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 2</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// ArrayList 的命名空间是 System.Collections</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArrayList arrayList =<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 0);"  >new</span><span>&nbsp;</span>ArrayList(3);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arrayList.Add(1);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arrayList.Add(2);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arrayList.Add(3);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Write(arrayList[0]);<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 1</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Change(arrayList);<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Response.Write(arrayList[0]);<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 2</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;}<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >private</span><span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >void</span><span>&nbsp;</span>Change(<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >int</span>[] arr)<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;{<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >for</span><span>&nbsp;</span>(<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >int</span><span>&nbsp;</span>i = 0; i &lt; arr.Length; i++)<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arr[i] *= 2;<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;}<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >private</span><span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >void</span><span>&nbsp;</span>Change(List&lt;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >int</span>&gt; list)<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;{<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >for</span><span>&nbsp;</span>(<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >int</span><span>&nbsp;</span>i = 0; i &lt; list.Count; i++)<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 使用 Count</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list[i] *= 2;<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;}<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >private</span><span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >void</span><span>&nbsp;</span>Change(Array array)<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;{<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >for</span><span>&nbsp;</span>(<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >int</span><span>&nbsp;</span>i = 0; i &lt; array.Length; i++)<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 使用 Length</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;array.SetValue((<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >int</span>)array.GetValue(i) * 2, i);<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 需要类型转换</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;}<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  ><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >private</span><span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >void</span><span>&nbsp;</span>Change(ArrayList arrayList)<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;{<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: blue;"  >for</span><span>&nbsp;</span>(<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >int</span><span>&nbsp;</span>i = 0; i &lt; arrayList.Count; i++)<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 使用 Count</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arrayList[i] = (<span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: red;"  >int</span>)arrayList[i] * 2;<span>&nbsp;</span><span style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(0, 128, 128);"  >// 需要类型转换</span><br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp;&nbsp;&nbsp;&nbsp;}<br style="line-height: 24px; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >}</div></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/90059060201110141217155</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/90059060201110141217155</guid>
    <pubDate>Mon, 14 Nov 2011 13:21:07 +0800</pubDate>
    <dcterms:modified>2011-11-14T13:21:07+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[Asp.net数组[转]]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/900590602011101411713702</link>
    <description><![CDATA[<div><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >string[] abc=new string[8]{"1","2","3","4","1","2","3","4"};</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >Response.Write(Array.IndexOf(abc,"3",1));//在abc数组中查找"3",从abc[1]开始找</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >Response.Write(Array.LastIndexOf(abc,"3"));//在abc数组中查找"3",从最后开始找</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >------------------------------------------------------------------------------</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >string[] arrStr=new string[8]{"1","4","3","2","16","14","12","14"};//arrStr[0]="1"...arrStr[7]="14"</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >Array.Reverse(arrStr); //颠倒arrStr数组，此时arrStr[0]="14"...arrStr[7]="1"</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >Array.Sort(arrStr); //给数组排序，此时顺序为1,12,14,14,16,2,3,4（因为是按字符串排序）</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >------------------------------------------------------------------------------</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >Array型数组要重定义大小,必须用ReDim(VB),对于大数组会特别慢;且无法在中间插入元素;不能清除它们(只能设置为空或0)</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >ArrayList在使用上比Array慢,但是不用重定义大小,使用myArrList.Add("Dog")s可以方便的添加数据</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >ArrayList myArrList = new ArrayList();//不用指出数组的大小,而且每个元素可以是任意数据类型;</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >myArrList.Insert(1,"abc"); //插入元素到数组[1]前</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >myArrList.RemoveAt(1); //删除数组元素[1]</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >myArrList.Remove("abc"); //删除内容为"abc"的数组元素,只删除一次,如果要全删,需要做循环</span><br style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(66, 66, 66); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Verdana, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 19px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >------------------------------------------------------------------------------</span></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/900590602011101411713702</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/900590602011101411713702</guid>
    <pubDate>Mon, 14 Nov 2011 13:17:13 +0800</pubDate>
    <dcterms:modified>2011-11-14T13:17:13+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[SQL server 2008 获取字段属性]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020111081030457</link>
    <description><![CDATA[<div><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >SQL2005中應該用：sys.extended_properties<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >如：<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >SELECT &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >表名 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp; CASE &nbsp; WHEN &nbsp; A.COLORDER=1 &nbsp; THEN &nbsp; D.NAME &nbsp; ELSE &nbsp; ' ' &nbsp; END,<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >表說明 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp; CASE &nbsp; WHEN &nbsp; A.COLORDER=1 &nbsp; THEN &nbsp; ISNULL(F.VALUE, ' ') &nbsp; ELSE &nbsp; ' ' &nbsp; END,<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >欄位序號 &nbsp; &nbsp; &nbsp; = &nbsp; A.COLORDER,<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >欄位名 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp; A.NAME,<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >標識 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp; CASE &nbsp; WHEN &nbsp; COLUMNPROPERTY( &nbsp; A.ID,A.NAME, 'ISIDENTITY ')=1 &nbsp; THEN &nbsp; '√ 'ELSE &nbsp; ' ' &nbsp; END,<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >主鍵 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp; CASE &nbsp; WHEN &nbsp; EXISTS(SELECT &nbsp; 1 &nbsp; FROM &nbsp; SYSOBJECTS &nbsp; WHERE &nbsp; XTYPE= 'PK ' &nbsp; AND &nbsp; PARENT_OBJ=A.ID &nbsp; AND &nbsp; NAME &nbsp; IN &nbsp; (<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >SELECT &nbsp; NAME &nbsp; FROM &nbsp; SYSINDEXES &nbsp; WHERE &nbsp; INDID &nbsp; IN(<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >SELECT &nbsp; INDID &nbsp; FROM &nbsp; SYSINDEXKEYS &nbsp; WHERE &nbsp; ID &nbsp; = &nbsp; A.ID &nbsp; AND &nbsp; COLID=A.COLID))) &nbsp; THEN &nbsp; '√ ' &nbsp; ELSE &nbsp; ' ' &nbsp; END,<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >類型 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp; B.NAME,<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >佔用位元組數 &nbsp; = &nbsp; A.LENGTH,<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >長度 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp; COLUMNPROPERTY(A.ID,A.NAME, 'PRECISION '),<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >小數位數 &nbsp; &nbsp; &nbsp; = &nbsp; ISNULL(COLUMNPROPERTY(A.ID,A.NAME, 'SCALE '),0),<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >允許空 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp; CASE &nbsp; WHEN &nbsp; A.ISNULLABLE=1 &nbsp; THEN &nbsp; '√ 'ELSE &nbsp; ' ' &nbsp; END,<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >預設值 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp; ISNULL(E.TEXT, ' '),<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >欄位說明 &nbsp; &nbsp; &nbsp; = &nbsp; ISNULL(G.[VALUE], ' ')<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >FROM &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >SYSCOLUMNS &nbsp; A<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >LEFT &nbsp; JOIN &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >SYSTYPES &nbsp; B &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >ON &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >A.XUSERTYPE=B.XUSERTYPE<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >INNER &nbsp; JOIN &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >SYSOBJECTS &nbsp; D &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >ON &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >A.ID=D.ID &nbsp; &nbsp; AND &nbsp; D.XTYPE= 'U ' &nbsp; AND &nbsp; &nbsp; D.NAME &lt;&gt; 'DTPROPERTIES '<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >LEFT &nbsp; JOIN &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >SYSCOMMENTS &nbsp; E &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >ON &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >A.CDEFAULT=E.ID<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >LEFT &nbsp; JOIN &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >sys.extended_properties &nbsp; G &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >ON &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >A.ID=G.major_id &nbsp; AND &nbsp; A.COLID=G.minor_id &nbsp; &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >LEFT &nbsp; JOIN &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >sys.extended_properties &nbsp; F &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >ON &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >D.ID=F.major_id &nbsp; AND &nbsp; F.minor_id=0<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >ORDER &nbsp; BY &nbsp;<span>&nbsp;</span></span><br style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);"  ><span style="color: rgb(0, 0, 0); font-family: simsun; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 23px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"  >A.ID,A.COLORDER<span> <br></span></span></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020111081030457</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020111081030457</guid>
    <pubDate>Tue, 8 Nov 2011 10:03:00 +0800</pubDate>
    <dcterms:modified>2011-11-08T10:03:57+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[SQLServer中SYSCOLUMNS表的各个字段的意义]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020111075485093</link>
    <description><![CDATA[<div><div style="color: rgb(104, 104, 104); font-family: Arial, Helvetica, simsun, u5b8bu4f53; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(246, 246, 237);"  ><div><div><h3 style="overflow-x: hidden; overflow-y: hidden; text-align: left; white-space: normal; word-wrap: break-word; word-break: break-all; font-size: 14px; margin-top: 30px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 24px;"  ><span style="font-size: 20px; font-family: 微软雅黑, 黑体, Arial, Helvetica, sans-serif;"  ><br></span><span style="font-size: 12px; font-weight: normal; color: rgb(159, 159, 157); background-color: rgb(223, 223, 214);"  ></span></h3><p style="zoom: 1; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; color: rgb(134, 133, 133); line-height: 20px;"  ><span style="float: left;"  ><span style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px;"  >2009-12-28 17:50:09</span><span style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px;"  >|&nbsp;&nbsp;分类：</span><span>&nbsp;</span><a title="SQLStatement" style="cursor: pointer; text-decoration: none; color: rgb(0, 0, 0); " rel="nofollow" href="http://zkp198411.blog.163.com/blog/#m=0&amp;t=1&amp;c=fks_087069082086086070086083084095085084086070081085084069085"  >SQLStatement</a></span><span style="float: right; color: rgb(159, 159, 157);"  ><span style="margin-top: 0px; margin-right: 2px; margin-bottom: 0px; margin-left: 2px;"  >|</span><span id="$_fontswitch"  style="color: rgb(0, 0, 0); position: relative; cursor: default;"  >字号</span></span><span id="$_blog_subscribe"  style="cursor: pointer; float: right; color: rgb(0, 0, 0);"  ><span style="display: inline-block; zoom: 1; width: 20px; height: 20px; line-height: 20px; background-position: -360px -380px; background-repeat: no-repeat no-repeat;"  >&nbsp;</span><a style="cursor: pointer; text-decoration: none; color: rgb(0, 0, 0); " rel="nofollow"  >订阅</a></span></p></div></div></div><div style="line-height: 25px; font-size: 14px; text-align: left; word-wrap: break-word; color: rgb(110, 110, 110); margin-top: 15px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; overflow-x: hidden; overflow-y: hidden; font-family: Arial, Helvetica, simsun, u5b8bu4f53; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(246, 246, 237);"  >本文转自：<a style="line-height: 25px; text-decoration: none; color: rgb(0, 0, 0); " rel="nofollow" href="http://www.huarw.com/db/dbbbs/MSSQLServer/200111/492570.html"  >http://www.huarw.com/db/dbbbs/MSSQLServer/200111/492570.html</a><br style="line-height: 25px;"  ><p style="line-height: 25px; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;"  >&nbsp; 列名 数据类型 描述&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; name sysname 列名或过程参数的名称。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; id int 该列所属的表对象&nbsp;&nbsp; ID，或与该参数关联的存储过程&nbsp;&nbsp; ID。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; xtype tinyint systypes&nbsp;&nbsp; 中的物理存储类型。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; typestat tinyint 仅限内部使用。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; xusertype smallint 扩展的用户定义数据类型&nbsp;&nbsp; ID。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; length smallint systypes&nbsp;&nbsp; 中的最大物理存储长度。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; xprec tinyint 仅限内部使用。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; xscale tinyint 仅限内部使用。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; colid smallint 列或参数&nbsp;&nbsp; ID。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; xoffset smallint 仅限内部使用。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; bITpos tinyint 仅限内部使用。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; reserved tinyint 仅限内部使用。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; colstat smallint 仅限内部使用。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; cdefault int 该列的默认值&nbsp;&nbsp; ID。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; domain int 该列的规则或&nbsp;&nbsp; CHECK&nbsp;&nbsp; 约束&nbsp;&nbsp; ID。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; number smallint 过程分组时（0&nbsp;&nbsp; 表示非过程项）的子过程号。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; colorder smallint 仅限内部使用。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; autoval varbinary(255) 仅限内部使用。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; offset smallint 该列所在行的偏移量；如果为负，表示可变长度行。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; status tinyint 用于描述列或参数属性的位图：&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp;&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; 0x08&nbsp;&nbsp; =&nbsp;&nbsp; 列允许空值。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; 0x10&nbsp;&nbsp; =&nbsp;&nbsp; 当添加&nbsp;&nbsp; varchar&nbsp;&nbsp; 或&nbsp;&nbsp; varbinary&nbsp;&nbsp; 列时，ANSI&nbsp;&nbsp; 填充生效。保留&nbsp;&nbsp; varchar&nbsp;&nbsp; 列的尾随空格，保留&nbsp;&nbsp; varbinary&nbsp;&nbsp; 列的尾随零。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; 0x40&nbsp;&nbsp; =&nbsp;&nbsp; 参数为&nbsp;&nbsp; OUTPUT&nbsp;&nbsp; 参数。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; 0x80&nbsp;&nbsp; =&nbsp;&nbsp; 列为标识列。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp;&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; type tinyint systypes&nbsp;&nbsp; 中的物理存储类型。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; usertype smallint systypes&nbsp;&nbsp; 中的用户定义数据类型&nbsp;&nbsp; ID。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; printfmt varchar(255) 仅限内部使用。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; prec smallint 该列的精度级别。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; scale int 该列的小数位数。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; iscomputed int 表示是否已计算该列的标志：&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp;&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; 0&nbsp;&nbsp; =&nbsp;&nbsp; 未计算。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; 1&nbsp;&nbsp; =&nbsp;&nbsp; 已计算。&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp;&nbsp;&nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; isoutparam int 表示该过程参数是否是输出参数：&nbsp;</p>&nbsp; 1 &nbsp; = &nbsp; 真。 &nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; 0 &nbsp; = &nbsp; 假。 &nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; &nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; isnullable int 表示该列是否允许空值： &nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; &nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; 1 &nbsp; = &nbsp; 真。 &nbsp;<span>&nbsp;</span><br style="line-height: 25px;"  >&nbsp; 0 &nbsp; = &nbsp; 假。&nbsp;&nbsp;<span> <br></span></div></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020111075485093</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020111075485093</guid>
    <pubDate>Mon, 7 Nov 2011 17:48:50 +0800</pubDate>
    <dcterms:modified>2011-11-07T17:48:50+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[正则 不以某些字符串开头的匹配]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020111075243966</link>
    <description><![CDATA[<div><div>        <div>         <div>                  <p style="line-height:20px;"  >           <span>                          <span>2009-02-20 11:51:32</span><span>|&nbsp;&nbsp;分类：</span>             <a title="basic" rel="nofollow" href="http://csc2601.blog.163.com/blog/#m=0&amp;t=1&amp;c=fks_087067085082086069082082087095086084089067087086"  >basic</a>                        </span>           <span><span>|</span><span id="$_fontswitch"  >字号</span></span><span id="$_blog_subscribe"  ><span>&nbsp;</span><a rel="nofollow">订阅</a></span>         </p>       </div>        </div>         </div>                  <div>                  </div>                           <p>/(?!index|css|img)<br>share一个正则<br>匹配 所有 /+字符串 然后 字符串不以idex css img 开头的内容</p>  <p>------------<br>1 /img/dsf<br>2 /i<br>3 /adbkjdlfjasdkl.html<br>4 /index.html<br>5 /index.php<br>6 /css/<br>7 /ione</p></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020111075243966</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020111075243966</guid>
    <pubDate>Mon, 7 Nov 2011 17:24:03 +0800</pubDate>
    <dcterms:modified>2011-11-07T17:24:03+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[获取SQL server所有数据库名、所有表名、所有字段名]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/90059060201110744516211</link>
    <description><![CDATA[<div>1.获取所有数据库名: <br>SELECT Name FROM Master..SysDatabases ORDER BY Name <br>2.获取所有表名: <br>SELECT Name FROM DatabaseName..SysObjects Where XType='U' ORDER BY Name <br>XType='U':表示所有用户表; <br>XType='S':表示所有系统表; <br>3.获取所有字段名: <br>SELECT Name FROM SysColumns WHERE id=Object_Id('TableName') <br>方法有很多，这里只列出其中一种，喜欢就用。</div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/90059060201110744516211</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/90059060201110744516211</guid>
    <pubDate>Mon, 7 Nov 2011 16:45:16 +0800</pubDate>
    <dcterms:modified>2011-11-07T16:46:08+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[鉴定美版G1是否原装未拆动的方法以及购买G1的建议]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020108905935140</link>
    <description><![CDATA[<div><div id="threadtitle"  >  <div> <a target="_blank" rel="nofollow" href="http://www.hiapk.com/bbs/tag.php?name=%BC%F8%B6%A8"  >鉴定</a>, <a target="_blank" rel="nofollow" href="http://www.hiapk.com/bbs/tag.php?name=%D4%AD%D7%B0"  >原装</a>, <a target="_blank" rel="nofollow" href="http://www.hiapk.com/bbs/tag.php?name=%BD%A8%D2%E9"  >建议</a></div> </div>  1，查IMEI号，鉴定是否美版，打开下边地址，<a target="_blank" rel="nofollow" href="http://service.htceurope.com/htcdistributor/Default.aspx"  >http://service.htceurope.com/htcdistributor/Default.aspx</a><br> 输入IMEI，然后点query，其他不用填，然后你能看到Customer Name 一行，如果显示t-mobile USA的，HSUPA后边写disable的就是美版<span href="http://www.hiapk.com/bbs/tag.php?name=%BB%FA%C6%F7"   class="t_tag"  >机器</span>了，这个鉴定机器IMEI的方法是我从刷机板块看到一个叫vchinese的<span href="http://www.hiapk.com/bbs/tag.php?name=%C5%F3%D3%D1"   class="t_tag"  >朋友</span>发表的，我引用到了这里，但是这个地址昨天可以用的，今天不知道为什么打不开，可能是htc<span href="http://www.hiapk.com/bbs/tag.php?name=%B9%D9%B7%BD"   class="t_tag"  >官方</span>的事情，请稍后尝试。方法可能你在<span href="http://www.hiapk.com/bbs/tag.php?name=%CA%D6%BB%FA"   class="t_tag"  >手机</span>商城购买的时候操作有些困难，毕竟当时不好<span href="http://www.hiapk.com/bbs/tag.php?name=%C9%CF%CD%F8"   class="t_tag"  >上网</span>，你可以提前联系你的朋友，让这个朋友在家或者单位有这个查询地址，然后你在选购手机的时候，打<span href="http://www.hiapk.com/bbs/tag.php?name=%B5%E7%BB%B0"   class="t_tag"  >电话</span>把IMEI读给你朋友，让你朋友当时给你查询。<br> <br> 2，推<span href="http://www.hiapk.com/bbs/tag.php?name=%BF%AA%BB%FA"   class="t_tag"  >开机</span>器键盘，看<span href="http://www.hiapk.com/bbs/tag.php?name=%C6%C1%C4%BB"   class="t_tag"  >屏幕</span>的反面，有5个圆圈，4小1大呈环形排列，这个是t-mobile USA的一种myfave<span href="http://www.hiapk.com/bbs/tag.php?name=%B9%A6%C4%DC"   class="t_tag"  >功能</span>的标志，类似中国的神州行和如意通的亲情号码服务，带这个标志的是美国版G1。<br> <br> 3，打开<span href="http://www.hiapk.com/bbs/tag.php?name=%B5%E7%B3%D8"   class="t_tag"  >电池</span>后盖，看离sim卡插槽的最近的一个螺丝孔，里边贴有黑色圆形纸贴片，上边印有清晰白色VOID字样的为未拆动的美版G1。<br> <br> 4，私下站内信息联系我，给我IMEI，我有<span href="http://www.hiapk.com/bbs/tag.php?name=%B0%EC%B7%A8"   class="t_tag"  >办法</span>帮你查询这个机器是否在t-mobile USA翻修过，当然你得给我至少24小时的<span href="http://www.hiapk.com/bbs/tag.php?name=%CA%B1%BC%E4"   class="t_tag"  >时间</span>，因为我工作的地方<span href="http://www.hiapk.com/bbs/tag.php?name=%B5%E7%C4%D4"   class="t_tag"  >电脑</span>是看不了<span href="http://www.hiapk.com/bbs/tag.php?name=%D6%D0%CE%C4"   class="t_tag"  >中文</span>的， 我需要下班晚上回家上网看信息，最好留下你的电话号码，我可以在查到第一时间打电话通知你。（前提通过上边3种鉴定方法后你还不放心你的手机是原装，当然 我也是碰运气给你想办法查询，我的方法以前查询成功过，但失手的次数也不少，毕竟我找的地方有的人爱帮助人，有的则不爱管这些闲事。）<br> <br> 另外，如果卖手机的人一定说自己的手机都是原装没拆动过的，那你告诉他，我英语好，我就爱用英文不带中文的，然后直接让他给你拿没拆过盒子的，盒子开盖的 地方的封胶条，那东西下来还原不回去的，就算有人仿，恐怕也仿不完美的，原装的贴的很平整，厚实，透明塑料胶条，上边印有红字，字是从里边印上去的，绝对 不是普通简单印刷工艺。<br> <br> 卖手机的如果让你交定金，你就告诉他，你有这么多G1，你是个大卖家，就算我真不回来买，你也肯定卖的掉，你不怕多进一台手机的，然后让他去给你拿，或者他们的话讲，调货，或者他去哪定，那是他的事了，你就等他拿来再买就好了。<br> <br> <br> 购买G1的个人建议<br> <br> 个人觉得买美版棕色G1比较好，我刚简单看了下t-mobile 英国和德国的网站，英国和德国似乎没有发行棕色G1，其他国家我不清楚，我觉得美国是第一个上市G1的国家，美国版的G1属于android标志性的第一 步手机，而且棕色本来就少的可怜，其实很多专卖店都不提供棕色版本销售的。所以无论是吸引眼球度还是收藏价值都排第一的。</div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020108905935140</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020108905935140</guid>
    <pubDate>Thu, 9 Sep 2010 12:59:35 +0800</pubDate>
    <dcterms:modified>2011-09-28T05:40:52+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[G1 购机资料]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020108905851610</link>
    <description><![CDATA[<div><font size="4"  >美版，英版，德版G1区别</font><br> <ul type="1"  ><li>英版G1在T-Mobile 这个LOGO之前是三个点，而美版只有一个点。</li><li>英版<span href="http://www.hiapk.com/bbs/tag.php?name=%BB%FA%C6%F7"   class="t_tag"  >机器</span>的<span href="http://www.hiapk.com/bbs/tag.php?name=%B9%A6%C4%DC"   class="t_tag"  >功能</span>按钮都只有一个颜色，接听挂断按键都是白色的，而美版接听按键为<font color="SeaGreen"  >绿色</font>，挂断按键为<font color="DarkRed"  >红色。</font></li><li>英版G1 的键盘区域材质是光滑的，而美版是那种磨砂的。</li><li>英版机器的侧面没有 <span href="http://www.hiapk.com/bbs/tag.php?name=HTC"   class="t_tag"  >HTC</span> 标识，背面无5个点。</li><li>美版G1推<span href="http://www.hiapk.com/bbs/tag.php?name=%BF%AA%BB%FA"   class="t_tag"  >开机</span>器键盘，看<span href="http://www.hiapk.com/bbs/tag.php?name=%C6%C1%C4%BB"   class="t_tag"  >屏幕</span>的反面，有5个圆圈，4小1大呈环形排列</li><li>美版耳机是分体式的。</li><li>美版白色的G1按键是银灰色的，后盖也是银灰色的。</li><li>德版yz倒置</li><li>德版的G1是自带一张1G/2G的<span href="http://www.hiapk.com/bbs/tag.php?name=SD%BF%A8"   class="t_tag"  >SD卡</span>？</li><li>德版G1的充电器是双圆头的</li><li>德版G1耳机是一体化的？</li><li>德版G1的充电器是双圆头的</li></ul><br> <ul><li><font size="4"  >检查项目</font></li></ul><br> <ul type="1"  ><li><font size="2"  >配件： </font>1充电器，1<span href="http://www.hiapk.com/bbs/tag.php?name=%B5%E7%B3%D8"   class="t_tag"  >电池</span>，1数据线，1分体式的耳机（有夹子，调音滑盘，暂停钮，海绵耳机套），<span href="http://www.hiapk.com/bbs/tag.php?name=%CA%D6%BB%FA"   class="t_tag"  >手机</span>皮套，贴膜，说明书。（白色的是全白配件的）。英版白色G1附件里有两张T-MOBILE贴纸。G1原带的数据线是和G1机器上的接口一致的，只有一个边是倾斜的，而不是普通的梯形的MINI-<span href="http://www.hiapk.com/bbs/tag.php?name=USB"   class="t_tag"  >USB</span>。</li></ul><ul type="1"  ><li>滑开机器看屏幕后部是否贴膜，全新的机器一般都有贴膜的，如果没有贴膜也要仔细查看是否有划痕。</li><li>注意后盖的摄像头位置有没有贴膜。</li><li>使用过的话，屏幕后面的面板就会有划痕的，凹槽的边缘是否有掉漆的现象出现。</li><li>屏幕和键盘之间的接缝越小越好，而且接缝要均匀。来回多滑动几次屏幕，感觉一下是否顺畅，有无异响，屏幕滑出后是否稳固。</li><li>注意看G1贴膜有没有气泡，原装的机器应该是没有气泡的，而且贴膜顶端是会突出一些的。</li><li>检查屏幕是否有亮点或暗点。方法：分别照一张全黑和全白的照片。全黑照片用收堵住镜头。全白照片同样操作，只不过相机<span href="http://www.hiapk.com/bbs/tag.php?name=%C4%A3%CA%BD"   class="t_tag"  >模式</span>用“反色”。</li><li>按一按屏幕四周，特别是menu键上面那一条的左右两个下角，看看是否会下陷并发出吱吱的<span href="http://www.hiapk.com/bbs/tag.php?name=%C9%F9%D2%F4"   class="t_tag"  >声音</span>，好的机器应该是非常踏实的</li><li>检查触屏可否使用，<font color="red"  ><font color="#000000"  >触摸灵敏度，</font></font><font color="#000000"  >重力</font><font color="red"  ><font color="#000000"  >感应</font></font><font color="#000000"  >横屏和竖屏，用<span href="http://www.hiapk.com/bbs/tag.php?name=%D3%CE%CF%B7"   class="t_tag"  >游戏</span>teeter测重力</font><font color="red"  ><font color="#000000"  >感应功能</font></font><font color="#000000"  >.</font></li><li>检查电池：<ul type="1"  ><li>试试可不可以用原装充电器充电，<font color="red"  ><font color="#000000"  >充电情况（2种充电方式是否都可行，机器是否过热）</font></font></li><li>假电池：纸张比较粗糙，字体也差很多。纸质有很大不同，假的明显粗糙，没有真品光滑。假的字迹模糊。</li><li>假电池ID都一样且正面不平整，注意电池触点是否严重。</li></ul></li><li><span href="http://www.hiapk.com/bbs/tag.php?name=%C9%CF%CD%F8"   class="t_tag"  >上网</span>测试，<font color="red"  ><font color="#000000"  >wifi</font></font></li><li><span href="http://www.hiapk.com/bbs/tag.php?name=%CD%A8%BB%B0"   class="t_tag"  >通话</span>测试，<font color="red"  ><font color="#000000"  >听筒音量调节</font></font></li><li><span href="http://www.hiapk.com/bbs/tag.php?name=%B6%CC%D0%C5"   class="t_tag"  >短信</span>（发出接收）</li><li><span href="http://www.hiapk.com/bbs/tag.php?name=GPS"   class="t_tag"  >GPS</span>定位，<span href="http://www.hiapk.com/bbs/tag.php?name=%B5%E7%D7%D3"   class="t_tag"  >电子</span>罗盘（指南针）（<span href="http://www.hiapk.com/bbs/tag.php?name=%CF%C2%D4%D8"   class="t_tag"  >下载</span>compass<span href="http://www.hiapk.com/bbs/tag.php?name=%C8%ED%BC%FE"   class="t_tag"  >软件</span>测试），金属探测（下载metal detector软件测试）</li><li>测试物理键盘是否全部可用</li><li>打开后盖在靠近sim卡的螺丝上贴有黑底白字的“void”小纸片，检查是否有损毁或不完整的，翘起和残缺的现象。</li><li>检查手机震动模块上的编码都已经有磨损的迹象。</li><li>检查摄像头是否有指纹以及周围是否有很多灰尘。</li><li>检查轨迹球，白色的用一段<span href="http://www.hiapk.com/bbs/tag.php?name=%CA%B1%BC%E4"   class="t_tag"  >时间</span>会发黄。黑色的更好判断，新的黑球上必需要有一层白色的毛，看上起灰白色，毛茸茸的。用过1天，那层毛就没有了，如果球是油油光光的，肯定不是新的。</li><li>开机输入*#06#对照啊，检查是否两码合一。两码合一是<span href="http://www.hiapk.com/bbs/tag.php?name=%CF%B5%CD%B3"   class="t_tag"  >系统</span>串号（输入*#06#即可看到）和机身串号相同。三码合一是系统、机身和包装盒的串号相同。</li><li>查IMEI号，打开下边地址，<a target="_blank" rel="nofollow" href="http://service.htceurope.com/htcdistributor/Default.aspx"  >http://service.htceurope.com/htcdistributor/Default.aspx</a><br> 输入IMEI，然后点query，其他不用填，然后你能看到Customer Name 一行，如果显示t-mobile USA的，HSUPA后边写disable的就是美版机器了</li><li>查询sn码的方法：1、打开后盖，卸下电池就可以看见了。</li><li>查询G1出厂日期的方法：SN码前五位为HT93P，第三位数字9，代表2009年；第四位数字3，代表3月份；第五位字母P，代表23日；</li></ul><br> <ul><li><font size="4"  ><strong>Tips</strong></font></li></ul><ul><li><font color="#990033"  >怎样解除GMAILL绑定？</font></li></ul><span href="http://www.hiapk.com/bbs/tag.php?name=%C9%E8%D6%C3"   class="t_tag"  >设置</span>——应用<span href="http://www.hiapk.com/bbs/tag.php?name=%B3%CC%D0%F2"   class="t_tag"  >程序</span>——管理应用程序——<span href="http://www.hiapk.com/bbs/tag.php?name=Google"   class="t_tag"  >Google</span> Apps——清除数据。<br> 之后设置——数据同步，就会<span href="http://www.hiapk.com/bbs/tag.php?name=%CC%E1%CA%BE"   class="t_tag"  >提示</span>你绑定新的 <span href="http://www.hiapk.com/bbs/tag.php?name=Gmail"   class="t_tag"  >Gmail</span> 账户。<br> <ul><li><font color="#990033"  >怎样打开系统的 GPS 模块？</font></li></ul><p align="left"  >设置——安全性和位置——启用GPS卫星设置<br> </p><ul><li><font color="#990033"  >G1如何设置<span href="http://www.hiapk.com/bbs/tag.php?name=WiFi"   class="t_tag"  >WiFi</span>？</font></li></ul><p align="left"  >打开手机主屏幕，按“MENU”键进入“Setting”菜单，再点击“Wireless controls”，进入“WiFi”菜单设置后打开WiFi开关连接<span href="http://www.hiapk.com/bbs/tag.php?name=%CD%F8%C2%E7"   class="t_tag"  >网络</span>，当屏幕右上角出现一个WiFi天线时，表示WiFi网络连接成功。</p><ul><li><font color="#990033"  >G1是否支持扩展卡？</font></li></ul><p align="left"  >是的，G1支持最大支持8G的micro SD。<br> </p><ul><li><font color="#990033"  >TF/MicroSD卡有几种Class传输等级</font><font color="#990033"  >？</font></li></ul><p align="left"  >TF/MicroSD卡分别有四种等级：Class 0、Class 2、Class 4、Class 6。<br> Class 0：包括低于Class 2和未标注Speed Class的情况； <br> Class 2：能满足观看普通MPEG4 MPEG2 的电影、SDTV、数码摄像机拍摄； <br> Class 4：可以流畅<span href="http://www.hiapk.com/bbs/tag.php?name=%B2%A5%B7%C5"   class="t_tag"  >播放</span>高清电视（HDTV），数码相机连拍等需求； <br> Class 6：满足单反相机连拍和专业设备的使用要求；</p><br> <ul><li><font color="#990033"  >G1的 查询代码（IMEI，工程模式，手机和电池信息）</font></li></ul><br> 在<span href="http://www.hiapk.com/bbs/tag.php?name=%B2%A6%BA%C5"   class="t_tag"  >拨号</span>处&nbsp;&nbsp;输入 <br> 显示 IMEI（*#06#） <br> 手机信息（*#*#4636#*#*）<br> 单元测试（*#*#7262626#*#*）</div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020108905851610</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020108905851610</guid>
    <pubDate>Thu, 9 Sep 2010 12:58:51 +0800</pubDate>
    <dcterms:modified>2011-09-29T13:10:03+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[想买机辨别真伪的朋友过来]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020108905722641</link>
    <description><![CDATA[<div><font size="6"><font color="navy">第一部分：机身</font></font><br>
<font size="5"><font color="red">1~原机的屏膜是上方有个梯形的小耳朵~~当把膜撕掉的时候会破损~有点难撕掉</font></font><br>
<br>
<font size="5"><font color="red">2~英版，德国版的全机身都是白色的~包括音量键和照像键内部键盘。</font></font><br>
<font size="5"><font color="red">&nbsp; &nbsp; 黑色分键盘，音量键，照像键为有烤漆和无烤漆2种。</font></font><br>
<br>
<font size="5"><font color="red">3~看机身周边的接缝有没有合紧，有没有松动现象。看看机身<span href="http://www.hiapk.com/bbs/tag.php?name=%C6%C1%C4%BB"  class="t_tag">屏幕</span>部分后面的螺丝有没有划伤的痕迹。</font></font><br>
<br>
<font size="5"><font color="red">4~白色的看轨迹球的颜色是不是通透的白灰色~这个球越用越深~</font></font><br>
<font size="5"><font color="red">&nbsp; &nbsp; 黑色的上面对光看有灰色毛绒绒的感觉，光亮的黑色是使用很长<span href="http://www.hiapk.com/bbs/tag.php?name=%CA%B1%BC%E4"  class="t_tag">时间</span>的。</font></font><br>
<br>
<font size="5"><font color="red">5~htc原电有htc字样那面是平整的,htc原电有htc字样那面是平整的没有凹陷的手感~~背面手感细腻平整。手摸上去会感觉很油，仿电是纸质的感觉。</font></font><br>
<font size="5"><font color="red">&nbsp; &nbsp;&nbsp;&nbsp;接点的3个铜片是磨砂的无划痕。<span href="http://www.hiapk.com/bbs/tag.php?name=%B5%E7%B3%D8"  class="t_tag">电池</span>在开包装时是分开装的，先看电池这3个点，插入新机会有轻微划痕的，所以检查完后再插入<span href="http://www.hiapk.com/bbs/tag.php?name=%CA%D6%BB%FA"  class="t_tag">手机</span>，这时可以记下IMEI码。</font></font><br>
<font size="5"><font color="#ff0000">&nbsp; &nbsp;&nbsp;&nbsp;没有3种电池的说法，08年后的机子电池都是htc的标签，电芯仍是<span href="http://www.hiapk.com/bbs/tag.php?name=%C8%FD%D0%C7"  class="t_tag">三星</span>代工。</font></font><br>
<font size="5"><font color="#ff0000">&nbsp; &nbsp;&nbsp;&nbsp;G1的原电就一种。</font></font><br>
<font size="5"><font color="red">&nbsp; &nbsp;&nbsp;&nbsp;</font></font><br>
<font size="5"><font color="red">6~看机身滑盖有没有摩擦的痕迹，看键盘处有无划痕，包括按键。</font></font><br>
<br>
<font size="5"><font color="red">7~看键盘是否有刮痕或是键位松动不整齐（轻微松动是有的，毕竟<span href="http://www.hiapk.com/bbs/tag.php?name=%D6%B8%B5%E3"  class="t_tag">指点</span>就那一个，仔细听听滑动时有没有卡卡的<span href="http://www.hiapk.com/bbs/tag.php?name=%C9%F9%D2%F4"  class="t_tag">声音</span>）</font></font><br>
<br>
<font size="5"><font color="red">8~看机壳有没有伤痕，一定要仔细看，前面后面都要仔细对光看。</font></font><br>
<br>
<font size="5"><font color="red">9~~闻闻机子有没有新出厂的数码产品塑料的味道。（现在的机壳深圳也可以生产，新壳都一个味，所以仅供参考。）</font></font><br>
<br>
<font size="5"><font color="red">10~很关键了，看usb接口处是否有刮痕，黑色直线条纹状的是使用过的，那个地方是不能更换的，主板连接都靠这个，更换了无法使用充电或耳机。</font></font><br>
<font size="5"><font color="red">&nbsp; &nbsp;&nbsp; &nbsp;接口处的里面没有划痕，是金属磨砂的感觉，那就是新的。（翻新机都不会去更换这个。）</font></font><br>
<font size="5"><font color="#ff0000">&nbsp; &nbsp;&nbsp; &nbsp;打开背盖看左上角字体是否灰色的，清晰的，没有印刷的感觉。右下角是3码标签，看字体是否清晰。</font></font><br>
<font size="5"><font color="#ff0000">&nbsp; &nbsp;&nbsp; &nbsp;底部是黑色磨砂的材质，手按下会有点凹凸不平的感觉。</font></font><br>
<font size="5"><font color="#ff0000">&nbsp; &nbsp;&nbsp; &nbsp;电池触点3个头有1种是中间水平两边是向下的，另一种是全部水平的。<br><br></font></font><font size="6"><font color="navy">第二部分：配件</font></font><br>
<font size="4"><font color="red">1~3.5MM两截头耳机htc，充电器是简版htc的（少数是原厂的）<br>
2~布套一个右边G1字样，手感厚实。全部是黑色。</font></font><br>
<font size="4"><font color="red">3~数据线就无所谓了，</font></font><font size="4"><font color="red">包装基本上都是深圳的，你就更不要指望包装是新的了。</font></font><br>
 <br>
<font size="4"><font color="red">走私机是没有包装的，走私30台机子包装加起来有多少？被抓住是很明显的，所以走私商一般是不会拿包装的。</font></font><br>
<font size="4"><font color="red">主要是机身，电池或特别的配件会走私回来，大路货都是在国内配的，要想全新原包就自己去国外买吧。</font></font><br>
<font size="4"><font color="#ff0000">G1耳机就一种2截头的，所以好的走私商会进回原装耳机。更好的会进回原装充电器（其实进回来了你也用不了，还得转换头。）</font></font><br>
<font size="4"><font color="red">htc直接耳机是通用耳机和通用充电器一样，一般是翻新机用得多。</font></font><br>
<font size="4"><font color="red">最近说G1纯白有白色套件，我去了解了一下，现在新机不多，配件是JS自己找到，没有的就把G2纯白的配件给配在G1上了。</font></font><br>
<font size="4"><font color="red">所以市面上出现了纯白版的配件。</font></font><br>
<font size="4"><font color="red">买手机重要的是机身和电池，其他的只要是原厂的就可以了，要求太高估计你是买不到全包的机子，除非你自己去买。<br><br></font></font><font size="6"><font color="navy">第三部分：购机</font></font><br>
<font size="4"><font color="green">购机切记不要匆忙慌张，要仔细慢慢的看。选3家比价，找一家顺眼的看货就可以了，不要到处乱转，浪费时间。</font></font><br>
<font size="4"><font color="green">一般都是下午14：00去市场看机。有人会说为什么不是5点去，快关门了会便宜，是的，便宜了你就吃的亏更大了。</font></font><br>
<font size="4"><font color="green">还要选个好天气，精神好的日子去看。</font></font><br>
<font size="4"><font color="green">有2点原因~~</font></font><br>
<font size="4"><font color="red">1~市场一般6点关门，你看机的时间大概是2~3小时，5点左右谈价，6点前你就可以买到机子。</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp; 下午2~4点是进货和价格稳定的时间，这个时候你有更多的选择。</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp; 你如果按照第一部分仔细看机，新手估计3个小时还不够，所以给自己留充裕的时间才是正确的。</font></font><br>
<br>
<font size="4"><font color="red">2~2点光照是很好的，精神也是最好的时候，看机的最佳时间，5点你也看累了，有点气给自己谈价吧，商家看你看机很仔细</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp; 会关注你，你是内行他不会乱开价，也不会给翻新机你，砍价要靠谱，对半当白菜买，那谁也不会理会你。</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp; 而且不要贪小便宜，也不要心急多去几次总比买个不称心的强，该出手就不要犹豫，要相信自己的眼光。</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp; 大的机商一般不会理会你怎么砍价的，机子不愁卖，不然G1也不会断货。所以学会满足，价格适中了也就不要太挑剔了。</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp; 如果真很低的价位给你你可要担心咯，明白吗？便宜不是那么好占的，卖机子的人怎么会亏本卖给你？<br><br></font></font><font size="5"><font color="navy">第四部分：市场</font></font><br>
<font size="4"><font color="green">为什么有这一部分，事项大家更了解你的货是怎么买的怎么来的，为什么会有翻新和14天机。</font></font><br>
<font size="4"><font color="red">1~没有什么14天机，14天机就是成色好的2手手机。</font></font><br>
 <br>
<font size="4"><font color="red">2~翻新机，就是坏了的，换了壳的，维修过的手机。这样的机子安个原装壳就当新机卖。</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp; 怎么样分辨？最好的办法就是看USB接口和螺丝口。</font></font><br>
 <br>
<font size="4"><font color="red">3~机子怎么来的，一般来说从欧洲走私回大陆的机子市场占有量不高。</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp;&nbsp;&nbsp;如果这个机子只对欧美发行，生产商是会和移动商开会的，根据移动商的客户情况来安排生产数量，这个数量多少只有生产商和移动商知道。</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp; 中国移动09年5月统计商户人数为6.8亿，而著名的T网把整个欧洲和美国的商户加起来也只有1.2亿左右。</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp; 所以发给欧美国家的机型的产量都不会高，断货快，停产快，没有那个生产商会生产一种机子到死的。</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp;这就是G1为什么停产快，断货快，价格高的原因。</font></font><br>
 <br>
<font size="4"><font color="red">4~新机型一般刚出的时候价搞，抢购，移动商也不会马上投很多机子到市场，效果好，机子数量就多，所以欧美回来的翻新机及2手机就多，这时</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp; 价位比较合理，但总有多的库存，厂家合同到期就会往外吐货，这样一来走私商可以低价位的买到机头，然后走私到国内，这时的机子价位就慢慢的</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp; 便宜了，而且新机较多。停产了，新机少了，价位就又会回升，如果不是人为恶炒的话G1估计超不过2640的卖价，所以想买新机的，这也许就是最后</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp;一拨了，抓紧机会，相对新机上市的价格差距也就200~400，相对低价的时候也是200~400,所以现在买机的确实贵一点，但比起新发售的时候还是便宜的</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp;而且一样的是全新的。再过了价格猛垮，因为新机没有了，市场全市改版和翻新的。那个时候就算1600你敢买吗？</font></font><br>
 <br>
 <font size="6"><font color="navy">第五部分：翻新机和网购</font></font><br>
<br>
<font size="4"><font color="red">我不想谈这个话题，因为本人也想买实惠的东西，但不至于去贪便宜买网上的某些低价的东西（网上也有好的）。</font></font><br>
<font size="4"><font color="red">以个人经验来说看真机靠谱，我帮很多朋友看机，很多JS找过我要帮他看机。</font></font><br>
<font size="4"><font color="red">都是朋友，说穿点现在做手机只能赚个小钱。说白了没有意思，但我现在为什么还要说，因为很多G友上当了，</font></font><br>
<font size="4"><font color="red">而且都是上的网购的当。</font></font><br>
<font size="4"><font color="red">手机全新没有想象中赚钱，但翻新机和2手机就有很大的利润。进价我就不说了，说了怕那些买网购的朋友不舒服也不想得罪一些网上的JS，</font></font><br>
<font size="4"><font color="red">他们都是做生意的，只想说厚道点，钱赚不完的，坑人太多不好。</font></font><br>
<font size="4"><font color="red">对贪便宜的机友我想说，其实你上当是活该，你明知道是忽悠你还去买，那明摆着你上当受骗。</font></font><br>
<font size="4"><font color="red">天下没有白吃的午餐，1900~2100就可以买到东西你都敢要，那么后果自负。</font></font><br>
<font size="4"><font color="red">给句忠告：“网购有风险，购机需谨慎。”</font></font><br>
<font size="4"><font color="red">现在G1很火，全新的机子也快没有了，还想入手G1的朋友还是不要贪便宜或是等着降价了。</font></font><br>
<font size="4"><font color="red">发个信息吧，&nbsp; &nbsp;G1全新纯白（不分版）：2550~2590</font></font><br>
<font size="4"><font color="red">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;G1全新黑色（不分版）：2470~2520</font></font><br>
<font size="4"><font color="red">低于这个价位的你自己权衡吧。</font></font><br>
<font size="4"><font color="red">私货市场就是这样的有便宜你占也有机会别人占，才会有生存。</font></font><br>
<font size="4"><font color="red">不要总是埋怨买不到理想的价位的好手机，有没有想过你自己的问题呢？</font></font><br>
<font size="4"><font color="red">不要像星爷那样后悔一万年。</font></font><br>
<font size="4"><font color="red">我希望JS能厚道点，G友能理智点，开开心心的买机子就是为了找乐子。</font></font><br>
<font size="4"><font color="red">写的这些希望有用，如果都是那样想去占便宜的心态，那么我也就没有再写下去的必要了，你们说呢？</font></font></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020108905722641</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020108905722641</guid>
    <pubDate>Thu, 9 Sep 2010 12:57:22 +0800</pubDate>
    <dcterms:modified>2010-09-09T12:57:22+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[G1真假电池大对比]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020108905439569</link>
    <description><![CDATA[<div><br> 呵呵 又说到<span href="http://www.hiapk.com/bbs/tag.php?name=%B5%E7%B3%D8"  class="t_tag"  >电池</span>了，又是我。最近同事新买的的G1，拿到我手里刷<span href="http://www.hiapk.com/bbs/tag.php?name=ROM"  class="t_tag"  >ROM</span>，发现他的电池居然是假的，和原厂的其实差别还是比较大的，纸张比较粗糙，字体也差很多，只要仔细一点查看还是很好分辨的。<br> <br> <font size="5"  >左真&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;右假</font><br> <br>   <span style="position: absolute; display: none;"  id="attach_2023"  ><img title="G1真假电池大对比 - enotsl - enotsl的博客"  alt="G1真假电池大对比 - enotsl - enotsl的博客"  src="http://www.hiapk.com/bbs/images/default/attachimg.gif"  border="0"  ></span>  <img title="G1真假电池大对比 - enotsl - enotsl的博客"  src="http://www.hiapk.com/bbs/attachment.php?aid=2023&amp;k=b0a7a78753b978160089626c67622dc4&amp;t=1284008034&amp;noupdate=yes&amp;sid=d62dgZtzK1aw3tV0oJLDtwWU87eHzFA0u87rFmnCaMtfDV4"  file="attachment.php?aid=2023&amp;k=b0a7a78753b978160089626c67622dc4&amp;t=1284008034&amp;noupdate=yes&amp;sid=d62dgZtzK1aw3tV0oJLDtwWU87eHzFA0u87rFmnCaMtfDV4"  thumbimg="1"  id="aimg_2023"  alt="假电池 (1).JPG"  >  <div id="aimg_2023_menu"  style="position: absolute; z-index: 999; clip: rect(auto, auto, auto, auto); left: 216px; top: 501px; display: none;"  > <a title="&#20551;&#30005;&#27744; (1).JPG" target="_blank" rel="nofollow" href="http://www.hiapk.com/bbs/attachment.php?aid=2023&amp;k=b0a7a78753b978160089626c67622dc4&amp;t=1284008034&amp;nothumb=yes&amp;sid=d62dgZtzK1aw3tV0oJLDtwWU87eHzFA0u87rFmnCaMtfDV4"  ><strong><span href="http://www.hiapk.com/bbs/tag.php?name=%CF%C2%D4%D8"  class="t_tag"  >下载</span></strong></a> (374.26 KB)<br>  <div>2009-4-21 15:58</div></div>  <br> 纸质有很大不同，假的明显粗糙，没有真品光滑<br> <br> <font size="5"  >左真&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;右假</font><br>   <span style="position: absolute; display: none;"  id="attach_2024"  ><img title="G1真假电池大对比 - enotsl - enotsl的博客"  alt="G1真假电池大对比 - enotsl - enotsl的博客"  src="http://www.hiapk.com/bbs/images/default/attachimg.gif"  border="0"  ></span>  <img title="G1真假电池大对比 - enotsl - enotsl的博客"  src="http://www.hiapk.com/bbs/attachment.php?aid=2024&amp;k=7cc44dcb00f55fc24ba24e5dd699a604&amp;t=1284008034&amp;noupdate=yes&amp;sid=d62dgZtzK1aw3tV0oJLDtwWU87eHzFA0u87rFmnCaMtfDV4"  file="attachment.php?aid=2024&amp;k=7cc44dcb00f55fc24ba24e5dd699a604&amp;t=1284008034&amp;noupdate=yes&amp;sid=d62dgZtzK1aw3tV0oJLDtwWU87eHzFA0u87rFmnCaMtfDV4"  thumbimg="1"  id="aimg_2024"  alt="假电池 (2).JPG"  >  <div id="aimg_2024_menu"  style="position: absolute; z-index: 999; clip: rect(auto, auto, auto, auto); left: 216px; top: 1046px; display: none;"  > <a title="&#20551;&#30005;&#27744; (2).JPG" target="_blank" rel="nofollow" href="http://www.hiapk.com/bbs/attachment.php?aid=2024&amp;k=7cc44dcb00f55fc24ba24e5dd699a604&amp;t=1284008034&amp;nothumb=yes&amp;sid=d62dgZtzK1aw3tV0oJLDtwWU87eHzFA0u87rFmnCaMtfDV4"  ><strong>下载</strong></a> (417.32 KB)<br>  <div>2009-4-21 15:58</div></div>  <br> 假的字迹模糊<br> <br> <font size="5"  >左真&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;右假</font><br>   <span style="position: absolute; display: none;"  id="attach_2025"  ><img title="G1真假电池大对比 - enotsl - enotsl的博客"  alt="G1真假电池大对比 - enotsl - enotsl的博客"  src="http://www.hiapk.com/bbs/images/default/attachimg.gif"  border="0"  ></span>  <img title="G1真假电池大对比 - enotsl - enotsl的博客"  src="http://www.hiapk.com/bbs/attachment.php?aid=2025&amp;k=e3a4d76b863cd24516673609cba6cf1b&amp;t=1284008034&amp;noupdate=yes&amp;sid=d62dgZtzK1aw3tV0oJLDtwWU87eHzFA0u87rFmnCaMtfDV4"  file="attachment.php?aid=2025&amp;k=e3a4d76b863cd24516673609cba6cf1b&amp;t=1284008034&amp;noupdate=yes&amp;sid=d62dgZtzK1aw3tV0oJLDtwWU87eHzFA0u87rFmnCaMtfDV4"  thumbimg="1"  id="aimg_2025"  alt="假电池.jpg"  ></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020108905439569</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020108905439569</guid>
    <pubDate>Thu, 9 Sep 2010 12:54:39 +0800</pubDate>
    <dcterms:modified>2011-09-29T00:17:41+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[Google G1 使用秘籍]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020108901223498</link>
    <description><![CDATA[<div><table style="table-layout: fixed; width: 100%;"><tbody><tr><tr><td><div id="blog_text"><p>Google G1手机如何硬起</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  注：硬起后 开机必须重新绑定google邮箱<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  1、关机状态下， 持续同时按住Home和红键，大约20s。<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  （此时机器会启动出现开始屏幕，等看到有个三角警告标示的黑屏时，放手，滑开键盘）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  2、按下Alt+L，（这个组合键的作用是显示log 文本）然后，按下 Alt+W 就是 “wipe data /factory <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  reset”，这个重启的效果是彻底重启，再启动就和刚开箱一样<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  3、最后同时按下Home 和返回键，这时候机器应该顺利重启了。 如果此时还不能重启，卸下电池再装上即可。</p>
<p><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Google G1 快捷键大全</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  1.长按home键会将当前程序置入背景运行<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  2.调整音量至最低，就会依次进入振动模式和电话铃声静音<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  3.当然，你也可以长按红键，在菜单里选择静音模式（此时全部静音，包括游戏和音乐）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  4.可以在Market里下载一个免费小软，ToggleSetting， 可以一键切换 WiFi开关 GPS开关， <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  振动模式开关，屏幕超时关闭开关，静音模式开关等，很方便！<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  5.通过快捷方式在桌面上创建的文件夹，可以通过点击并按住标题栏来重命名，方便归类存放各类快捷方式。（需要安装AnyCut，这个也是must <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  have app！！）<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  6.长按绿键，自动激活语音拨号， 当然是英文的.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  7.可以通过在sdcard里建立诸如 “ringtones”"alarms” <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  “notifications”，然后将铃声文件（ogg，mp3，wav，mid等）放进去，系统的选择声音就可以找到。当然，建议你装一个小软 <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  RingtoneExtended，比这种方法好用！<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  8.短信可以复制或是转发，在对话模式里选中某条sms后长按即可弹出菜单<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  9.输入时， 想删除一个词是， 可以menu+del，一次删除一个单位而不是删除一个字母</p>
<p><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Google G1省电技巧：</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  1. <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  首先我们可以尝试降低屏幕亮度，在平时的使用中可以通过降低亮度来减少电池的消耗，在手机设置中的“声音和显示”项目中找到“亮度”，然后滑动尺度条就可以设置Android手机的亮度<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  2.在中国大陆的用户不使用联通WCDMA <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  3G网路的用户可以在设置的“无线控件”中找到“移动网络设置”这项，进入后勾选“仅使用2G网络”，这样可以仅仅使用2G的GSM网络也可以减少电量消耗<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  3.关闭GPS全球定位， <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  这样可以节省电量达30%之多。操作方法仍然在设置中选择“安全性和位置”这项，进入后勾选第一项“使用无线网络”，取消勾选下面的“启用GPS卫星设置”即可<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  4.平时如果不使用Wi-Fi、蓝牙耳机都可以通过关闭这些选项来提高手机的待机时间，关闭WLAN搜索可以节省约30%~40%的待机时间。通过这样的设置，G1自带的电池还是能达到2-3天的续航能力的。</p>
<p><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Google G1 八大特色</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  1、近乎完美的地图服务</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  在电脑上的Google地图服务我们并不陌生，理所当然自家的Android平台更是兼容性极强，自然能得到更加完美的地图服务。用户可以从谷歌手机中快速找到简介准确的地图信息。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  2、街景服务</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  这个其他手机很难做到，将Google街景服务内置到手机当中绝对是谷歌手机的一个卖点，依靠手指在屏幕上移动来实现屏幕显示方向和角度变化，手拿手机平移的时候，街景会随着手机的移动跟着移动。能为徒步者提供步行导航。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  3、强大的搜索服务平台</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  肥水不留外人田，互联网上Google拥有的服务被全部移植到Google手机上，用户可以使用手机享受全部的Google搜索服务。支持WIFI让谷歌手机上网更是如虎添翼。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  4、直接移植电脑的Gmail服务</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Goole手机内置Gmail邮件服务。至少2GB的超大的免费存储空间让不在为收发邮件烦恼，同时支持将垃圾邮件过滤。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  5、全新的安全的浏览器</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  　　用手指双击屏幕缩小浏览的内容，长按某一区域即是放大，也可拖移那个长按屏幕后出现的框，放大所要浏览的板块。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  6、Android Market软件下载服务平台</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Android的下载服务虽然起步较晚，但但是更为贴心的考虑用户的使用感受。而且界面的华丽和实用程度都不输给APP界面</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  7、开放式操作系统</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Android包括操作系统、用户界面和应用程序等移动电话工作所需的全部软件，而且不存在任何阻碍移动产业创新的专有权限制。作为一个开放的平台，摩托罗拉、索尼爱立信、三星、LG等国际手机厂商都有意生产Android操作平台的手机。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  8、全键盘侧滑</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  谷歌手机支持手写键盘双输入，给用户多一种选择，在输入方面要比iPhone更快速方便，大大减少了错误操作</p>
<p><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Google G1 十大革命性软件</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  导语：与苹果的iPhone不同，谷歌手机的亮点并非是硬件，谷歌手机的软件显得更为重要。在谷歌手机发布之前，美国科技博客Gizmodo列举了Android系统上的十大应用程序。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  1、谷歌地图</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  　　地图的整合成为谷歌手机最瞩目的焦点，开发者可以通过GPS或者基站信息获取位置。基于内置的地图，用户可以获得全新的体验，开发者也能提供更多奇妙的服务。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  2、 Enkin</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
　　当很多人享受到位置服务的便利之后，他们可能会开始期待类似于Enkin这样的软件。你可以用手机录制视频并分享，其它用户可以通过Enkin来实时
查看。Enkin的界面与谷歌地球的三维地图类似，用户可以清楚地知道什么位置发生了什么事情。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  3、Locale</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  　　这是一款来自麻省理工学院的作品，也是谷歌Android手机软件大奖赛的得主。Locale可以根据用户所处位置调整手机设置，例如在剧院或电影院时自动关闭手机铃声。用户当然可以充分发挥想象力，利用Locale做更多事情。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  4、GeoLife</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  　　GeoLife是一款日程管理软件，通过自动辨别机主的位置信息而做出不同的提醒。只需简单地设置将会带来诸多便利，例如当你路过超市时，GeoLife会提醒你别忘了买牛奶。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  5、Ecorio</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  　　这也是一款获得27万美元奖金的程序。通过调用GPS信息，Ecorio会在后台运行，并计算你每天的碳排放。在积累了一定的数据之后，Ecorio便会根据你的习惯向你建议减少碳排放的小窍门，例如乘坐公交工具等。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  6、Cab4me</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  　　Cab4me会将你的位置信息发送到一个特定的数据库中，出租车公司会根据你的信息来调度最合适的车。不仅节省时间，也可以降低出租车公司的费用。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  7、BioWallet</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  　　并不是所有谷歌手机的应用程序都是基于地图的，BioWallet就是一款。BioWallet通过手机摄像头来扫描你的虹膜，利用生物加密技术保护敏感信息，例如银行帐号和密码等。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  8、CompareEverywhere and GoCart</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  　　通过该软件扫描商品的条码，就可以在数据库中查找商品信息，包括价格、库存等。你甚至可以找到哪家店的价格最低，更明智地消费。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  9、TuneWiki</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  　　这是一款音乐软件，你可以在和谐版的iPhone上找到它的身影。通过分析音乐文件的信息，它可以帮你准确地找到歌词和唱片封套。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  10、Teradesk e-Storage</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  　　类似与iPhone上的Air Share，此软件可以利用WiFi来传输文件。它的特色是与谷歌在线文档的整合，轻松实现云计算。</p>
<p> </p></div></td></tr></tr></tbody></table></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020108901223498</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020108901223498</guid>
    <pubDate>Thu, 9 Sep 2010 12:12:23 +0800</pubDate>
    <dcterms:modified>2010-09-09T12:12:23+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[google中国Android G1手机如何区分翻新货？]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020108923956202</link>
    <description><![CDATA[<div><p>1
‘外壳。 新机外壳接合紧凑密切，漏洞处平整平滑，无毛刺。 翻新呆板一般接纳仿原装外壳， 漏洞处不服整，有毛刺， 
手机外壳上下两部门容易呈现闭合不紧、留有很大漏洞的征象。辨别时可以用小手指头指甲测验考试着插进手机上下盖的接缝。如果能插入，就是翻新机。而对于外
壳外貌像新机同样摩挲，且有小颗粒的手机，更是千万不成采办。这类机子外壳的漆是 
JS喷上去的，时间一长，漆就会脱落（机壳上的尘埃小颗粒，是人工制造漆时没有真空情况功课酿成的）； <br>  二、新机掀开盖有一股淡淡的檀喷鼻味，若是翻新机， JS一般要对于机身举行一番使容貌美丽，外表只管平滑但不敷干燥，掀开盖或卸下干电池后有橡皮味，份子化合物塑料味，或化学剂的气息 ； <br>  三、 键盘和数值线接口。因为充电器插头、数值线持久插拔的缘故，翻新机充电接口会呈现难于消弭的玄色划痕。而键盘翻新机多接纳旧呆板上的键盘或是模仿键盘。这类键盘的共性是手抚摸时的感觉比力绵软，没有新机键盘的韧性；<br>  四、 充电试验。充电的时间最佳长一些，一般在 10分钟以上。因为有很多翻新机充电时间稍长就会断电。这也是判断翻新机1个颇有用的措施； <br>  五、 SIM卡芯片触点与干电池触点。这两个触点JS通常为没法改换的。若是翻新机，那末SIM卡芯片触点上就一定会留下清楚的磨擦陈迹，看起来发亮，这是摩掠过多而至。若是新机未用过的芯片，则触点表层应是摩挲的；</p>
六、 固定螺钉。首要看螺钉和刀口接口部门有无较着的划痕， 内屏下方的两个胶垫有无挑痕。 <br>  七、通话 质量。自带 SIM卡试机，打手机给你的伴侣，最佳是固定手机，问问对于方通话质量如何，通话声响是不是清楚，有无杂音、电流声，音量巨细有无猛然降落的征象； <br>  八、 代价。因为翻新机的零配件多为早期产物，质量也差，以是价格也低。如果碰到价格低患上离格而商家却称之为水货的手机，基本可以下确定的评论为翻新机。 <br>  综上所述，从行、水机的表里部特性，先容了行、水机的辨别要领。下篇作者将测验考试着如何从手机配件上甄别行、水机，和配件的选购经验。因为作者程度有限，错差之居于所不免，还望三星一族们攻讦指正。<br>  附： 三星手机进网允许证、设备批准号头一览表（1、二） ，受前提所限，作者不克不及给出表中所列栏目的全数内部实质意义，个体数值另要等待进一步核实。但愿有识之士可以兴许联袂配合完成作者没有完成的事情。<br>
  
导航键摆布标的目的键上各有1个下凹的信皮儿标记与五线谱图标，是三星正行、水行、港行手机具备的外部特性之一，已经往咱们可以依附这一点儿辨别三星行、
水手机，但此刻看来是不行了，因为，作者发明三星新近推出的三星 
T400、T500（T40八、T508水改机型）导航键摆布标的目的键上也有了下凹的信皮儿标记与五线谱图标。 <br>  三、键盘。三星正行、水行、港行手机键盘上均有中文笔画，中文笔 <br>
  
划与统1个按钮的英书契母位置协调，每1个中文笔画都在中心阿谁字母的正上方，且数码、字母与笔同等律透光。这也是三星正行、水行、港行手机所具备的外部
特性之一。水改机键盘上一般无笔画，在T400、T500以前的英文版手机笔同等般都是JS后加之去的，因为“水机”键盘在预设时就让英书契母居中，后加
的中文笔同等定要靠上，偏左或偏右，有强迫接受、挤压之感，外不雅色彩要比数码、字母要深一些，且一般不透光的。而此刻除开英文版T400、T500外，
大都水改机的键盘同样领有透光笔画了。是以，在此提示各人采办时必患上注重， 没瓜葛试着用指甲刮一下键盘上的笔画，如果有脱落征象则证实是水改货。 <br>  别的，新机键盘的手抚摸时的感觉，比力有韧性、弹性，而二手机施用起来则感应比力绵软，没有新机的韧性。 <br>
  四、PCB电路板标识与 手机违帖 。三星正行、水行、港行手机，一般要在 SIM 卡槽内 
PCB电路板上示明上该手机的型号，如SGH—S30八、SGH-S20八、SGH-T10八、SGH-T408等等，而欧罗巴洲版的SGH-300、
SGH-S200、SGH-T100、SGH-T400等手机则别离示明的是SGH-S300、SGH-S200、SGH-T100、SGH-T400。
另有一些三星正行、水行、港行手机，如T20八、S108等等，虽则没有在PCB电路板上示明上该手机的型号，可是，在握机违贴上示明的类型
（TYPE）、SSN的后面，或手机序列号S/N的前边，一定会示明着该手机的型号。 <br>  一般行货反面机身螺钉口那儿会贴有1个白的色彩的棉质的胶贴，上边写着 “ 维修标贴，撕破毁掉失效 ”8 个汉字。 <br>  固然，仅凭违贴来判断是不是是行、水手机也是不敷的，因为， JS纯粹有手眼改换这个违贴的。作者就曾经自己看眼见了一部三星S100手机违贴上示明着S108。 <br>  固然，行、水行、港行手机上的违贴与欧罗巴洲版手机，和 JS后贴上去的违贴照旧有区分的， 细心不雅察照旧会发明水改机的 IMEI号头印刷患上较恍惚，而行货的印刷则清楚可见。 <br>
  5 、 手机 IMEI 码 。 IMEI(International Mobile Equipment Identity) 
是国际移动设备身份码的减写，国际移动设备辨识码，是由 15 
位数码构成的“电子串号”，它与每台手机逐一对于应，并且该码是全球独一的。每只手机在组装完成后都将被付与1个全球独一的一组号头，这个号头从出产到交
给施用都将被打造出产的厂商所记载。<br>  其构成为 123456-78-901234-5: 前 6 位数是“型号批准号头”，一般代表机型； 7
 、 8 位数是“最后装置号”，一般代表产地；然后的 6 位数是“串号”，一般代表出产挨次号；最后 1 位数凡是是“ 0 
”，为查验码，今朝暂备用。 IMEI 
码贴在握机反面的标记上，并且读写于手机内存中。它也是该手机在厂家的“档案”和“身份证号”。此刻三星新推出的机型一般都在查验码的后面又新增了两位数
码。好比这个 IMEI 码是： 351005/89/059521/9…01 。 <br>  查敌手机 IMEI 码，应先输入 *#06# 
，查看手机内存中的 IMEI 码，记住这个号头，然后输入 *2767*3855# 举行码片复位，手时机不佣人的劳力重启，最后再输入 *#06# 
，查看这个 IMEI 码有无转变，如果这个号头与手机违贴、外包装盒上的 IMEI 码相符， 且型号批准号头与手机型号相符 
，就证实是原厂正统派货。如果纷歧致，或酿成为了一串杂乱的符号，或指令不被执行，则证实该手机若非水改机，若非翻新机。后者码片复位功效已经被 JS 
屏蔽失了</div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020108923956202</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020108923956202</guid>
    <pubDate>Thu, 9 Sep 2010 02:39:56 +0800</pubDate>
    <dcterms:modified>2010-09-09T02:40:04+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[怎样查google手机htc g1序列号]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020108922618359</link>
    <description><![CDATA[<div>输入 *#06# ，查看手机内存中的 IMEI 码，记住这个号码，然后输入 *2767*3855# 进行码片复位，手机会自动重启，最后再输入 
*#06# ，查看这个 IMEI 码有没有改变，如果这个号码与手机背贴、外包装盒上的 IMEI 码一致， 且型号核准号码与手机型号一致 
，就证明是原厂正宗货。如果不一致，或者变成了一串乱码，或指令不被执行，则证明该手机要么是水改机，要么是翻新机</div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020108922618359</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020108922618359</guid>
    <pubDate>Thu, 9 Sep 2010 02:26:18 +0800</pubDate>
    <dcterms:modified>2010-09-09T16:33:31+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[G1手机完全导购！辨别翻新分清美版英版]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020108922317822</link>
    <description><![CDATA[<div>         <ul><li>作者：Tmobile</li><li>人气指数： 17,510  </li><li>时间：2010-02-18</li></ul>         <div><dl><dt>小编有话说：</dt><dd>现在G1主要分为英版和美版，市面上的G1大部分都是美国版，很少能见到英国版本的。到现在为止我只帮朋友买过一台英国版白色的G1。</dd></dl></div>                       <div>           <p>一直对硬件很感兴趣，也帮身边的朋友买过两台G1了，算是有一些经验了。（文章里的图片，一部分是自己拍摄，一部分是网上找到的）</p> <p>现在G1主要分为英版和美版，市面上的G1大部分都是美国版，很少能见到英国版本的。到现在为止我只帮朋友买过一台英国版白色的G1。</p> <p><strong>1.外包装</strong></p> <p>英版美版外包装完全不一样：</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_001.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>这个是美版的外包装，市面上大多是这种包装，里外两层，大家要注意，外包装机器的颜色根据自己机器颜色不同，外包装上印刷机器的颜色也不一样。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_002.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_003.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>这个就是英版白色G1的包装了，也是里外两层，外层是白色，内层是黑色的包装。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_004.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>里面的包装完全不一样，上面白色为美版，下面黑色为英版。个人感觉英版包装质量更好。</p> <p>大家可能发现了我没有说查验外包装，其实现在几码合一并不重要，深圳的水货商家可以随便印制各种包装，一味关注机器码已经没有意义了。而且一般我们 拿到的G1都是拆过包装的，封条已经被破坏了，这是因为商家需要输入解锁码，或者刷机，所以必须打开机器包装，大家可以不必太在意。只要看好外包装是否完 整就可以了，另外还可以注意说明书是否齐全。</p><p><br></p><div>             <p>&nbsp;</p> <p><strong>2.配件</strong></p> <p>主要配件基本是一样的都是充电器 数据线 和 分体式的耳机。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_005.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>美版全套</p> <p>两个版本最大的不同就是充电器了。</p> <p>下图是美版的充电器，是普通三项的。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_006.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>这个就是英版充电器了，是三项的。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_007.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>还有一个细节值得大家注意，G1原带的数据线是和G1机器上的接口一致的，只有一个边是倾斜的，而不是普通的梯形的MINI-USB。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_008.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>关于其它附件，英版白色G1还是给了我一个小惊喜的，附件里有两张T-MOBILE贴纸，很漂亮。不过白色版的G1要比其他颜色贵上一些。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_009.jpg"  align="baseline"  border="0"  hspace="0"  ></p><p align="center"  ><br></p><p><strong>3.主机版本区分</strong></p> <p>现在G1有4种配色，分别是黑色 棕色 英版白色 美版白色。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_010.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_011.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_012.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_013.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>下图就是白色的美版G1 和英版最大的区别就是按键和后盖颜色不一样，美版按键是银灰色的，后盖也是银灰色的。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_014.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>建议最好不要购买银色键盘的棕色和美版G1，因为按下键盘后会亮起白色的键盘灯，灯颜色和按键颜色差不多，很影响输入。</p> <p>5.22日更新 英版机器辨别小方法</p> <p>最近在<span><a target="_blank" rel="nofollow" href="http://sj.bbs.91.com/"  >论坛</a></span>看到hellopang的帖子——大家看看我买的G1是不是翻新机?</p> <p>其实帖子里的机器并不是翻新机，而是一台英版 黑色 G1,这台机器有以下几个特征。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_015.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>英版机器（包括白色）在T-Mobile 这个LOGO之前是三个点，而美版只有一个点</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_016.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>英版机器的功能按钮都只有一个颜色，接听挂断按键都是白色的，而美版接听按键为绿色，挂断按键为红色</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_017.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>机器侧面没有 HTC 标识，看来英版还是相当 “T-Mobile”的，连HTC的标志都没有</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_018.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>另外黑色英版 G1 的键盘区域材质也和美版黑色G1的材质不同，英版是光滑的，而不是美版那种磨砂的。</p>                     <br><p><strong>4.验机</strong></p> <p>再来说验机，滑开机器看屏幕后部是否贴膜，全新的机器一般都有贴膜的，如果没有贴膜也要仔细查看是否有划痕。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_019.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>大家同时也要注意后盖的摄像头位置有没有贴膜。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_020.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>下图是我自己的机器，如果使用过的话，屏幕后面的面板就会有划痕的，建议大家屏幕后部贴上保护贴。</p> <p>还有大家要注意凹槽的边缘是否有掉漆的现象出现。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_021.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>屏幕和键盘之间的接缝越小越好，而且接缝要均匀，有机会的话多挑几台，来回多滑动几次屏幕，感觉一下是否顺畅，有无异响，屏幕滑出后是否稳固。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_022.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>G1自带的贴膜感觉还是挺好用的，买的时候注意看有没有气泡，原装的机器应该是没有气泡的，而且贴膜顶端是会突出一些的（如图）。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_023.jpg"  align="baseline"  border="0"  hspace="0"  ></p><p align="center"  ><br></p><p><strong>5.电池</strong></p> <p>现在市面上已经有假电池出现，但还谈不上高仿，很容易分辨。</p> <p>以下图中左为真电池 右为假电池。</p> <p>假电池和原厂电池其实差别还是比较大的，纸张比较粗糙，字体也差很多，只要仔细一点查看还是很好分辨的。</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_024.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>纸质有很大不同，假的明显粗糙，没有真品光滑</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_025.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>假的字迹模糊</p> <p align="center"  ><img title="G1手机完全导购！辨别翻新分清美版英版 - enotsl - enotsl的博客"  alt=""  src="http://image.91.com/android.sj/2010/02/19/and_jc_g1sb_026.jpg"  align="baseline"  border="0"  hspace="0"  ></p> <p>触点旁边贴纸也有所差别。</p> <p>现在随着G1上市时间的增长，原厂电池根据批次也有所不同，不过做工都是很细致的，只要仔细一些都可以比较轻松的鉴别出电池的真伪。</p> <p>一般我们刚拿到的机器电池触点也会有轻微的痕迹，是因为商家需要刷机或破解，所以会用到电池。起码我见过的三台机器电池触点都是有轻微痕迹的，如果痕迹很重的话大家就要注意了。</p> <p><strong>6.价格</strong></p> <p>关于价格现在差不多在2700左右，物以稀为贵所以白色的机器会比较贵，大概会比普通机器贵150～200元，不过我还是很口水白色继起的，现在大家能买到最多的就是黑色版本的。</p><br>    </div>    </div></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020108922317822</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020108922317822</guid>
    <pubDate>Thu, 9 Sep 2010 02:23:17 +0800</pubDate>
    <dcterms:modified>2011-09-24T12:42:38+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[查看G1版本信息详细教程：]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020108922023308</link>
    <description><![CDATA[<div><font face="宋体 "><b>以下是查看G1版本信息详细教程：</b>
<br>
<br>　　<b>1</b>.一般来说，手机的版本信息都是放在设置功能里的，所以请打开G1主菜单，找到并开启“Setting”图标。然后在G1设置界面的最底下，点击进入“<b>About phone</b>”。
<br>
<br></font><div align="left"><font face="宋体 ">    <b>2</b>.在<b>About phone</b>里有非常详细的G1各种版本状态的信息，以下是各个栏目的功能介绍：</font></div>
<font face="宋体 "><br></font><div align="left"><font face="宋体 ">　　Status：包含有G1的基本信息，包括IMEI码、手机序列号、剩余电量等等。详细请看第3点介绍。</font></div><div align="left"><font face="宋体 ">　　Legal information：HTC、系统开源及谷歌的一些基本介绍。</font></div><div align="left"><font face="宋体 ">　　Contributors：G1的一些赞助商、制造商、制作人员的一些介绍。</font></div><div align="left"><font face="宋体 ">　　Model number：这里显示的是手机的型号。例如T-Mobile G1</font></div><div align="left"><font face="宋体 ">　　Firmware version：Android系统的固件版本。在未来的固件升级中会经常遇到的。</font></div><div align="left"><font face="宋体 ">　　Baseband version：G1的Baseband版本，和固件有关系。每次固件的升级，Baseband都会不同，这会在未来的固件升级中体现出啦的。</font></div><div align="left"><font face="宋体 ">　　Kernel version：是Android内核版本。</font></div><div align="left"><font face="宋体 ">　　<span style="color: rgb(255, 0, 0);">Build number：</span>这是谷歌内部版本控制信息。</font></div><div align="left"><font face="宋体 ">由于最近谷歌几次升级仅仅是打“补丁”的方式升级，所以固件没有改变，改变的只是Build number。现在比较常见的<span style="color: Red;">Build number</span>是“<span style="color: Blue;">RC19</span>”、“<span style="color: Blue;">RC29</span>”、“<span style="color: Blue;">RC30</span>”，会经常出现在越狱教程中，所以现阶段这里是非常需要大家关注的地方。</font></div>
<font face="宋体 "><br></font><div align="left"><font face="宋体 ">    <b>3</b>.这里再介绍一下Status里的各个栏目的功能介绍：</font></div>
<font face="宋体 "><br></font><div align="left"><font face="宋体 ">　　Battery status：电池充电/未充电状态</font></div><div align="left"><font face="宋体 ">　　Battery level：电池剩余电量</font></div><div align="left"><font face="宋体 ">　　Phone number：手机序列号</font></div><div align="left"><font face="宋体 ">　　Network：所处的移动网络</font></div><div align="left"><font face="宋体 ">　　Signal strength：信号度</font></div><div align="left"><font face="宋体 ">　　Network type：网络制式</font></div><div align="left"><font face="宋体 ">　　Service state：所在服务区</font></div><div align="left"><font face="宋体 ">　　Roaming：漫游/未漫游</font></div><div align="left"><font face="宋体 ">　　Data access：共访问的数据大小</font></div><div align="left"><font face="宋体 ">　　IMEI：IMEI码。可以跟盒子上的IMEI码比较一下，如果是一样的，就是对的了</font></div><div align="left"><font face="宋体 ">　　IMEI SV：IMEI码的版本</font></div><div align="left"><font face="宋体 ">　　IMSI：国际移动用户识别码</font></div><div align="left"><font face="宋体 ">　　Wi-Fi  Mac address：G1无线Wi-Fi网络的Mac地址。</font></div><div align="left"><font face="宋体 ">　　Bluetooth address：蓝牙地址</font></div><div align="left"><font face="宋体 ">　　Up time：正常运行时间</font></div><div align="left"><font face="宋体 ">　　Awake Time：手机唤醒时间</font></div><font face="宋体 "><br></font></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020108922023308</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020108922023308</guid>
    <pubDate>Thu, 9 Sep 2010 02:20:23 +0800</pubDate>
    <dcterms:modified>2010-09-09T02:20:48+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[FF 上传预览图片]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/900590602009111373952175</link>
    <description><![CDATA[<div><pre>&lt;<span>input</span><span> type</span>=<span>"file" </span><span>on<wbr>change</span>=<span>'ShowImg(this)' </span><span><span>/</span></span>&gt;<br>&lt;<span>img</span><span> id</span>=<span>"idImg" </span><span>style</span>=<span>"display:none;" </span><span><span>/</span></span>&gt;<br>&lt;<span>script</span>&gt;<br>function ShowImg(o){    <br>   document.getElementById("idImg").src = o.files[0].getAsDataURL();    <br>   document.getElementById("idImg").style.display = "block";<br>}<br>&lt;/<span>script</span>&gt;</pre></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/900590602009111373952175</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/900590602009111373952175</guid>
    <pubDate>Sun, 13 Dec 2009 19:39:52 +0800</pubDate>
    <dcterms:modified>2009-12-13T19:39:52+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[Mousewheel Zooms in Silverlight 2.0 ]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/900590602008102855712411</link>
    <description><![CDATA[<div><h2>A
few weeks ago I posted a short code sample demonstrating how to do
mousewheel zooms in Silverlight 1.1. They're easier to do in
Silverlight 2.0 and can be done without calling out of managed code,
thanks to the new HtmlWindow class (and the HtmlPage.Window property,
which returns a reference to an HtmlWindow).</h2>
 
 
  
<p>Here's a summary. First, assume you have a ScaleTransform that facilitates zooms:</p>
<p><font face="Courier New"><font color="#0000ff">&lt;</font><span style="font-size: 10pt; color: rgb(163, 21, 21); font-family: 'Courier New';">ScaleTransform</span></font><span style="font-size: 10pt; color: blue; font-family: 'Courier New';"> </span><span style="font-size: 10pt; color: red; font-family: 'Courier New';">x:Name</span><span style="font-size: 10pt; color: blue; font-family: 'Courier New';">=</span><span style="font-size: 10pt; font-family: 'Courier New';">"<span style="color: blue;">ZoomTransform</span>"<span style="color: blue;"> /&gt;</span></span></p>
<p>Next, when the page loads, use HtmlWindow.AttachEvent to register a managed handler for mousewheel events:</p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; color: rgb(43, 145, 175); font-family: 'Courier New';">HtmlPage</span><span style="font-size: 10pt; font-family: 'Courier New';">.Window.AttachEvent(<span style="color: rgb(163, 21, 21);">"DOMMouseScroll"</span>, OnMouseWheelTurned);</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; color: rgb(43, 145, 175); font-family: 'Courier New';">HtmlPage</span><span style="font-size: 10pt; font-family: 'Courier New';">.Window.AttachEvent(<span style="color: rgb(163, 21, 21);">"onmousewheel"</span>, OnMouseWheelTurned);</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; color: rgb(43, 145, 175); font-family: 'Courier New';">HtmlPage</span><span style="font-size: 10pt; font-family: 'Courier New';">.Document.AttachEvent(<span style="color: rgb(163, 21, 21);">"onmousewheel"</span>, OnMouseWheelTurned);</span></p>
<p>
</p><p>Here's the event handler that responds to mousewheel events by manipulating the ScaleTransform:</p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; color: blue; font-family: 'Courier New';">private</span><span style="font-size: 10pt; font-family: 'Courier New';"> <span style="color: blue;">void</span> OnMouseWheelTurned(<span style="color: rgb(43, 145, 175);">Object</span> sender, <span style="color: rgb(43, 145, 175);">HtmlEventArgs</span> args)</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">{</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">double</span> delta = 0;</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span><span style="color: rgb(43, 145, 175);">ScriptObject</span> e = args.EventObject;</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">&nbsp;</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">if</span> (e.GetProperty(<span style="color: rgb(163, 21, 21);">"wheelDelta"</span>) != <span style="color: blue;">null</span>) <span style="color: green;">// IE and Opera</span></span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>{</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>delta = ((<span style="color: blue;">double</span>)e.GetProperty(<span style="color: rgb(163, 21, 21);">"wheelDelta"</span>));</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">if</span> (<span style="color: rgb(43, 145, 175);">HtmlPage</span>.Window.GetProperty(<span style="color: rgb(163, 21, 21);">"opera"</span>) != <span style="color: blue;">null</span>)</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>delta = -delta;</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">else</span> <span style="color: blue;">if</span> (e.GetProperty(<span style="color: rgb(163, 21, 21);">"detail"</span>) != <span style="color: blue;">null</span>) <span style="color: green;">// Mozilla and Safari</span></span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>{</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>delta = -((<span style="color: blue;">double</span>)e.GetProperty(<span style="color: rgb(163, 21, 21);">"detail"</span>));</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">&nbsp;</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">if</span> (delta &gt; 0)</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>{</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: green;">// Zoom in</span></span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ZoomTransform.ScaleX += 0.1;</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ZoomTransform.ScaleY += 0.1;</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">else</span> <span style="color: blue;">if</span> (delta &lt; 0)</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>{</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: green;">// Zoom out</span></span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ZoomTransform.ScaleX -= 0.1;</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ZoomTransform.ScaleY -= 0.1;</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">&nbsp;</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span><span style="color: blue;">if</span> (delta != 0)</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>{</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>args.PreventDefault();</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>e.SetProperty(<span style="color: rgb(163, 21, 21);">"returnValue"</span>, <span style="color: blue;">false</span>);</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';"><span style="">&nbsp;&nbsp;&nbsp; </span>}</span></p>
<p  style="margin: 0in 0in 0pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New';">}</span></p>
<p>
</p><p>Anything affected by the ScaleTransform will now scale up and down with mousewheel movements.</p></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/900590602008102855712411</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/900590602008102855712411</guid>
    <pubDate>Fri, 28 Nov 2008 17:57:12 +0800</pubDate>
    <dcterms:modified>2008-11-28T17:57:12+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[Resizing a Silverlight canvas]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/900590602008102611162553</link>
    <description><![CDATA[<div><div  ><div >  <p>I expected to find a simple way of defining what happens when the canvas container is resized.  Something similar to the <code>Loaded</code>  attribute. But it’s a little more complicated than that. We need to  handle the event in JavaScript and call our managed code to do the  actual resizing from there.</p>  <p>First we <a rel="nofollow" href="http://silverlight.net/QuickStarts/Dom/ManagedCodeAccess.aspx"  >set up the managed code to make it callable from JavaScript</a>.  To do this you need include to add the <code>[Scriptable]</code> tag to your class and all methods that will be called from JavaScript (<code>[Scriptable]</code> is in <code>System.Windows.Browser</code>).  Then, in the page loaded method, register the scriptable methods using <code>WebApplication.Current.RegisterScriptableObject</code>.</p>  <div ><ol  start="1"  ><li ><span><span>[Scriptable]&nbsp;&nbsp;</span></span></li><li ><span><span >public</span><span>&nbsp;partial&nbsp;</span><span >class</span><span>&nbsp;Page&nbsp;:&nbsp;Canvas&nbsp;&nbsp;</span></span></li><li ><span>{&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;Canvas&nbsp;canvas;&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >public</span><span>&nbsp;</span><span >void</span><span>&nbsp;Page_Loaded(</span><span >object</span><span>&nbsp;o,&nbsp;EventArgs&nbsp;e)&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InitializeComponent();&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;canvas&nbsp;=&nbsp;o&nbsp;<span >as</span><span>&nbsp;Canvas;&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span >//&nbsp;This&nbsp;will&nbsp;allow&nbsp;the&nbsp;Scriptable&nbsp;methods&nbsp;in&nbsp;this&nbsp;class&nbsp;to&nbsp;be&nbsp;called&nbsp;from&nbsp;JavaScript</span><span>&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WebApplication.Current.RegisterScriptableObject(<span >"basic"</span><span>,&nbsp;</span><span >this</span><span>);&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;[Scriptable]&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >public</span><span>&nbsp;</span><span >void</span><span>&nbsp;Resize(</span><span >int</span><span>&nbsp;x,&nbsp;</span><span >int</span><span>&nbsp;y)&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span >//&nbsp;resizing&nbsp;code&nbsp;goes&nbsp;here</span><span>&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li><li ><span>}&nbsp;&nbsp;</span></li></ol></div>[Scriptable]  public partial class Page : Canvas  {   Canvas canvas;   public void Page_Loaded(object o, EventArgs e)   {    InitializeComponent();    canvas = o as Canvas;      // This will allow the Scriptable methods in this class to be called from JavaScript    WebApplication.Current.RegisterScriptableObject("basic", this);   }     [Scriptable]   public void Resize(int x, int y)   {    // resizing code goes here   }  }    <p>Now we can call <code>Resize</code> from JavaScript. All we have to  do is set up the event handler. But you can’t declare the event handler  in the events section of <code>Silverlight.createObjectEx</code>.  I decided to use an old-fashioned JavaScript event handler:</p>  <div ><ol  start="1"  ><li ><span><span>window.onresize&nbsp;=&nbsp;</span><span >function</span><span>()&nbsp;{&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >var</span><span>&nbsp;control&nbsp;=&nbsp;document.getElementById(</span><span >"SilverlightControl"</span><span>);&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >var</span><span>&nbsp;frame&nbsp;=&nbsp;document.getElementById(</span><span >"body"</span><span>);&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >var</span><span>&nbsp;x&nbsp;=&nbsp;frame.clientWidth;&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >var</span><span>&nbsp;y&nbsp;=&nbsp;frame.clientHeight;&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >var</span><span>&nbsp;foo&nbsp;=&nbsp;control.Content.basic.Resize(x,&nbsp;y);&nbsp;&nbsp;</span></span></li><li ><span>}&nbsp;&nbsp;</span></li></ol></div>window.onresize = function() {   var control = document.getElementById("SilverlightControl");   var frame = document.getElementById("body");   var x = frame.clientWidth;   var y = frame.clientHeight;   var foo = control.Content.basic.Resize(x, y);  }    <p>This works when the window is resized, but it won’t work if the  canvas container is resized for some other reason. I’ll get to a better  solution in a minute, but first let’s look at how it works, because  we’re going to keep the contents of the function.</p>  <p><code>SilverlightControl</code> is the id of the Silverlight object, as defined in the <code>createObjectEx</code> call.  <code>Content.basic.Resize</code> is created in the C# code above.  “basic” could be anything, but I stuck with what I saw in the tutorial I read.</p>  <p>This almost gets the job done, but it’s better to use the  Silverlight resize event. The only way I could find to do this is to  set it up in JavaScript after the Silverlight object is created.</p>  <div ><ol  start="1"  ><li ><span><span >function</span><span>&nbsp;onLoad(sender,&nbsp;args)&nbsp;{&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >//&nbsp;set&nbsp;up&nbsp;the&nbsp;resize&nbsp;event&nbsp;handler</span><span>&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >var</span><span>&nbsp;control&nbsp;=&nbsp;document.getElementById(</span><span >"SilverlightControl"</span><span>);&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;control.Content.onResize&nbsp;=&nbsp;onResized;&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >//&nbsp;resize&nbsp;right&nbsp;away</span><span>&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;onResized();&nbsp;&nbsp;</span></li><li ><span>}&nbsp;&nbsp;</span></li></ol></div>function onLoad(sender, args) {   // set up the resize event handler   var control = document.getElementById("SilverlightControl");   control.Content.onResize = onResized;      // resize right away   onResized();  }    <p><code>onLoad</code> is the function called when the object is created, as specified in the <code>createObjectEx</code> call.  And <code>Content.onResize</code> is the resize handler, which unfortunately isn’t in Intellisense, but is in the <a rel="nofollow" href="http://msdn2.microsoft.com/en-us/library/bb412400.aspx"  >MSDN article on Silverlight resizing</a>, which appears to be very incomplete and incorrect.</p>  <p>Now just create another JavaScript function with the same code as  the resize handler above, and we’re good to go. All that’s left is to  actually resize the canvas and the objects. If you just want everything  to scale with the canvas, you can use a <code>ScaleTransform</code> and set <code>ScaleX</code> and <code>ScaleY</code> in the C#.  The XAML:</p>  <div ><ol  start="1"  ><li ><span><span >&lt;</span><span >Canvas</span><span>&nbsp;</span><span >Name</span><span>=</span><span >"frame"</span><span >&gt;</span><span>&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >&lt;</span><span >Canvas.RenderTransform</span><span >&gt;</span><span>&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span >&lt;</span><span >ScaleTransform</span><span>&nbsp;</span><span >x:Name</span><span>=</span><span >"scale"</span><span>&nbsp;</span><span >ScaleX</span><span>=</span><span >"1"</span><span>&nbsp;</span><span >ScaleY</span><span>=</span><span >"1"</span><span>&nbsp;</span><span >/&gt;</span><span>&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >&lt;/</span><span >Canvas.RenderTransform</span><span >&gt;</span><span>&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >&lt;!--&nbsp;objects&nbsp;go&nbsp;here&nbsp;--&gt;</span><span>&nbsp;&nbsp;</span></span></li><li ><span><span >&lt;/</span><span >Canvas</span><span >&gt;</span><span>&nbsp;&nbsp;</span></span></li></ol></div>&lt;Canvas Name="frame"&gt;   &lt;Canvas.RenderTransform&gt;    &lt;ScaleTransform x:Name="scale" ScaleX="1" ScaleY="1" /&gt;   &lt;/Canvas.RenderTransform&gt;   &lt;!-- objects go here --&gt;  &lt;/Canvas&gt;    <p>And the C#:</p>  <div ><ol  start="1"  ><li ><span><span >public</span><span>&nbsp;</span><span >void</span><span>&nbsp;Resize(</span><span >int</span><span>&nbsp;x,&nbsp;</span><span >int</span><span>&nbsp;y)&nbsp;&nbsp;</span></span></li><li ><span>{&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >//&nbsp;set&nbsp;the&nbsp;canvas&nbsp;width</span><span>&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;Width&nbsp;=&nbsp;x;&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;Height&nbsp;=&nbsp;y;&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;<span >//&nbsp;scale&nbsp;the&nbsp;objects&nbsp;appropriately</span><span>&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;ScaleTransform&nbsp;st&nbsp;=&nbsp;(ScaleTransform)canvas.FindName(<span >"scale"</span><span>);&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;st.ScaleX&nbsp;=&nbsp;(<span >double</span><span>)x&nbsp;/&nbsp;640.0;&nbsp;&nbsp;</span></span></li><li ><span>&nbsp;&nbsp;&nbsp;&nbsp;st.ScaleY&nbsp;=&nbsp;(<span >double</span><span>)y&nbsp;/&nbsp;480.0;&nbsp;&nbsp;</span></span></li><li ><span>}&nbsp;&nbsp;</span></li></ol></div>public void Resize(int x, int y)  {   // set the canvas width   Width = x;   Height = y;      // scale the objects appropriately   ScaleTransform st = (ScaleTransform)canvas.FindName("scale");   st.ScaleX = (double)x / 640.0;   st.ScaleY = (double)y / 480.0;  }    <p>In this case, the canvas starts at 640×480, so our scale factors are based on those numbers.</p>  <p><img  title="Resizing a Silverlight canvas - enotsl - enotsl的博客"  src="http://www.arguingwithmyself.com/wordpress/wp-content/uploads/2007/11/silverlightresize.png"  alt="Resizable Silverlight example"  ></p>  <p>That’s all there is to it.  <a title="silverlightresize.zip" rel="nofollow" href="http://www.arguingwithmyself.com/wordpress/wp-content/uploads/2007/11/silverlightresize.zip"  >Here is the project I made</a>, which includes a slightly more complex Resize method.</p>     </div>Let’s say you want your Silverlight canvas to resize to fill the browser window, or at least to fill its container.    </div></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/900590602008102611162553</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/900590602008102611162553</guid>
    <pubDate>Wed, 26 Nov 2008 23:16:02 +0800</pubDate>
    <dcterms:modified>2011-09-23T18:13:37+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[使silverlight适应IE窗口大小的方法 ]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020081026111346435</link>
    <description><![CDATA[<div><h2>Pete Brown在它的BLOG中提到了一个按自定义比例使用silverlight适应IE窗口大小的方法<br></h2><font size="2">
&nbsp; &nbsp; </font><font size="2">其核心代码如下（<font style="font-size: 10pt;">Xaml</font></font><font style="font-size: 10pt;">）：<div ><span  code0'));">复制内容到剪贴板</span><h5>代码:</h5><code >&nbsp; &nbsp; &lt;UserControl x:Class="eteBrown.SilverlightScalingExample.Page"<br>
&nbsp; &nbsp; xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"<br>
&nbsp; &nbsp; xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"<br>
&nbsp; &nbsp; &gt;<br>
&nbsp; &nbsp;<br>
&nbsp; &nbsp; &lt;Grid x:Name="LayoutRoot"<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; Background="Cornsilk" ShowGridLines="True"<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; Width="400" Height="300"<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; RenderTransformOrigin="0.5 0.5"&gt;<br>
&nbsp; &nbsp;&nbsp; &nbsp; <br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;Grid.RenderTransform&gt;<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&lt;ScaleTransform x:Name="ageScale" ScaleX="1" ScaleY="1"/&gt;<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;/Grid.RenderTransform&gt;<br>
&nbsp; &nbsp;&nbsp; &nbsp; <br>
…<br>
&nbsp; &nbsp; &lt;/Grid&gt;<br>
&lt;/UserControl&gt;</code></div></font><br>
<font style="font-size: 10pt;"><div ><span  code1'));">复制内容到剪贴板</span><h5>代码:</h5><code > <br>
public partial class Page : UserControl<br>
{<br>
&nbsp; &nbsp; // this is the aspect ratio we want to maintain<br>
&nbsp; &nbsp; // you can specify this all sorts of ways, but the<br>
&nbsp; &nbsp; // easiest is to take the original size and divide<br>
&nbsp; &nbsp; // X by Y (4:3 or 1.333 in this case)<br>
&nbsp; &nbsp; private const double _originalWidth = 400;<br>
&nbsp; &nbsp; private const double _originalHeight = 300;<br>
&nbsp; &nbsp; private const double _originalAspectRatio =<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;_originalWidth / _originalHeight;<br>
&nbsp; &nbsp; public Page()<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;InitializeComponent();<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;// wire up the event handler. This is a great addition<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;// to silverlight, as you used to have to hook into the<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;// browser event yourself<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;SizeChanged += new SizeChangedEventHandler(Page_SizeChanged);<br>
&nbsp; &nbsp; }<br>
&nbsp; &nbsp; void Page_SizeChanged(object sender, SizeChangedEventArgs e)<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;if (e.NewSize.Width &lt; _originalWidth ||<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;e.NewSize.Height &lt; _originalHeight)<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// don't shrink<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;PageScale.ScaleX = 1.0;<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;PageScale.ScaleY = 1.0;<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;}<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;else<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;{<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;// resize keeping aspect ratio the same<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if (e.NewSize.Width / e.NewSize.Height &gt; _originalAspectRatio)<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;{<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; // height is our constraining property<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; PageScale.ScaleY = e.NewSize.Height / _originalHeight;<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; PageScale.ScaleX = PageScale.ScaleY;<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;}<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;else<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;{<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; // either width is our constraining property, or the user<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; // managed to nail our aspect ratio perfectly.<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; PageScale.ScaleX = e.NewSize.Width / _originalWidth;<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; PageScale.ScaleY = PageScale.ScaleX;<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;}<br>
&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;}<br>
&nbsp; &nbsp; }<br>
}</code></div>这是一个很有用的小技巧，所以在这里做一个记号，看看将来是否能用得上:)</font></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020081026111346435</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020081026111346435</guid>
    <pubDate>Wed, 26 Nov 2008 23:13:46 +0800</pubDate>
    <dcterms:modified>2008-11-26T23:13:46+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[2.0图形之Ellipse, Line, Path, Polygon, Polyline, Rectangle ]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/900590602008101421320932</link>
    <description><![CDATA[<div>介绍<br><div >  Silverlight 2.0 图形：<br>  &nbsp;&nbsp;&nbsp; Ellipse - 椭圆<br>  &nbsp;&nbsp;&nbsp; Line - 线<br>  &nbsp;&nbsp;&nbsp; Path - 一系列相互连接的直线和曲线<br>  &nbsp;&nbsp;&nbsp; Polygon - 多边形，闭合图形，起点与终点自动相连<br>  &nbsp;&nbsp;&nbsp; Polyline - 非闭合图形，一串连接起来的线，起点与终点不会自动相连<br>  &nbsp;&nbsp;&nbsp; Rectangle - 矩形<br>  <br>  <br>  在线DEMO<br>  <a title="Silverlight2.0&#22312;&#32447;DEMO" target="_blank" rel="nofollow" href="http://www.cnblogs.com/webabcd/archive/2008/10/09/1307486.html"  >http://www.cnblogs.com/webabcd/archive/2008/10/09/1307486.html</a> <br>  <br>  <br>  示例<br>  1、Ellipse.xaml<br>  <div ><img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >UserControl&nbsp;</span><span style="color: rgb(255, 0, 0);"  >x:Class</span><span style="color: rgb(0, 0, 255);"  >="Silverlight20.Shape.Ellipse"</span><span style="color: rgb(255, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;xmlns</span><span style="color: rgb(0, 0, 255);"  >="http://schemas.microsoft.com/winfx/2006/xaml/presentation"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;xmlns:x</span><span style="color: rgb(0, 0, 255);"  >="http://schemas.microsoft.com/winfx/2006/xaml"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >StackPanel&nbsp;</span><span style="color: rgb(255, 0, 0);"  >HorizontalAlignment</span><span style="color: rgb(0, 0, 255);"  >="Left"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  >椭圆</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Width&nbsp;-&nbsp;椭圆的宽<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Height&nbsp;-&nbsp;椭圆的高<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stroke&nbsp;-&nbsp;边框<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StrokeThickness&nbsp;-&nbsp;边框尺寸<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fill&nbsp;-&nbsp;填充<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Ellipse&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Stroke</span><span style="color: rgb(0, 0, 255);"  >="Red"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Fill</span><span style="color: rgb(0, 0, 255);"  >="Yellow"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;StrokeThickness</span><span style="color: rgb(0, 0, 255);"  >="6"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Width</span><span style="color: rgb(0, 0, 255);"  >="100"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Height</span><span style="color: rgb(0, 0, 255);"  >="50"</span><span style="color: rgb(0, 0, 255);"  >&gt;&lt;/</span><span style="color: rgb(128, 0, 0);"  >Ellipse</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >StackPanel</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >UserControl</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ></span></div>  <br>  <br>  2、Line.xaml<br>  <div ><img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >UserControl&nbsp;</span><span style="color: rgb(255, 0, 0);"  >x:Class</span><span style="color: rgb(0, 0, 255);"  >="Silverlight20.Shape.Line"</span><span style="color: rgb(255, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;xmlns</span><span style="color: rgb(0, 0, 255);"  >="http://schemas.microsoft.com/winfx/2006/xaml/presentation"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;xmlns:x</span><span style="color: rgb(0, 0, 255);"  >="http://schemas.microsoft.com/winfx/2006/xaml"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >StackPanel&nbsp;</span><span style="color: rgb(255, 0, 0);"  >HorizontalAlignment</span><span style="color: rgb(0, 0, 255);"  >="Left"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  >线</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X1&nbsp;-&nbsp;起点的&nbsp;X&nbsp;坐标<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Y1&nbsp;-&nbsp;起点的&nbsp;Y&nbsp;坐标<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;X2&nbsp;-&nbsp;终点的&nbsp;X&nbsp;坐标<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Y2&nbsp;-&nbsp;终点的&nbsp;Y&nbsp;坐标<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Line无填充，也就是Line的Fill属性无效<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;坐标以左上角为原点，原点右侧/下侧为正方向<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Line&nbsp;</span><span style="color: rgb(255, 0, 0);"  >X1</span><span style="color: rgb(0, 0, 255);"  >="0"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Y1</span><span style="color: rgb(0, 0, 255);"  >="100"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;X2</span><span style="color: rgb(0, 0, 255);"  >="200"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Y2</span><span style="color: rgb(0, 0, 255);"  >="300"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Stroke</span><span style="color: rgb(0, 0, 255);"  >="Black"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;StrokeThickness</span><span style="color: rgb(0, 0, 255);"  >="6"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >/&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >StackPanel</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >UserControl</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ></span></div>  <br>  <br>  3、Path.xaml<br>  <div ><img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >UserControl&nbsp;</span><span style="color: rgb(255, 0, 0);"  >x:Class</span><span style="color: rgb(0, 0, 255);"  >="Silverlight20.Shape.Path"</span><span style="color: rgb(255, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;xmlns</span><span style="color: rgb(0, 0, 255);"  >="http://schemas.microsoft.com/winfx/2006/xaml/presentation"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;xmlns:x</span><span style="color: rgb(0, 0, 255);"  >="http://schemas.microsoft.com/winfx/2006/xaml"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >StackPanel&nbsp;</span><span style="color: rgb(255, 0, 0);"  >HorizontalAlignment</span><span style="color: rgb(0, 0, 255);"  >="Left"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  >绘制一系列相互连接的直线和曲线</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Path.Data&nbsp;-&nbsp;要绘制的形状的&nbsp;Geometry<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Path&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Fill</span><span style="color: rgb(0, 0, 255);"  >="Yellow"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Stroke</span><span style="color: rgb(0, 0, 255);"  >="Red"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;StrokeThickness</span><span style="color: rgb(0, 0, 255);"  >="6"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Path.Data</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  >椭圆</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Center&nbsp;-&nbsp;原点坐标<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RadiusX&nbsp;-&nbsp;X轴半径<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RadiusY&nbsp;-&nbsp;Y轴半径<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >EllipseGeometry&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Center</span><span style="color: rgb(0, 0, 255);"  >="50,25"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;RadiusX</span><span style="color: rgb(0, 0, 255);"  >="50"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;RadiusY</span><span style="color: rgb(0, 0, 255);"  >="25"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >/&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >Path.Data</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >Path</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Path&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Fill</span><span style="color: rgb(0, 0, 255);"  >="Yellow"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Stroke</span><span style="color: rgb(0, 0, 255);"  >="Red"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;StrokeThickness</span><span style="color: rgb(0, 0, 255);"  >="6"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Path.Data</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  >矩形</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rect&nbsp;-&nbsp;矩形的点坐标，分别为：左侧线的X轴坐标，上侧线的Y轴坐标，矩形宽，矩形高<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >RectangleGeometry&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Rect</span><span style="color: rgb(0, 0, 255);"  >="100,0,100,50"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >/&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >Path.Data</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >Path</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Path&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Stroke</span><span style="color: rgb(0, 0, 255);"  >="Red"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;StrokeThickness</span><span style="color: rgb(0, 0, 255);"  >="6"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Path.Data</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  >线</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StartPoint&nbsp;-&nbsp;起点坐标<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EndPoint&nbsp;-&nbsp;终点坐标<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >LineGeometry&nbsp;</span><span style="color: rgb(255, 0, 0);"  >StartPoint</span><span style="color: rgb(0, 0, 255);"  >="200,0"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;EndPoint</span><span style="color: rgb(0, 0, 255);"  >="300,100"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >/&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >Path.Data</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >Path</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Path&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Stroke</span><span style="color: rgb(0, 0, 255);"  >="Red"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;StrokeThickness</span><span style="color: rgb(0, 0, 255);"  >="6"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Path.Data</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  >一个可能由弧、曲线、椭圆、直线和矩形组成的复杂图形</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >PathGeometry</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >PathGeometry.Figures</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;StartPoint&nbsp;-&nbsp;图形起点坐标<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >PathFigure&nbsp;</span><span style="color: rgb(255, 0, 0);"  >StartPoint</span><span style="color: rgb(0, 0, 255);"  >="300,0"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PathFigure.Segments&nbsp;-&nbsp;待画线的类型<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >PathFigure.Segments</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >PathSegmentCollection</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LineSegment&nbsp;-&nbsp;单一线段<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PolyLineSegment&nbsp;-&nbsp;线段集合<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ArcSegment&nbsp;-&nbsp;弧（椭圆的一部分）<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BezierSegment&nbsp;-&nbsp;两点之间的一条三次贝塞尔曲线<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;QuadraticBezierSegment&nbsp;-&nbsp;两点之间的一条二次贝塞尔曲线<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PolyBezierSegment&nbsp;-&nbsp;一条或多条三次贝塞尔曲线<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PolyQuadraticBezierSegment&nbsp;-&nbsp;一条或多条二次贝塞尔曲线<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Size&nbsp;-&nbsp;弧的X轴和Y轴半径<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Point&nbsp;-&nbsp;该Segment的终点坐标，下一个Segment的起点坐标<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >ArcSegment&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Size</span><span style="color: rgb(0, 0, 255);"  >="100,50"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Point</span><span style="color: rgb(0, 0, 255);"  >="400,100"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >/&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Point&nbsp;-&nbsp;该Segment的终点坐标，下一个Segment的起点坐标<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >LineSegment&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Point</span><span style="color: rgb(0, 0, 255);"  >="500,200"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >/&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >PathSegmentCollection</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >PathFigure.Segments</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >PathFigure</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >PathGeometry.Figures</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >PathGeometry</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >Path.Data</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >Path</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Path&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Fill</span><span style="color: rgb(0, 0, 255);"  >="Yellow"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Stroke</span><span style="color: rgb(0, 0, 255);"  >="Red"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;StrokeThickness</span><span style="color: rgb(0, 0, 255);"  >="6"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Path.Data</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  >一个或多个Geometry</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FillRule&nbsp;-&nbsp;填充规则&nbsp;[System.Windows.Media.FillRule枚举]<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EvenOdd&nbsp;和&nbsp;Nonzero，详见MSDN<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >GeometryGroup&nbsp;</span><span style="color: rgb(255, 0, 0);"  >FillRule</span><span style="color: rgb(0, 0, 255);"  >="EvenOdd"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >LineGeometry&nbsp;</span><span style="color: rgb(255, 0, 0);"  >StartPoint</span><span style="color: rgb(0, 0, 255);"  >="200,0"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;EndPoint</span><span style="color: rgb(0, 0, 255);"  >="300,100"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >/&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >EllipseGeometry&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Center</span><span style="color: rgb(0, 0, 255);"  >="250,50"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;RadiusX</span><span style="color: rgb(0, 0, 255);"  >="50"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;RadiusY</span><span style="color: rgb(0, 0, 255);"  >="50"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >/&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >RectangleGeometry&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Rect</span><span style="color: rgb(0, 0, 255);"  >="200,&nbsp;0,&nbsp;100,&nbsp;100"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >/&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >GeometryGroup</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >Path.Data</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >Path</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >StackPanel</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >UserControl</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ></span></div>  <br>  <br>  4、Polygon.xaml<br>  <div ><img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >UserControl&nbsp;</span><span style="color: rgb(255, 0, 0);"  >x:Class</span><span style="color: rgb(0, 0, 255);"  >="Silverlight20.Shape.Polygon"</span><span style="color: rgb(255, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;xmlns</span><span style="color: rgb(0, 0, 255);"  >="http://schemas.microsoft.com/winfx/2006/xaml/presentation"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;xmlns:x</span><span style="color: rgb(0, 0, 255);"  >="http://schemas.microsoft.com/winfx/2006/xaml"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >StackPanel&nbsp;</span><span style="color: rgb(255, 0, 0);"  >HorizontalAlignment</span><span style="color: rgb(0, 0, 255);"  >="Left"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  >多边形，闭合图形，起点与终点自动相连</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Points&nbsp;-&nbsp;构造路径所使用的点<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;空格分隔点坐标，逗号分隔X轴和Y轴坐标<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Polygon&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Points</span><span style="color: rgb(0, 0, 255);"  >="0,0&nbsp;100,0&nbsp;300,100&nbsp;200,100&nbsp;100,200"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Stroke</span><span style="color: rgb(0, 0, 255);"  >="Red"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;StrokeThickness</span><span style="color: rgb(0, 0, 255);"  >="6"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Fill</span><span style="color: rgb(0, 0, 255);"  >="Yellow"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >/&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >StackPanel</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >UserControl</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ></span></div>  <br>  <br>  5、Polyline.xaml<br>  <div ><img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >UserControl&nbsp;</span><span style="color: rgb(255, 0, 0);"  >x:Class</span><span style="color: rgb(0, 0, 255);"  >="Silverlight20.Shape.Polyline"</span><span style="color: rgb(255, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;xmlns</span><span style="color: rgb(0, 0, 255);"  >="http://schemas.microsoft.com/winfx/2006/xaml/presentation"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;xmlns:x</span><span style="color: rgb(0, 0, 255);"  >="http://schemas.microsoft.com/winfx/2006/xaml"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >StackPanel&nbsp;</span><span style="color: rgb(255, 0, 0);"  >HorizontalAlignment</span><span style="color: rgb(0, 0, 255);"  >="Left"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  >非闭合图形，一串连接起来的线，起点与终点不会自动相连</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Points&nbsp;-&nbsp;构造路径所使用的点<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;空格分隔点坐标，逗号分隔X轴和Y轴坐标<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Polyline&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Points</span><span style="color: rgb(0, 0, 255);"  >="0,0&nbsp;100,0&nbsp;300,100&nbsp;200,100&nbsp;100,200"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Stroke</span><span style="color: rgb(0, 0, 255);"  >="Red"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;StrokeThickness</span><span style="color: rgb(0, 0, 255);"  >="6"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Fill</span><span style="color: rgb(0, 0, 255);"  >="Yellow"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >/&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >StackPanel</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >UserControl</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ></span></div>  <br>  <br>  6、Rectangle.xaml<br>  <div ><img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >UserControl&nbsp;</span><span style="color: rgb(255, 0, 0);"  >x:Class</span><span style="color: rgb(0, 0, 255);"  >="Silverlight20.Shape.Rectangle"</span><span style="color: rgb(255, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;xmlns</span><span style="color: rgb(0, 0, 255);"  >="http://schemas.microsoft.com/winfx/2006/xaml/presentation"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;xmlns:x</span><span style="color: rgb(0, 0, 255);"  >="http://schemas.microsoft.com/winfx/2006/xaml"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >StackPanel&nbsp;</span><span style="color: rgb(255, 0, 0);"  >HorizontalAlignment</span><span style="color: rgb(0, 0, 255);"  >="Left"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  >矩形</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >&lt;!--</span><span style="color: rgb(0, 128, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RadiusX&nbsp;-&nbsp;边角圆弧的X轴半径<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RadiusY&nbsp;-&nbsp;边角圆弧的Y轴半径<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 128, 0);"  >--&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >Rectangle&nbsp;</span><span style="color: rgb(255, 0, 0);"  >Width</span><span style="color: rgb(0, 0, 255);"  >="200"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Height</span><span style="color: rgb(0, 0, 255);"  >="120"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;Stroke</span><span style="color: rgb(0, 0, 255);"  >="Black"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;StrokeThickness</span><span style="color: rgb(0, 0, 255);"  >="6"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;RadiusX</span><span style="color: rgb(0, 0, 255);"  >="10"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;RadiusY</span><span style="color: rgb(0, 0, 255);"  >="30"</span><span style="color: rgb(255, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >/&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >StackPanel</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >UserControl</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><span style="color: rgb(0, 0, 0);"  ><br>  <img  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  align="top"  ></span></div>  <br>  <br>  OK<br>  <a title="&#31283;&#25166;&#31283;&#25171;Silverlight - &#28304;&#30721;&#19979;&#36733;" rel="nofollow" href="http://files.cnblogs.com/webabcd/Silverlight.rar"  >[源码下载]</a>    </div></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/900590602008101421320932</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/900590602008101421320932</guid>
    <pubDate>Fri, 14 Nov 2008 02:13:20 +0800</pubDate>
    <dcterms:modified>2011-10-01T10:44:35+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[Silverlight中Path的Data属性中命令大小写的区别]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/90059060200810131922500</link>
    <description><![CDATA[<div><span ><p>在Silverlight 1.0的SDK中说L和l是一样的，没有说有什么差别，今天偶然发现大写的L命令和小写的l命令是有区别的，后来依次测试V和v、H和h、A和a、C和c、Q和q等一系列命令都存在同样的区别。</p><p>一个简单的示例如下：<br></p><div >引用内容：</div><div ><p><br>&lt;Path Stroke="Blue" Data="M 40,20 V 50 H 50 l 60,60" /&gt;<br>&lt;Path Stroke="Red" Data="M 40,20 V 50 h 50 l 60,60" Canvas.Top="100" /&gt;<br></p></div><p><br>如果没有区别，这两条折线的形状应该是一模一样的，而实际上它们是这样的：<br><img h="227" w="174" src="http://ooboy.net/blog/attachments/month_0712/he7k_1.gif" ><br>如果觉得不够明显，可以看这个：<br></p><div >引用内容：</div><div ><p><br>&lt;Path Stroke="Black" Fill="Gray" Data="M 10,100 C 10,300 300,-200 300,100" /&gt;<br>&lt;Path Stroke="Black" Fill="Gray" Data="M 10,100 c 10,300 300,-200 300,100" Canvas.Top="100" /&gt;<br></p></div><p><br><img h="305" w="315" src="http://ooboy.net/blog/attachments/month_0712/gd6j_2.gif" ><br>后
继续测试发现，如果使用大些命令时，不会改变坐标参照系，后面的坐标仍然是以父级Canvas的原点为原点，即所有的坐标都是相对于父级Canvas的，
与上一个命令的坐标（笔触的当前位置）无关；而使用小写命令，则会改变坐标参照系，后面的坐标则是以上一个命令执行的坐标为原点，即以上一个命令的坐标
（笔触的当前位置）为原点的。</p><p>在第一个示例中，使用H
50命令后，坐标系原点不变，此时终点的坐标是相对父级Canvas的(40,50)位置（与上一个命令无关），直线长度为50（终点的x坐
标）-40（起点的x坐标）=10；在使用h
50命令后，坐标系原点变为上一个命令执行后的坐标(40,50)，此时的终点相对父级Canvas的坐标是(90,50)，直线长度为50，这从第一个
折线图可以看出来。</p><p>因此，在Silverlight中，请注意Data属性中的大小写！</p></span></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/90059060200810131922500</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/90059060200810131922500</guid>
    <pubDate>Thu, 13 Nov 2008 01:09:22 +0800</pubDate>
    <dcterms:modified>2008-11-13T01:09:22+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[在Silverlight 2中使用嵌入字体]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/90059060200810131746707</link>
    <description><![CDATA[<div><span ><p>在Silverlight 1.1中，使用中文字体时需要使用Downloader从服务器上下载字体（具体请参考这篇文章：<a title="&#22312;Silverlight&#20013;&#20351;&#29992;&#20013;&#25991;" target="_blank" rel="nofollow" href="http://ooboy.net/blog/blogview.asp?logID=461"  >在Silverlight中使用中文</a>）。在Silverlight 2中，据说是可以读取系统字体了，都以为可以不用再这么复杂地从服务器上下载字体了。结果有人发现放出来的2.0的Beta版本中无论设置什么字体都<a title="&#21482;&#33021;&#26174;&#31034;&#24494;&#36719;&#38597;&#40657;&#23383;&#20307;" target="_blank" rel="nofollow" href="http://www.cnblogs.com/nasa/archive/2008/03/19/1112812.html"  >只能显示微软雅黑字体</a>（针对中文）。</p><p>不过在Silverlight 2中提供了一种更简单的设置字体的方式，不用写长长的Downloader代码了，你只需要这样：<br></p><div >引用内容：</div><div ><p><br>&lt;TextBlock FontFamily="simsun.ttc#SimSun"&gt;这个是宋体&lt;/TextBlock&gt;<br></p></div><p><br>在编译的时候会自动把相关字体打包成XAP文件放在ClientBin目录下，看起来是不是非常的简单？</p><p>通过使用这样的方式：<br></p><div >引用内容：</div><div ><p><br>&lt;file location&gt;#&lt;font-name&gt;<br></p></div><p><br>Silverlight会自动创建一个Downloader去下载相应的文件，并设置字体。和Silverlight 1.1中一样，在这里我们也可以使用zip格式的文件，例如：<br></p><div >引用内容：</div><div ><p><br>&lt;TextBlock FontFamily="simsun.zip#SimSun"&gt;这个是宋体&lt;/TextBlock&gt;</p></div></span></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/90059060200810131746707</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/90059060200810131746707</guid>
    <pubDate>Thu, 13 Nov 2008 01:07:46 +0800</pubDate>
    <dcterms:modified>2011-09-25T17:36:04+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[Silverlight 3D效果]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/900590602008101304617713</link>
    <description><![CDATA[<div><h1>          Trigonometry</h1>          <div >          written by <a rel="nofollow" href="http://www.cynergysystems.com/blogs/page/rickbarraza"  >Rick Barraza</a>,          revised by <a rel="nofollow" href="http://adamkinney.com/"  >Adam Kinney</a></div>          <p>          Let's build upon the techniques we learned in the Color, Scale &amp; Rotation Lesson and make          a more robust Silverlight interface using <strong>trigonometry</strong>. The good news is that once          you get down to the <strong>Math</strong>, the code techniques for trigonometry are almost identical          in ActionScript and Silverlight so we can forgo the Flash example. The bad news          is that not too many Flash designers feel very comfortable with the Math to begin          with! But with a little investment and creativity, you can create some really interesting          results you couldn't practically create any other way.</p>      <h3>          A Quick Refresher</h3>      <p>          We'll start off easy enough with a typical <strong>Page.xaml</strong> and User Control          <strong>Dot.xaml</strong>.          <strong>Page.xaml</strong> has a Loaded event handler setup and and empty canvas called which          will contain our Dot User Controls we add in code. All the typical modifications          have been made and I've also added some Ellipses to form the outline of the circle          we will be dealing with as well. The files look like this:</p>                <img title="Silverlight 3D效果 - enotsl - enotsl的博客"  src="http://channel9.msdn.com/continuum/tutorials/images/08_a_s0.gif"  alt=""  >            <p>          <strong>Dot.xaml</strong> doesn't need a Loaded handler for this project, but we do add the standard          X and Y properties to its code behind file <strong>Dot.xaml.cs</strong> to make positioning easier.      </p>      <p>          This is the first step we will create:      </p>            <p>          And here is the code that gets us to this first stage:</p>      <a rel="nofollow" href="http://channel9.msdn.com/continuum/tutorials/images/08_a_s1.gif"  >          <img title="Silverlight 3D效果 - enotsl - enotsl的博客"  src="http://channel9.msdn.com/continuum/tutorials/images/08_a_s1_tn.gif"  alt=""  >      </a>      <p>Lines 27 - 30 create a stationary Dot and place it where our origin is. Lines 32          - 38 add a second Dot and names it follow. We then add a <strong>mouseMove</strong>  handler (Line          40) which stores the cursor location in our mouse object we introduced last lesson.          Every time this event is fired, it also calls <strong>setAngle()</strong>, which does all the trigonometry.      </p>      <p>          Lines 52 and 53 calculate the distance from the origin to the current mouse location.          As in Flash, we invert the <strong>_y</strong> distance since Flash and Silverlight both move down          the page as the <em>y</em> value gets bigger. Line 54 then uses these values to calculate          the angle to the mouse. Since the angle is returned in the range of -180 to +180          (as in Flash), we adjust the range to push the negative values up to a more acceptable          range (Line 54). Once we have the angle figured out and since we defined the radius          as 100 (Line 21), we can calculate where on the screen <em>follow</em> should be placed by          using <strong>Math.Cos()</strong> and <strong>Math.Sin()</strong>, just as we would in Flash. Also as in Flash, Cos()          and Sin() expect their parameters to be in radians, not degrees, so we multiply          by Math.PI/180 to do this conversion on the fly.      </p>      <h3>          Fixing a Common Error with Easing Rotations      </h3>      <p>          Many examples tend to stop at the above code, but there is a common error that enters          in both Flash and Silverlight when you try and procedurally animate the calculated          angle with a standard easing equation. Lets beef up this example to see it happen.          Then we'll look at the solution.      </p>      <p>          We're going to add an animated tail to our <em>follow</em> to see the easing effect and where          things start going wrong. First, let's add the following code to <strong>Dot.xaml.cs</strong> to          have it gradually fade out and remove itself when the <strong>fade()</strong> function at Line 33          is called:      </p>                <img title="Silverlight 3D效果 - enotsl - enotsl的博客"  src="http://channel9.msdn.com/continuum/tutorials/images/08_a_s2.gif"  alt=""  >            <p>          Next, we make the following changes to <strong>Page.xaml.cs</strong> to have a Dot object named           <em>tween</em>          follow the mouse and also leave behind a visual tail of where its been. Here is          the code:</p>      <a rel="nofollow" href="http://channel9.msdn.com/continuum/tutorials/images/08_a_s3.gif"  >          <img title="Silverlight 3D效果 - enotsl - enotsl的博客"  src="http://channel9.msdn.com/continuum/tutorials/images/08_a_s3_tn.gif"  alt=""  >      </a>      <p>          Here is what we get:</p>            <p>          If you play around with it, you'll start to notice that is doesn't ease effectively          when easing between certain angles that cross the 0 degree line to the right. you          may recall that we had tried to adjust negative angles in Line 75, but this still          isn't enough. If you remove that line the problem is still there, only now it's          more evident on the left side of the circle (180 degrees) instead of the right (0          degrees).      </p>      <p>          Fortunately, we can fix this by testing a couple values in <strong>setAngle()</strong>. The finished          code looks like this:      </p>      <a rel="nofollow" href="http://channel9.msdn.com/continuum/tutorials/images/08_a_s4.gif"  >          <img title="Silverlight 3D效果 - enotsl - enotsl的博客"  src="http://channel9.msdn.com/continuum/tutorials/images/08_a_s4_tn.gif"  alt=""  >      </a>      <p>          And behaves properly like this:</p>            <h3>          Trigonometry and 3D</h3>      <p>          <strong>Sin()</strong> and <strong>Cos()</strong> are also used for rotating objects in 3D space as well as 2D space.          While a detailed analysis of this would be beyond the scope of this tutorial, I          think it would be pretty cool to share a more robust 3D Silverlight application          and give you pointers to work through the code.      </p>      <p>          Here is the application we'll be discussing. Use the mouse to spin the interface:      </p>            <p>          <strong>Node.xaml</strong> is the user control that we are adding to the screen above and it has          a RenderTransform that controls its Scale and Rotation. It also has a TextBlock          named <em>display</em> that shows the text and a <em>bkg</em> Rectangle that serves as the background          visual. <strong>Node.xaml.cs</strong> looks like this:</p>      <img title="Silverlight 3D效果 - enotsl - enotsl的博客"  src="http://channel9.msdn.com/continuum/tutorials/images/08_b_s0.gif"  alt=""  >      <p>          Each <strong>node</strong> will have a reference to its <em>perspective_ratio</em> (Line 26). The variable          is used to calculate its Scale and Opacity during the 3D rotation calculation. Lines          27 - 29 store references to where the node's <em>virtual position</em> in 3D space should          be. Line 30 stores a reference to the <strong>curve</strong> User Control that is used to connect          each node to the location of the origin in <strong>Page.xaml</strong>.      </p>      <p>          The curve User Control is an old school Flash hack for these types of things*. In          Flash, you can create a MovieClip with the registration point in the upper left          corner (0,0) and draw any type of straight or curved line, as long as it ends at          (100,100). This 100 x 100 MovieClip can then be set as a visual connector between          any two points on your Stage by setting the <strong>_x</strong> and <strong>_y</strong> of the MovieClip at one of          the points and then scaling it by the distance to the second point.      </p>      <p>          To draw the curved line in Silverlight, though, I opened curve.xaml in Expression          Blend and used the Pen tool to draw a curved Path. Here is the result of the modifications:      </p>                <img title="Silverlight 3D效果 - enotsl - enotsl的博客"  src="http://channel9.msdn.com/continuum/tutorials/images/08_b_s1.gif"  alt=""  >            <p>          Since each curve will be tightly coupled to the node that it points to, it doesn't          need to have any 3D variables in its code behind file, only the same X and Y property          we created for all of our User Controls. Its visual Width and Height will be implicitly          set by referencing the ScaleTransform named scale on Line 11.      </p>      <p>          <strong>Page.xaml</strong> has a few public variables defined which we will use through out the animation          logic:      </p>                <img title="Silverlight 3D效果 - enotsl - enotsl的博客"  src="http://channel9.msdn.com/continuum/tutorials/images/08_b_s3.gif"  alt=""  >            <p>          With these variables defined along with the two user controls we already built,          <strong>node.xaml</strong> and <strong>curve.xaml</strong>, we can add the visual elements to our <strong>Page.xaml</strong> in a           <strong>setupNodes()</strong>          function like this:</p>                <img title="Silverlight 3D效果 - enotsl - enotsl的博客"  src="http://channel9.msdn.com/continuum/tutorials/images/08_b_s2.gif"  alt=""  >            <p>          For each node we want to add, we also create a curve (Line 73) that will visually          connect it to the <em>origin</em> and tie each curve to each node in Line 81. Although SIN          and COS will come into play when we start rotating these nodes in our Storyboard          loop, they appear here as well in Line 84 and Line 85 to create a curved path along          which the nodes may be positioned in 3D space. Line 87 through Line 90 are used          to center the display text and size the background for each <strong>node.xaml</strong> accordingly.      </p>      <p>          To control the dragging behavior of the interface, we've added a MouseLeftButtonDown(),          MouseMove() and MouseLeftButtonUp() event as well as hooking up a Storyboard named          <em>sb </em>to control the animation.      </p>      <a rel="nofollow" href="http://channel9.msdn.com/continuum/tutorials/images/08_b_s4.gif"  >          <img title="Silverlight 3D效果 - enotsl - enotsl的博客"  src="http://channel9.msdn.com/continuum/tutorials/images/08_b_s4_tn.gif"  alt=""  >      </a>      <p>          The actual 3D rendering happens in the Storyboard's Completed() event. It is rather          lengthy, since all of the 3D rendering occurs here. This is what the whole function          loops like:</p>                <img title="Silverlight 3D效果 - enotsl - enotsl的博客"  src="http://channel9.msdn.com/continuum/tutorials/images/08_b_s5.gif"  alt=""  >            <p>          Line 113 to Line 130 eases a virtual point named <em>follow</em> around the stage when you          drag the mouse. Based on the distance between <em>follow</em> and mouse, we set the           <em>x_axis_rotation</em>          and <em>y_axis_rotation</em> accordingly. When the user stops dragging the mouse, follow          slows down until it stops. This lets the user spin the 3D interface by throwing          it as well.      </p>      <p>          Line 134 through Line 168 is the math that you can use on any project to rotate          elements in 3D**. If the rest of your project has been setup with similar user controls          and properties, this chunk of code should always work by simply tweaking the right          variables.      </p>      <p>          Line 169 through Line 171 is where we modify each curve object to draw a dotted          line from the origin to where the updated screen position of its node is, completing          the illusion of tethered nodes in 3D space.      </p>      <p>          While this last project is a bit longer than previous lessons, it does cover most          of the techniques we've introduced so far. There is, though, one more technique          that no coverage of Flash to Silverlight lessons would be complete without. We'll          explore this one last invaluable technique next.      </p>      <h3>          Additional Resources</h3>      <p>          *I recall seeing this curved line trick years ago in <strong>New Masters of Flash: The 2002          Annual</strong>. The chapter where this was used was written by Marc Stricklin for brittle-bones.com.          Unfortunately, brittle-bones.com is not online anymore though I'm sure the DVD that          comes with the book has a copy of the technique. I've been grateful for this great          time saver ever since!</p>      <p>          <a rel="nofollow" href="http://www.amazon.com/New-Masters-Flash-2002-Annual/dp/1903450365"  >New Masters              of Flash: The 2002 Annual</a> on Amazon.com.</p>      <p>          **If we're going to talk about great 3D examples and code for interactive designers,          the book <strong>Flash Math Creativy</strong> has been an instant classic since          it was first published and has several many wonderful examples to study:<br>      </p>      <p>          <a rel="nofollow" href="http://www.friendsofed.com/book.html?isbn=1590594290"  >Flash Math Creativity:              Second Edition</a> published by <strong>Friends of Ed</strong>.</p>      <p>          <strong><a rel="nofollow" href="http://www.flashonthebeach.com/speakers/index.php?pageid=1132"  >              Andries Odendaal</a> </strong>wrote a great chapter on 3D in the first <strong>New Masters                  of Flash</strong> and his discusson of 3D rotation is a great primer. He          also used the 100x100 MovieClip trick in his demo as well!<br>      </p>      <p>          <a rel="nofollow" href="http://www.amazon.com/exec/obidos/ASIN/1903450039/o/qid=994390006/sr=2-1/ref=aps_sr_b_1_1/103-2186821-3271841"  >              New Masters of Flash</a> on Amazon.com.</p>      <p>                </p>      <div >          <a rel="nofollow" href="http://channel9.msdn.com/continuum/tutorials/downloads/lesson08.zip"  >              <img title="Silverlight 3D效果 - enotsl - enotsl的博客"  alt="Silverlight 3D效果 - enotsl - enotsl的博客"  src="http://channel9.msdn.com/continuum/images/download.gif"  >              Download Source Code</a>      </div></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/900590602008101304617713</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/900590602008101304617713</guid>
    <pubDate>Thu, 13 Nov 2008 00:46:17 +0800</pubDate>
    <dcterms:modified>2011-10-01T10:48:50+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[从Flash到Silverlight进阶教程-Tweener ]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/900590602008101303450267</link>
    <description><![CDATA[<div>Tweener  <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Simsun; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"  ><div style="margin: 6px; padding: 0px; min-height: 1100px; font-family: Verdana; font-size: 10pt; line-height: normal; background-color: rgb(255, 255, 255);"  >  <div  style="margin-top: 0px; margin-bottom: 0px;"  >在flash中有一个Tweener类，通过这个类我们可以通过代码来创建一些动画效果，这里将要介绍一下在Silverlight中如何像在flash中运用Tweener类一样来创建动画效果。</div>  <div  style="margin-top: 0px; margin-bottom: 0px;"  >例子中使用的Flash Tweener类为：http://code.google.com/p/tweener/</div>  <div  style="margin-top: 0px; margin-bottom: 0px;"  >        </div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >      <div ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  ><span style="color: rgb(0, 0, 0);"  >package&nbsp;</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;import&nbsp;caurina.transitions.Tweener;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;import&nbsp;flash.display.MovieClip;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;import&nbsp;flash.events.MouseEvent;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;class&nbsp;Lession02a&nbsp;extends&nbsp;MovieClip<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;</span><span style="color: rgb(0, 0, 255);"  >var</span><span style="color: rgb(0, 0, 0);"  >&nbsp;ol:OL;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;</span><span style="color: rgb(0, 0, 255);"  >function</span><span style="color: rgb(0, 0, 0);"  >&nbsp;Lession02a()<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >this</span><span style="color: rgb(0, 0, 0);"  >.ol&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >this</span><span style="color: rgb(0, 0, 0);"  >.getChildByName(</span><span style="color: rgb(0, 0, 0);"  >"</span><span style="color: rgb(0, 0, 0);"  >mol</span><span style="color: rgb(0, 0, 0);"  >"</span><span style="color: rgb(0, 0, 0);"  >)&nbsp;as&nbsp;OL;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >this</span><span style="color: rgb(0, 0, 0);"  >.ol.addEventListener(MouseEvent.MOUSE_OVER,onMOUSE_OVER);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >this</span><span style="color: rgb(0, 0, 0);"  >.ol.addEventListener(MouseEvent.MOUSE_OUT,onMOUSE_OUT);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;</span><span style="color: rgb(0, 0, 255);"  >function</span><span style="color: rgb(0, 0, 0);"  >&nbsp;onMOUSE_OVER(e:MouseEvent):</span><span style="color: rgb(0, 0, 255);"  >void</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tweener.addTween(</span><span style="color: rgb(0, 0, 255);"  >this</span><span style="color: rgb(0, 0, 0);"  >.ol,&nbsp;</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{scaleX:</span><span style="color: rgb(0, 0, 0);"  >1.2</span><span style="color: rgb(0, 0, 0);"  >,&nbsp;scaleY:</span><span style="color: rgb(0, 0, 0);"  >1.2</span><span style="color: rgb(0, 0, 0);"  >,&nbsp;alpha:</span><span style="color: rgb(0, 0, 0);"  >0.2</span><span style="color: rgb(0, 0, 0);"  >,&nbsp;time:</span><span style="color: rgb(0, 0, 0);"  >0.5</span><span style="color: rgb(0, 0, 0);"  >,&nbsp;transition:</span><span style="color: rgb(0, 0, 0);"  >"</span><span style="color: rgb(0, 0, 0);"  >easeinoutback</span><span style="color: rgb(0, 0, 0);"  >"</span><span style="color: rgb(0, 0, 0);"  >}</span></span><span style="color: rgb(0, 0, 0);"  >);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;</span><span style="color: rgb(0, 0, 255);"  >function</span><span style="color: rgb(0, 0, 0);"  >&nbsp;onMOUSE_OUT(e:MouseEvent):</span><span style="color: rgb(0, 0, 255);"  >void</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tweener.addTween(</span><span style="color: rgb(0, 0, 255);"  >this</span><span style="color: rgb(0, 0, 0);"  >.ol,&nbsp;</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{scaleX:</span><span style="color: rgb(0, 0, 0);"  >1</span><span style="color: rgb(0, 0, 0);"  >,&nbsp;scaleY:</span><span style="color: rgb(0, 0, 0);"  >1</span><span style="color: rgb(0, 0, 0);"  >,&nbsp;alpha:</span><span style="color: rgb(0, 0, 0);"  >1</span><span style="color: rgb(0, 0, 0);"  >,&nbsp;time:</span><span style="color: rgb(0, 0, 0);"  >0.5</span><span style="color: rgb(0, 0, 0);"  >,&nbsp;transition:</span><span style="color: rgb(0, 0, 0);"  >"</span><span style="color: rgb(0, 0, 0);"  >easeinoutback</span><span style="color: rgb(0, 0, 0);"  >"</span><span style="color: rgb(0, 0, 0);"  >}</span></span><span style="color: rgb(0, 0, 0);"  >);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif"  alt=""  align="top"  >}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span></div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >      <div  style="margin-top: 0px; margin-bottom: 0px;"  >      <div ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ><span style="color: rgb(0, 0, 0);"  >package<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  ></span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;import&nbsp;flash.display.MovieClip;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;class&nbsp;OL&nbsp;extends&nbsp;MovieClip<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public&nbsp;</span><span style="color: rgb(0, 0, 255);"  >function</span><span style="color: rgb(0, 0, 0);"  >&nbsp;OL()<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super();<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif"  alt=""  align="top"  >}</span></span></div>      </div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >了  解flash中Tween类的朋友我就不用多说，只要用上一次便会爱上她。flash中的Tween已经发展了很长的时间，功能也非常的强大，可以用来做  很多很玄的效果。这么好的东西在Silverlight中当然也会有的，其名字为：agTweener &nbsp;  &nbsp;项目地址：www.codeplex.com/agTweener/ &nbsp; &nbsp;当然了他还刚刚开始远没有flash中的强大。</div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >看看要实现同样的效果在Silverlight中该怎么样做。</div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >新建项目，参考<a title="Silverlight&#21021;&#32423;&#25945;&#31243;-&#24314;&#31435;silverlight&#39033;&#30446;" style="color: rgb(85, 26, 139);" target="_blank" rel="nofollow" href="http://www.cnblogs.com/nasa/archive/2008/09/03/1282494.html"  >Silverlight初级教程-建立silverlight项目</a>&nbsp;。</div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >调整舞台布局和Flash一样，参考<a title="Silverlight&#21021;&#32423;&#25945;&#31243;-&#32472;&#22270;&#24067;&#23616;" style="color: rgb(85, 26, 139);" target="_blank" rel="nofollow" href="http://www.cnblogs.com/nasa/archive/2008/09/04/1284732.html"  >Silverlight初级教程-绘图布局</a>&nbsp;。</div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  ><br >      </div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >在flash中引用了Tweener类库</div>      <div  style="margin-top: 0px; margin-bottom: 0px; color: rgb(0, 0, 255);"  >import caurina.transitions.Tweener;</div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  ><br >      </div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >在Silverlight中也是一样，需要引用Tweener类库。右键点击新建立的解决方案选择Add-&gt;Existing Project 选中刚才下载agTweener项目</div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt=""  src="http://images.cnblogs.com/cnblogs_com/nasa/2008-09-11_030933.gif"  width="463"  border="0"  height="433"  ><br>      </div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >右键点击Silverlight项目选择Add Reference</div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt=""  src="http://images.cnblogs.com/cnblogs_com/nasa/2008-09-11_031228.gif"  ></div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >在弹出的对话框中选择Project选项卡，选中agTweener项目</div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt=""  src="http://images.cnblogs.com/cnblogs_com/nasa/2008-09-11_031318.gif"  ></div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >好准备工作做好了。</div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  ><br >      </div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  ><br >      </div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >制作一个自定义用户控件，注意目录结构的排放。参考<a title="&#20174;Flash&#21040;Silverlight&#36827;&#38454;&#25945;&#31243;-&#29992;&#20195;&#30721;&#26469;&#21019;&#24314;&#21160;&#30011;" target="_blank" rel="nofollow" href="http://www.cnblogs.com/nasa/archive/2008/09/09/1287222.html"  >从Flash到Silverlight进阶教程-用代码来创建动画</a>中的<span  style="font-weight: bold;"  >用Blend设计UI</span>这一节。<br >      </div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >      <div  style="margin-top: 0px; margin-bottom: 0px;"  >打开Page.xaml.cs</div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >这里说明下"LayoutRoot"为silverlight默认的根容器，这个名字一般不会去改动他。</div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >修改page类为如下代码。</div>      </div>      <div  style="margin-top: 0px; margin-bottom: 0px;"  >      <div  style="margin-top: 0px; margin-bottom: 0px;"  >      <div ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;System;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;System.Collections.Generic;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;System.Linq;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;System.Net;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;System.Windows;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;System.Windows.Controls;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;System.Windows.Documents;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;System.Windows.Input;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;System.Windows.Media;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;System.Windows.Media.Animation;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;System.Windows.Shapes;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;Lession02b.Components;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >using</span><span style="color: rgb(0, 0, 0);"  >&nbsp;agTweener;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span><span style="color: rgb(0, 0, 255);"  >namespace</span><span style="color: rgb(0, 0, 0);"  >&nbsp;Lession02b<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  ></span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >public</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >partial</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >class</span><span style="color: rgb(0, 0, 0);"  >&nbsp;Page&nbsp;:&nbsp;UserControl<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >private</span><span style="color: rgb(0, 0, 0);"  >&nbsp;OL&nbsp;ol;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >public</span><span style="color: rgb(0, 0, 0);"  >&nbsp;Page()<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InitializeComponent();<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Init();<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >private</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >void</span><span style="color: rgb(0, 0, 0);"  >&nbsp;Init()<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ol&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >new</span><span style="color: rgb(0, 0, 0);"  >&nbsp;OL();<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ol.SetValue(Canvas.TopProperty,&nbsp;(</span><span style="color: rgb(0, 0, 255);"  >double</span><span style="color: rgb(0, 0, 0);"  >)</span><span style="color: rgb(128, 0, 128);"  >150</span><span style="color: rgb(0, 0, 0);"  >);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ol.SetValue(Canvas.LeftProperty,&nbsp;(</span><span style="color: rgb(0, 0, 255);"  >double</span><span style="color: rgb(0, 0, 0);"  >)</span><span style="color: rgb(128, 0, 128);"  >200</span><span style="color: rgb(0, 0, 0);"  >);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LayoutRoot.Children.Add(ol);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TransformGroup&nbsp;_TransformGroup&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >new</span><span style="color: rgb(0, 0, 0);"  >&nbsp;TransformGroup();<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ScaleTransform&nbsp;_ScaleTransform&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >new</span><span style="color: rgb(0, 0, 0);"  >&nbsp;ScaleTransform();<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SkewTransform&nbsp;_SkewTransform&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >new</span><span style="color: rgb(0, 0, 0);"  >&nbsp;SkewTransform();<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RotateTransform&nbsp;_RotateTransform&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >new</span><span style="color: rgb(0, 0, 0);"  >&nbsp;RotateTransform();<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TranslateTransform&nbsp;_TranslateTransform&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >new</span><span style="color: rgb(0, 0, 0);"  >&nbsp;TranslateTransform();<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_TransformGroup.Children.Add(_ScaleTransform);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_TransformGroup.Children.Add(_SkewTransform);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_TransformGroup.Children.Add(_RotateTransform);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_TransformGroup.Children.Add(_TranslateTransform);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ol.RenderTransform&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;_TransformGroup;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ol.MouseEnter&nbsp;</span><span style="color: rgb(0, 0, 0);"  >+=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >new</span><span style="color: rgb(0, 0, 0);"  >&nbsp;MouseEventHandler(ol_MouseEnter);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ol.MouseLeave&nbsp;</span><span style="color: rgb(0, 0, 0);"  >+=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >new</span><span style="color: rgb(0, 0, 0);"  >&nbsp;MouseEventHandler(ol_MouseLeave);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >void</span><span style="color: rgb(0, 0, 0);"  >&nbsp;ol_MouseEnter(</span><span style="color: rgb(0, 0, 255);"  >object</span><span style="color: rgb(0, 0, 0);"  >&nbsp;sender,&nbsp;MouseEventArgs&nbsp;e)<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TweenParameter&nbsp;_tween&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >new</span><span style="color: rgb(0, 0, 0);"  >&nbsp;TweenParameter();<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_tween.Opacity&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;.</span><span style="color: rgb(128, 0, 128);"  >2</span><span style="color: rgb(0, 0, 0);"  >;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_tween.ScaleX&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(128, 0, 128);"  >1.2</span><span style="color: rgb(0, 0, 0);"  >;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_tween.ScaleY&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(128, 0, 128);"  >1.2</span><span style="color: rgb(0, 0, 0);"  >;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_tween.time&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(128, 0, 128);"  >0.5</span><span style="color: rgb(0, 0, 0);"  >;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_tween.transition&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;TransitionType.easeInOutBack;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tweener.addTween(sender&nbsp;</span><span style="color: rgb(0, 0, 255);"  >as</span><span style="color: rgb(0, 0, 0);"  >&nbsp;OL,&nbsp;_tween);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: rgb(0, 0, 255);"  >void</span><span style="color: rgb(0, 0, 0);"  >&nbsp;ol_MouseLeave(</span><span style="color: rgb(0, 0, 255);"  >object</span><span style="color: rgb(0, 0, 0);"  >&nbsp;sender,&nbsp;MouseEventArgs&nbsp;e)<br>      <img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif"  none documentgetElementByIdCodehighlighter___Open_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Closed_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='inline'   align="top"  ><img  title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  alt="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif"  style="display: none;"  none documentgetElementByIdCodehighlighter___Closed_Textstyledisplay='none'   documentgetElementByIdCodehighlighter___Open_Imagestyledisplay='inline'   documentgetElementByIdCodehighlighter___Open_Textstyledisplay='inline'   align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span  style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255); display: none;"  ><img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/dot.gif"  alt=""  ></span><span ><span style="color: rgb(0, 0, 0);"  >{<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TweenParameter&nbsp;_tween&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(0, 0, 255);"  >new</span><span style="color: rgb(0, 0, 0);"  >&nbsp;TweenParameter();<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_tween.Opacity&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(128, 0, 128);"  >1</span><span style="color: rgb(0, 0, 0);"  >;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_tween.ScaleX&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(128, 0, 128);"  >1</span><span style="color: rgb(0, 0, 0);"  >;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_tween.ScaleY&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(128, 0, 128);"  >1</span><span style="color: rgb(0, 0, 0);"  >;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_tween.time&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;</span><span style="color: rgb(128, 0, 128);"  >0.5</span><span style="color: rgb(0, 0, 0);"  >;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_tween.transition&nbsp;</span><span style="color: rgb(0, 0, 0);"  >=</span><span style="color: rgb(0, 0, 0);"  >&nbsp;TransitionType.easeInOutBack;<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tweener.addTween(ol,&nbsp;_tween);<br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif"  alt=""  align="top"  >&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif"  alt=""  align="top"  >}</span></span><span style="color: rgb(0, 0, 0);"  ><br>      <img title="从Flash到Silverlight进阶教程-Tweener  - enotsl - enotsl的博客"  src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif"  alt=""  align="top"  ></span></div>      </div></div></div></div></div></span></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/900590602008101303450267</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/900590602008101303450267</guid>
    <pubDate>Thu, 13 Nov 2008 00:34:50 +0800</pubDate>
    <dcterms:modified>2011-09-28T15:50:11+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[Silverlight 全屏支持 ]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/900590602008101303126819</link>
    <description><![CDATA[<div><h2>Microsoft Silverlight 提供以全屏模式显示 Silverlight 插件的功能。</h2>                                  <p>本主题包含以下小节：</p>          <ul><li>              <b>                <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/conceptual/silverlight_fullscreen.htm#Full-screen_Mode"  >嵌入模式和全屏模式</a>              </b>            </li><li>              <b>                <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/conceptual/silverlight_fullscreen.htm#Setting_Full-screen_Mode"  >设置全屏模式</a>              </b>            </li><li>              <b>                <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/conceptual/silverlight_fullscreen.htm#Returning_to_Embedded_Mode"  >返回到嵌入模式</a>              </b>            </li><li>              <b>                <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/conceptual/silverlight_fullscreen.htm#Using_the_OnFullScreenChange_Event"  >使用 OnFullScreenChange 事件</a>              </b>            </li><li>              <b>                <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/conceptual/silverlight_fullscreen.htm#Differences_between_Events"  >OnResize 和 OnFullScreenChange 事件之间的区别</a>              </b>            </li></ul>          <h3 >            <a rel="nofollow" >嵌入模式和全屏模式</a>          </h3>          <p>Silverlight 插件可以以嵌入模式显示，也可以以全屏模式显示：</p>          <ul><li>              在 <i>嵌入模式</i> 下，插件显示在 Web 浏览器中；        </li><li>              在 <i>全屏模式</i> 下, 插件显示在所有其他程序的上面。        </li></ul>          <p>当 Silverlight 插件在嵌入模式下显示时，插件嵌入到浏览器窗口内，当插件在全屏模式下显示时，插件重新调整大小到当前显示器分辨率大小显示在其他所有程序的上面，包括浏览器窗口。下图显示了嵌入模式和全屏模式的差别。</p>          <p>            <b>Silverlight 插件在嵌入模式和全屏模式下的显示</b>            <br>            <img title="Silverlight 全屏支持  - enotsl - enotsl的博客"  src="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/conceptual/images/FullScreenMode_01.png"  alt="Embedded mode and full-screen mode"  width="821"  border="0"  height="331"  >          </p>          <h4 >全屏模式下插件的大小</h4>          <p>当 Silverlight 插件在全屏模式下显示时，插件的大小等于当前显示器的分辨率。然而，在切换到全屏模式的过程中，插件的 width 和 height 属性值并不会受到影响，要在全屏模式下判断插件的真正大小，请使用 <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/p_SilverlightControl_ActualWidth.htm"  >ActualWidth</a> 和  <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/p_SilverlightControl_ActualHeight.htm"  >ActualHeight</a> 属性，这些属性会等于显示器当前的分辨率。</p>          <p>当全屏模式下显示的 Silverlight 插件切换回到嵌入模式时，插件的大小又恢复到 width 和 height 属性值。</p>          <h3 >            <a rel="nofollow" >设置全屏模式</a>          </h3>          <p><a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/p_SilverlightControl_FullScreen.htm"  >FullScreen</a> 属性决定 Silverlight 插件是以全屏模式显示还是以嵌入模式显示。如果 <b>FullScreen</b> 属性设置为 <b>true</b>，Silverlight 插件以全屏模式显示，如果 <b>FullScreen</b> 设置为 <b>false</b>，Silverlight 插件就以嵌入模式显示。在一个页面包含多个 Silverlight 插件情况下，一次只能有一个 Silverlight 插件处于全屏模式。</p>          <p>当 Silverlight 插件在全屏模式下显示时，下面的信息会显示出来，这个信息警告用户应用程序当前正以全屏模式显示，并提供如何返回到嵌入模式显示的信息。</p>          <p>            <b>全屏模式时的信息</b>          </p>          <p>            <img title="Silverlight 全屏支持  - enotsl - enotsl的博客"  src="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/conceptual/images/FullScreenButton.png"  alt="Full-screen mode message"  width="510"  border="0"  height="100"  >          </p>          <p>Silverlight 插件只能在响应用户触发的一套行为时才能设置为全屏模式。这些行为包括 <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/e_UIElement_MouseLeftButtonDown.htm"  >MouseLeftButtonDown</a>、<a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/e_UIElement_MouseLeftButtonUp.htm"  >MouseLeftButtonUp</a>、<a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/e_UIELement_KeyDown.htm"  >KeyDown</a> 和 <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/e_UIELement_KeyUp.htm"  >KeyUp</a> 事件。如果你试图在 <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/e_UIELement_Loaded.htm"  >Loaded</a> 事件中将 <b>FullScreen</b> 属性设置为  <b>true</b>，则这个属性设置将被忽略。限制这些设置全屏模式的行为能够确保用户始终是全屏模式行为的发起者。</p>          <p>当 Silverlight 插件在全屏模式下显示时，键盘不能传递到键盘事件处理器中，惟一有效的键盘输入是那种将 Silverlight 插件返回到嵌入模式的按键。这种全屏模式下键盘输入的限制是一种安全性的特征，并有意使用户键入的无意信息的可能性减少到最少。</p>          <p>下面的 JavaScript 例子显示了如何使用 <b>MouseLeftButtonUp</b> 事件处理器函数启用和禁用 Silverlight 插件的全屏模式。</p>          <div  >            <div style="width: 99%;"  >              <table  style="border: 1px solid rgb(153, 153, 153); background: rgb(204, 204, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 99%;"  >                <tbody><tr>                  <th  style="background: rgb(204, 204, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; text-align: left;"  >JavaScript</th>                </tr>                <tr>                  <td  style="border: medium none ; background: rgb(230, 230, 230) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"  >                    <pre  style="border: medium none ; margin: 0px; padding: 0px; background: transparent none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: 'Courier New',Courier,monospace;"  >// Event handler for clicking the full-screen mode button.<br>function onMouseLeftButtonUp(sender, eventArgs)<br>{<br>    // Toggle between embedded mode and full-screen mode.<br>    plugin.content.fullScreen = !plugin.content.fullScreen;<br>}<br></pre>                  </td>                </tr>              </table>            </div>          </div>          <p>当 Silverlight 插件处于全屏模式时，<b>ActualWidth</b> 和  <b>ActualHeight</b> 属性设置为显示器当前分辨率大小。</p>          <h4 >模式改变期间的性能特征</h4>          <p>在嵌入模式和全屏模式之间的切换对性能的影响极小，也就是说，在大多数情况下，音频和视频的回放时无缝的。</p>          <p >            <b>性能小贴士：</b>&nbsp;&nbsp;&nbsp;为达到最佳性能，当程序转向全屏模式时，隐藏的或者与对象树断开的对象是不在全屏模式下呈现的。我们可以通过设置对象的 <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/p_UIElement_Visibility.htm"  >Visibility</a> 属性为 <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/o_Visibility.htm"  >Collapsed</a> 隐藏第该对象。          </p>          <h4 >全屏无窗口的 Silverlight 插件</h4>          <p>在全屏模式显示时，Silverlight 插件的 <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/p_SilverlightControl_Windowless.htm"  >   Windowless</a> 属性设置为 <b>true</b> 将总是以完全不透明的方式呈现背景颜色。然而，当  Silverlight 插件返回到嵌入模式时，背景颜色就恢复到它以前的不透明值。</p>          <h3 >            <a rel="nofollow" >返回到嵌入模式</a>          </h3>          <p>处于全屏模式下的 Silverlight 插件有多种方式能够返回到嵌入模式。退出全屏最简单的方式输入键或者健的组合：</p>          <ul><li>Windows 用户应当按 <b>ESC</b>、 <b>CTRL+W</b> 或者 <b>ALT+F4</b>；</li><li>Macintosh 用户应当按 <b>ESC</b>。</li></ul>          <p>此外，如果处于全屏模式下的 Silverlight 插件失去了焦点，它就返回到嵌入模式。全屏模式下的 Silverlight 插件当另外一个窗口由于用户的行为得到焦点时，在多显示器配置下就会失去焦点。例如，在 Windows 中使用 <b>ALT+TAB</b> 组合键在任务间切换将导致当前程序失去焦点，下一个程序得到焦点。</p>          <h4 >设置 FullScreen 属性为 False</h4>          <p>当 Silverlight 插件在全屏模式下显示时，设置 <b>   FullScreen</b>   属性为 <b>false</b> 将使插件返回到嵌入模式，插件的大小恢复到 width 和 height 属性的值。</p>          <h3 >            <a rel="nofollow" >使用 OnFullScreenChange 事件</a>          </h3>          <p>当 <b>FullScreen</b> 属性变化时， <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/e_SilverlightControl_OnFullScreenChange.htm"  >OnFullScreenChange</a> 事件就会产生。下面的 JavaScript 例子显示了如何为 Silverlight 插件定义 <b>OnFullScreenChange</b> 事件。</p>          <div  >            <div style="width: 99%;"  >              <table  style="border: 1px solid rgb(153, 153, 153); background: rgb(204, 204, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; width: 99%;"  >                <tbody><tr>                  <th  style="background: rgb(204, 204, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; text-align: left;"  >JavaScript</th>                </tr>                <tr>                  <td  style="border: medium none ; background: rgb(230, 230, 230) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"  >                    <pre  style="border: medium none ; margin: 0px; padding: 0px; background: transparent none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: 'Courier New',Courier,monospace;"  >var plugin;<br><br>function onLoaded(sender, args)<br>{<br>    // Retrieve a reference to the plug-in.<br>    plugin = sender.getHost();<br><br>    // Set the event handler function for the OnFullScreenChange event.<br>    plugin.content.onFullScreenChange = onFullScreenChanged;<br><br>    // Do initial layout of the app based on initial size.<br>    updateLayout(plugin.content.actualWidth, plugin.content.actualHeight);<br>}<br><br>function onFullScreenChanged(sender, eventArgs)<br>{<br>    // Do layout resizing of the app whenever the FullScreen property changes.<br>    updateLayout(plugin.content.actualWidth, plugin.content.actualHeight);<br>}<br><br>// Resize and reposition application elements.<br>function updateLayout(width, height)<br>{<br>    // Perform layout tasks based on width and height.<br>}<br></pre>                  </td>                </tr>              </table>            </div>          </div>          <p >            <b>注意：</b>&nbsp;&nbsp;&nbsp;Silverlight 不支持元素的自动布局。也就是说，Silverlight 插件大小改变时，应用程序必须提供改变内容大小的逻辑。</p>          <h3 >            <a rel="nofollow" >OnResize    和 OnFullScreenChange 事件之间的区别</a>          </h3>          <p>Silverlight 插件的  <a rel="nofollow" href="http://dotnet.aspx.cc/SilverlightSDK/Silverlight/reference/p_SilverlightControl_FullScreen.htm"  >   FullScreen</a> 属性变化时，<b>OnFullScreenChange</b> 就会发生。当 <b>FullScreen</b> 属性设置为 <b>true</b> 时，Silverlight 插件以全屏模式显示，当 <b>FullScreen</b> 属性设置为 <b>false</b> 时，Silverlight 插件以嵌入模式显示。</p>          <p>如果 Silverlight 插件的改变触发 <b>OnFullScreenChange</b> 事件，<b>OnResize</b> 事件就不会发生。此外，当 Silverlight 处于全屏模式时，<b>OnResize</b> 事件不会发生。<b>OnResize</b> 和 <b>   OnFullScreenChange</b> 是不连续的事件，相互独立，永远不会在同一时间发生。</p></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/900590602008101303126819</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/900590602008101303126819</guid>
    <pubDate>Thu, 13 Nov 2008 00:31:26 +0800</pubDate>
    <dcterms:modified>2011-09-27T14:40:47+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[Silverlight Tip: How to reflect ScriptObject content in runtime ]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/9005906020081012105549570</link>
    <description><![CDATA[<div><h2>Today  I want to show how Silverlight application could "understand" which  objects form HTML DOM from hosting page it deals with. The minute  before I start, let me show why many of Silverlight developers need it.</h2>                 <p>Lets assume we have some simple HTML/ASPX page, with some JavaScript functionality and JavaScript objects, like follows:</p> <div> <div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   1:</span> <span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >html</span> <span style="color: rgb(255, 0, 0);"  >xmlns</span><span style="color: rgb(0, 0, 255);"  >="http://www.w3.org/1999/xhtml"</span> <span style="color: rgb(255, 0, 0);"  >style</span><span style="color: rgb(0, 0, 255);"  >="height:100%;"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   2:</span> <span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >head</span> <span style="color: rgb(255, 0, 0);"  >runat</span><span style="color: rgb(0, 0, 255);"  >="server"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   3:</span>     <span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >title</span><span style="color: rgb(0, 0, 255);"  >&gt;</span>Test Page For ScriptReflector<span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >title</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   4:</span>         </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   5:</span> <span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >SCRIPT</span> <span style="color: rgb(255, 0, 0);"  >language</span><span style="color: rgb(0, 0, 255);"  >="JavaScript"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"  ><span style="color: rgb(96, 96, 96);"  >   1:</span>  </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   2:</span>     <span style="color: rgb(0, 128, 0);"  >//Some JS variables...</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"  ><span style="color: rgb(96, 96, 96);"  >   3:</span>     <span style="color: rgb(0, 0, 255);"  >var</span> BOARD   = {};</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   4:</span>     <span style="color: rgb(0, 0, 255);"  >var</span> elmBoard;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"  ><span style="color: rgb(96, 96, 96);"  >   5:</span>     <span style="color: rgb(0, 0, 255);"  >var</span> b = BOARD;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   6:</span>     </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"  ><span style="color: rgb(96, 96, 96);"  >   7:</span>     <span style="color: rgb(0, 128, 0);"  >//JS Function, which will intialize JS variables, but also will call SL functionality</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   8:</span>     <span style="color: rgb(0, 0, 255);"  >function</span> foo()</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"  ><span style="color: rgb(96, 96, 96);"  >   9:</span>     {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  10:</span>         elmBoard = document.getElementById(<span style="color: rgb(0, 96, 128);"  >"Xaml1"</span>);</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"  ><span style="color: rgb(96, 96, 96);"  >  11:</span>     </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  12:</span>         b.TestPropery = <span style="color: rgb(0, 96, 128);"  >"Alexg@sela.co.il"</span>;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"  ><span style="color: rgb(96, 96, 96);"  >  13:</span>         b.extObj  = elmBoard;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  14:</span>         b.extDoc  = b.extObj.document;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"  ><span style="color: rgb(96, 96, 96);"  >  15:</span>         b.extBody = b.extDoc.body;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  16:</span>         b.extWin  = b.extDoc.parentWindow;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"  ><span style="color: rgb(96, 96, 96);"  >  17:</span>         </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  18:</span>         <span style="color: rgb(0, 128, 0);"  >//Execute SL functionality</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"  ><span style="color: rgb(96, 96, 96);"  >  19:</span>         <span style="color: rgb(0, 0, 255);"  >var</span> sl = document.getElementById(<span style="color: rgb(0, 96, 128);"  >"Xaml1"</span>).content;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  20:</span>         sl.SL.DoSomething(b);</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"  ><span style="color: rgb(96, 96, 96);"  >  21:</span>         </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  22:</span>     } </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"  ><span style="color: rgb(96, 96, 96);"  >  23:</span>     </pre><span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >SCRIPT</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   6:</span>     <span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >style</span> <span style="color: rgb(255, 0, 0);"  >type</span><span style="color: rgb(0, 0, 255);"  >="text/css"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   7:</span>         #Text1</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   8:</span>         {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   9:</span>             width: 300px;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  10:</span>         }</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  11:</span>     <span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >style</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  12:</span> <span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >head</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  13:</span> <span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >body</span> <span style="color: rgb(255, 0, 0);"  >style</span><span style="color: rgb(0, 0, 255);"  >="height:100%;margin:0;"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  14:</span>     <span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >form</span> <span style="color: rgb(255, 0, 0);"  >id</span><span style="color: rgb(0, 0, 255);"  >="form1"</span> <span style="color: rgb(255, 0, 0);"  >runat</span><span style="color: rgb(0, 0, 255);"  >="server"</span> <span style="color: rgb(255, 0, 0);"  >style</span><span style="color: rgb(0, 0, 255);"  >="height:100%;"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  15:</span>         <span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >input</span> <span style="color: rgb(255, 0, 0);"  >id</span><span style="color: rgb(0, 0, 255);"  >="Text1"</span> <span style="color: rgb(255, 0, 0);"  >type</span><span style="color: rgb(0, 0, 255);"  >="text"</span> <span style="color: rgb(255, 0, 0);"  >value</span><span style="color: rgb(0, 0, 255);"  >="Some HTML text is here..."</span><span style="color: rgb(0, 0, 255);"  >/&gt;&lt;</span><span style="color: rgb(128, 0, 0);"  >input</span> <span style="color: rgb(255, 0, 0);"  >id</span><span style="color: rgb(0, 0, 255);"  >="Button1"</span> <span style="color: rgb(255, 0, 0);"  >type</span><span style="color: rgb(0, 0, 255);"  >="button"</span> <span style="color: rgb(255, 0, 0);"  >value</span><span style="color: rgb(0, 0, 255);"  >="Click Me!"</span> <span style="color: rgb(255, 0, 0);"  >onclick</span><span style="color: rgb(0, 0, 255);"  >="foo();"</span> <span style="color: rgb(0, 0, 255);"  >/&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  16:</span>         <span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >asp:ScriptManager</span> <span style="color: rgb(255, 0, 0);"  >ID</span><span style="color: rgb(0, 0, 255);"  >="ScriptManager1"</span> <span style="color: rgb(255, 0, 0);"  >runat</span><span style="color: rgb(0, 0, 255);"  >="server"</span><span style="color: rgb(0, 0, 255);"  >&gt;&lt;/</span><span style="color: rgb(128, 0, 0);"  >asp:ScriptManager</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  17:</span>         <span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >div</span>  <span style="color: rgb(255, 0, 0);"  >style</span><span style="color: rgb(0, 0, 255);"  >="height:80%;"</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  18:</span>             <span style="color: rgb(0, 0, 255);"  >&lt;</span><span style="color: rgb(128, 0, 0);"  >asp:Silverlight</span> <span style="color: rgb(255, 0, 0);"  >ID</span><span style="color: rgb(0, 0, 255);"  >="Xaml1"</span> <span style="color: rgb(255, 0, 0);"  >runat</span><span style="color: rgb(0, 0, 255);"  >="server"</span> <span style="color: rgb(255, 0, 0);"  >Source</span><span style="color: rgb(0, 0, 255);"  >="~/ClientBin/ScriptReflector.xap"</span> <span style="color: rgb(255, 0, 0);"  >MinimumVersion</span><span style="color: rgb(0, 0, 255);"  >="2.0.30523"</span> <span style="color: rgb(255, 0, 0);"  >Width</span><span style="color: rgb(0, 0, 255);"  >="100%"</span> <span style="color: rgb(255, 0, 0);"  >Height</span><span style="color: rgb(0, 0, 255);"  >="100%"</span> <span style="color: rgb(0, 0, 255);"  >/&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  19:</span>         <span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >div</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  20:</span>     <span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >form</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  21:</span> <span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >body</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  22:</span> <span style="color: rgb(0, 0, 255);"  >&lt;/</span><span style="color: rgb(128, 0, 0);"  >html</span><span style="color: rgb(0, 0, 255);"  >&gt;</span></pre></div></div>  <p><img title="Silverlight Tip: How to reflect ScriptObject content in runtime  - enotsl - enotsl的博客"  style="border-width: 0px;"  alt="image"  src="http://blogs.microsoft.co.il/blogs/alex_golesh/WindowsLiveWriter/SilverlightTipHowtoreflectScriptObjectco_BB13/image_17.png"  width="511"  border="0"  height="59"  > </p>  <p>When user clicks on the button, it does something with JavaScript  objects, and then executes some Silverlight function (Silverlight class  was already marked as [ScriptableType] and corresponding function was  marked as [ScriptableMember]). Assuming we trying to debug Silverlight  application and inspect the received object, what we will see?</p>  <p><img title="Silverlight Tip: How to reflect ScriptObject content in runtime  - enotsl - enotsl的博客"  style="border-width: 0px;"  alt="image"  src="http://blogs.microsoft.co.il/blogs/alex_golesh/WindowsLiveWriter/SilverlightTipHowtoreflectScriptObjectco_BB13/image_3.png"  width="585"  border="0"  height="96"  > </p>  <p>Not very informative...</p>  <p>But what if we need to know what is in this ScriptObject? Which properties it has? Which functions? Could it be done? </p>  <p>Sure it could be done... Lets start by adding two simple functions to our JavaScript section:</p>  <div>  <div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   1:</span> <span style="color: rgb(0, 128, 0);"  >//ScriptReflector Helper function - for Properties Reflection  </span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   2:</span> ReflectProperties = <span style="color: rgb(0, 0, 255);"  >function</span>(obj)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   3:</span> {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   4:</span>     <span style="color: rgb(0, 0, 255);"  >var</span> props = <span style="color: rgb(0, 0, 255);"  >new</span> Array();</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   5:</span>     </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   6:</span>     <span style="color: rgb(0, 0, 255);"  >for</span> (<span style="color: rgb(0, 0, 255);"  >var</span> s <span style="color: rgb(0, 0, 255);"  >in</span> obj)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   7:</span>     {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   8:</span>         <span style="color: rgb(0, 0, 255);"  >if</span> (<span style="color: rgb(0, 0, 255);"  >typeof</span>(obj[s]) != <span style="color: rgb(0, 96, 128);"  >"function"</span>)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   9:</span>         {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  10:</span>             props[props.length] = s;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  11:</span>         }</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  12:</span>     }</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  13:</span>     </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  14:</span>     <span style="color: rgb(0, 0, 255);"  >return</span> props;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  15:</span> }</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  16:</span>&nbsp; </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  17:</span> <span style="color: rgb(0, 128, 0);"  >//ScriptReflector Helper function - for Functions Reflection</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  18:</span> ReflectMethods = <span style="color: rgb(0, 0, 255);"  >function</span>(obj)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  19:</span> {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  20:</span>     <span style="color: rgb(0, 0, 255);"  >var</span> methods = <span style="color: rgb(0, 0, 255);"  >new</span> Array();</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  21:</span>     </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  22:</span>     <span style="color: rgb(0, 0, 255);"  >for</span> (<span style="color: rgb(0, 0, 255);"  >var</span> s <span style="color: rgb(0, 0, 255);"  >in</span> obj)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  23:</span>     {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  24:</span>         <span style="color: rgb(0, 0, 255);"  >if</span> (<span style="color: rgb(0, 0, 255);"  >typeof</span>(obj[s]) == <span style="color: rgb(0, 96, 128);"  >"function"</span>)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  25:</span>         {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  26:</span>             methods[methods.length] = s;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  27:</span>         }</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  28:</span>     }</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  29:</span>     </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  30:</span>     <span style="color: rgb(0, 0, 255);"  >return</span> methods;    </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  31:</span> }</pre></div></div>  <p>Those functions will help us to "reflect" JavaScript properties at runtime, and they also could be executed from managed code.</p>  <p>Now lets have two managed code functions, which will execute those JavaScript helper functions:</p>  <div>  <div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   1:</span> <span style="color: rgb(0, 128, 0);"  >//Properties reflector</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   2:</span> <span style="color: rgb(0, 0, 255);"  >public</span> <span style="color: rgb(0, 0, 255);"  >static</span> T ReflectProperties&lt;T&gt;(ScriptObject obj)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   3:</span> {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   4:</span>     T retVal = <span style="color: rgb(0, 0, 255);"  >default</span>(T);</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   5:</span>&nbsp; </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   6:</span>     ScriptObject properties = HtmlPage.Window.Invoke(<span style="color: rgb(0, 96, 128);"  >"ReflectProperties"</span>, obj) <span style="color: rgb(0, 0, 255);"  >as</span> ScriptObject;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   7:</span>     <span style="color: rgb(0, 0, 255);"  >if</span> (<span style="color: rgb(0, 0, 255);"  >null</span> != properties)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   8:</span>         <span style="color: rgb(0, 0, 255);"  >if</span> (<span style="color: rgb(0, 0, 255);"  >int</span>.Parse(properties.GetProperty(<span style="color: rgb(0, 96, 128);"  >"length"</span>).ToString()) &gt; 0)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   9:</span>             retVal = properties.ConvertTo&lt;T&gt;();</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  10:</span>&nbsp; </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  11:</span>     <span style="color: rgb(0, 0, 255);"  >return</span> retVal;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  12:</span> }</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  13:</span>&nbsp; </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  14:</span> <span style="color: rgb(0, 128, 0);"  >//Methods reflector</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  15:</span> <span style="color: rgb(0, 0, 255);"  >public</span> <span style="color: rgb(0, 0, 255);"  >static</span> T ReflectMethods&lt;T&gt;(ScriptObject obj)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  16:</span> {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  17:</span>     T retVal = <span style="color: rgb(0, 0, 255);"  >default</span>(T);</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  18:</span>&nbsp; </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  19:</span>     ScriptObject methods = HtmlPage.Window.Invoke(<span style="color: rgb(0, 96, 128);"  >"ReflectMethods"</span>, obj) <span style="color: rgb(0, 0, 255);"  >as</span> ScriptObject;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  20:</span>     <span style="color: rgb(0, 0, 255);"  >if</span> (<span style="color: rgb(0, 0, 255);"  >null</span> != methods)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  21:</span>         <span style="color: rgb(0, 0, 255);"  >if</span> (<span style="color: rgb(0, 0, 255);"  >int</span>.Parse(methods.GetProperty(<span style="color: rgb(0, 96, 128);"  >"length"</span>).ToString()) &gt; 0)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  22:</span>             retVal = methods.ConvertTo&lt;T&gt;();</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  23:</span>&nbsp; </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  24:</span>     <span style="color: rgb(0, 0, 255);"  >return</span> retVal;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  25:</span> }</pre></div></div>  <p>We almost done. I've added function, which will use one of those functions and will return Dictionary&lt;string, object&gt;:</p>  <div>  <div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   1:</span> <span style="color: rgb(0, 128, 0);"  >//Deep reflection for ScriptObject proprties</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   2:</span> <span style="color: rgb(0, 128, 0);"  >//recursionDepth &amp; maxRecursionDepth are two int variables to control recursion depth </span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   3:</span> <span style="color: rgb(0, 128, 0);"  >//in case we will want to get complex properties of JavaScript object</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   4:</span> <span style="color: rgb(0, 0, 255);"  >public</span> <span style="color: rgb(0, 0, 255);"  >static</span> Dictionary&lt;<span style="color: rgb(0, 0, 255);"  >string</span>, <span style="color: rgb(0, 0, 255);"  >object</span>&gt; DeepReflectProperties(ScriptObject obj)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   5:</span> {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   6:</span>     Dictionary&lt;<span style="color: rgb(0, 0, 255);"  >string</span>, <span style="color: rgb(0, 0, 255);"  >object</span>&gt; retVal = <span style="color: rgb(0, 0, 255);"  >new</span> Dictionary&lt;<span style="color: rgb(0, 0, 255);"  >string</span>, <span style="color: rgb(0, 0, 255);"  >object</span>&gt;();</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   7:</span>&nbsp; </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   8:</span>     <span style="color: rgb(0, 0, 255);"  >string</span>[] props = ReflectProperties&lt;<span style="color: rgb(0, 0, 255);"  >string</span>[]&gt;(obj);</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >   9:</span>&nbsp; </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  10:</span>     <span style="color: rgb(0, 0, 255);"  >if</span> (<span style="color: rgb(0, 0, 255);"  >null</span> != props)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  11:</span>     {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  12:</span>         <span style="color: rgb(0, 0, 255);"  >foreach</span> (<span style="color: rgb(0, 0, 255);"  >string</span> prop <span style="color: rgb(0, 0, 255);"  >in</span> props)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  13:</span>         {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  14:</span>             <span style="color: rgb(0, 0, 255);"  >if</span> (obj.GetProperty(prop) <span style="color: rgb(0, 0, 255);"  >is</span> ScriptObject)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  15:</span>             {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  16:</span>                 <span style="color: rgb(0, 0, 255);"  >if</span> (recursionDepth &lt; maxRecursionDepth)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  17:</span>                 {</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  18:</span>                     recursionDepth++;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  19:</span>                     retVal.Add(prop, DeepReflectProperties(obj.GetProperty(prop) <span style="color: rgb(0, 0, 255);"  >as</span> ScriptObject));</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  20:</span>                     recursionDepth--;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  21:</span>                 }</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  22:</span>             }</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  23:</span>             <span style="color: rgb(0, 0, 255);"  >else</span></pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  24:</span>                 retVal.Add(prop, obj.GetProperty(prop));</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  25:</span>         }</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  26:</span>     }</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  27:</span>&nbsp; </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  28:</span>     <span style="color: rgb(0, 0, 255);"  >if</span> (retVal.Count == 0)</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  29:</span>         retVal = <span style="color: rgb(0, 0, 255);"  >null</span>;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  30:</span>&nbsp; </pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  31:</span>     <span style="color: rgb(0, 0, 255);"  >return</span> retVal;</pre><pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"  ><span style="color: rgb(96, 96, 96);"  >  32:</span> }</pre></div></div>  <p>All left to do is to execute those functions. To do it, I've built  simple Silverlight Page, with TextBox for input HTML object element  IDs, and button to start reflection of the HTML element properties. In  my case I've bounded result of DeepReflectProperties function to some  ListBox, and ReflectMethods to some TextBox value.</p>  <p>Here is result for&nbsp; "Button1" (see topmost HTML block):</p>  <p><img title="Silverlight Tip: How to reflect ScriptObject content in runtime  - enotsl - enotsl的博客"  style="border-width: 0px;"  alt="image"  src="http://blogs.microsoft.co.il/blogs/alex_golesh/WindowsLiveWriter/SilverlightTipHowtoreflectScriptObjectco_BB13/image_6.png"  width="622"  border="0"  height="591"  > </p>  <p>"+"/"-" buttons controls the recursion level. </p>  <p>Execution of HTML Button with "b" JavaScript object (see topmost HTML block) gives following output:</p>  <p><img title="Silverlight Tip: How to reflect ScriptObject content in runtime  - enotsl - enotsl的博客"  style="border-width: 0px;"  alt="image"  src="http://blogs.microsoft.co.il/blogs/alex_golesh/WindowsLiveWriter/SilverlightTipHowtoreflectScriptObjectco_BB13/image_11.png"  width="624"  border="0"  height="632"  > </p>  <p><img title="Silverlight Tip: How to reflect ScriptObject content in runtime  - enotsl - enotsl的博客"  style="border-width: 0px;"  alt="image"  src="http://blogs.microsoft.co.il/blogs/alex_golesh/WindowsLiveWriter/SilverlightTipHowtoreflectScriptObjectco_BB13/image_14.png"  width="633"  border="0"  height="211"  > </p>  <p>We done - got properties and method of JavaScript objects in  runtime. Now we could use this information to communicate with hosting  HTML page more efficient.</p>  <p>&nbsp;</p>  <p>Full sources <a target="_blank" rel="nofollow" href="http://blogs.microsoft.co.il/blogs/alex_golesh/WindowsLiveWriter/ScriptReflector.zip"  >here</a></p>  <p>&nbsp;</p>  <p>Enjoy,</p>  <p>Alex</p></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/9005906020081012105549570</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/9005906020081012105549570</guid>
    <pubDate>Wed, 12 Nov 2008 10:55:49 +0800</pubDate>
    <dcterms:modified>2011-10-01T10:49:39+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[IE6下解决PNG透明底的方法 ]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/90059060200810120558549</link>
    <description><![CDATA[<div><h1 ><strong></strong><font size="2">作者:绯雨</font></h1>
     <p>PNG格式可以做成半透明效果,比GIF好用,但在IE6下透明效果无法表现,会显示灰色的色块，参考了网上的实现方法，写了段jQuery来完成这些操作，可以将以下代码存入一个JS，并在需要的页面调用即可：</p>
<pre><code ><span  title="jquery object"><span >$</span></span>(<span >function</span>()&nbsp;{&nbsp;<br><span >if</span>(<span  title="jquery utilities"><span >$.browser</span></span>.msie&amp;&amp;<span  title="jquery utilities"><span >$.browser</span></span>.version==<span >"6.0"</span>)&nbsp;{&nbsp;<br><span  title="jquery object"><span >$</span></span>(<span >"img[@src*=png]"</span>)<span  title="jquery core"><span >.each</span></span>(<span >function</span>()&nbsp;{&nbsp;<br><span >var</span>&nbsp;s=<span >this</span>.src;&nbsp;<br><span >this</span>.src=<span >"space.gif"</span>;&nbsp;<br><span >this</span>.style<span  title="jquery traversing"><span >.filter</span></span>=<span >"progid:DXImageTransform.Microsoft.AlphaImageLoader(src="</span>+s+<span >",&nbsp;sizingmethod=scale)"</span>;&nbsp;<br>});&nbsp;<br>}&nbsp;<br>});</code></pre></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/90059060200810120558549</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/90059060200810120558549</guid>
    <pubDate>Wed, 12 Nov 2008 00:55:08 +0800</pubDate>
    <dcterms:modified>2008-11-12T00:55:08+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[jQuery 选择器的使用]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/900590602008101205357566</link>
    <description><![CDATA[<div>jQuery的选择器是CSS 1-3，XPath的结合物。jQuery提取这二种查询语言最好的部分，融合后创造出了最终的jQuery表达式查询语言。如果你了解CSS（绝大部分WEB开发者都用到的），那么你学起来就很容易了。<br><br>同时使用CSS和XPath<br><br>看几个例子：<br><br>隐藏所有包含有链接的段落：<br><br>$("p[a]").hide();<br><br>显示页面的第一个段落：<br><br>$("p:eq(0)").show();<br><br>隐藏所有当前可见的层元素：<br><br>$("div:visible").hide();<br><br>获取所有无序列表的列表项：<br><br>$("ul/li")<br><br>/* valid too: $("ul &gt; li") */<br><br>取得name值为bar的输入字段的值：<br><br>$("input[@name=bar]").val();<br><br>所有处于选中状态的单选r按钮：<br><br>$("input[@type=radio][@checked]")<br><br>如果你对查询语言的工作原理还有疑问，可以订阅这里的邮件列表。<br><br>CSS查询器<br><br>jQuery完全支持CSS1.3。<br><br>关于CSS的一些资料查看下面的连接：<br><br>CSS 1<br>CSS 2<br>CSS 3<br>下面列出来的是支持的CSS查询器的列表式语法：<br><br>* 任何元素<br>E 类型为E的元素<br>E:root 类型为E，并且是文档的根元素<br>E:nth-child(n) 是其父元素的第n个类型为E的子元素<br>E:first-child 是其父元素的第1个类型为E的子元素<br>E:last-child 是其父元素的最后一个类型为E的子元素<br>E:only-child 且是其父元素的唯一一个类型为E的子元素<br>E:empty 没有子元素（包括text节点）的类型为E的元素<br>E:enabled<br>E:disabled 类型为E，允许或被禁止的用户界面元素<br>E:checked 类型为E，处于选中状态的用户界面元素（例如单选按钮或复选框）<br>E.warning 类型为E，且class属性值为warning<br>E#myid 类型为E，ID为 "myid"。（至多匹配一个元素）<br>E:not(s) 类型为E，不匹配选择器s<br>E F 在类型E后面的类型为F的元素<br>E &gt; F 为E元素子元素的F元素<br>E + F an F element immediately preceded by an E element<br>E ~ F an F element preceded by an E element<br>不同之处<br><br>所有的属性选择器都被写成和XPath极其相似（因为所有的属性都以@符号开始）。<br><br>E[@foo] 拥有foo属性的E元素<br>E[@foo=bar] foo属性的值为bar的E元素<br>E[@foo^=bar] foo属性的值以字符串"bar"开始的E元素<br>E[@foo$=bar] foo属性的值以字符串"bar"结尾的E元素<br>E[@foo*=bar] foo属性的值包含有字符串"bar"结尾的E元素<br>不支持的部分<br><br>E:link<br>E:visited  an E element being the source anchor of a hyperlink of which the target  is not yet visited (:link) or already visited (:visited)<br>E:active<br>E:hover<br>E:focus an E element during certain user actions<br>E:target an E element being the target of the referring URI<br>E::first-line the first formatted line of an E element<br>E::first-letter the first formatted letter of an E element<br>E::selection the portion of an E element that is currently selected/highlighted by the user<br>E::before generated content before an E element<br>E::after generated content after an E element<br>jQuery不支持下列的选择器，因为这些没什么用处。<br><br>E:nth-last-child(n) an E element, the n-th child of its parent, counting from the last one<br>E:nth-of-type(n) an E element, the n-th sibling of its type<br>E:nth-last-of-type(n) an E element, the n-th sibling of its type, counting from the last one<br>E:first-of-type an E element, first sibling of its type<br>E:last-of-type an E element, last sibling of its type<br>E:only-of-type an E element, only sibling of its type<br>E:lang(fr) an element of type E in language "fr"<br>XPath 查询器<br><br>XPath是jQuery内置支持的一种表达式语言。jQuery支持基本的XPath表达式。<br><br>定位路径<br><br>绝对路径<br>$("/html/body//p")<br>$("/*/body//p")<br>$("//p/../div")<br>相对路径<br>$("a",this)<br>$("p/a",this)<br>支持的Axis选择器<br>Descendant Element has a descendant element<br>$("//div//p")<br><br>Child Element has a child element<br>$("//div/p")<br><br>Preceding Sibling Element has an element before it, on the same axes<br>$("//div ~ form")<br><br>Parent Selects the parent element of the element<br>$("//div/../p")<br>支持的谓词<br>[@*] 拥有一个属性<br>$("//div[@*]")<br>[@foo] 拥有foo属性<br>$("//input[@checked]")<br>[@foo='test'] 属性foo值为'test'<br>$("//a[@ref='nofollow']")<br>[Nodelist] Element contains a node list, for example:<br>$("//div[p]")<br>$("//div[p/a]")<br>支持的谓词，但与XPath和CSS又不同的<br><br>[last()] or [position()=last()]改为:last<br>$("p:last")<br>[0] or [position()=0] 改为 :eq(0) or :first<br>$("p:first")<br>$("p:eq(0)")<br>[position() &lt; 5] 改为:lt(5)<br>$("p:lt(5)")<br>[position() &gt; 2] 改为:gt(2)<br>$("p:gt(2)")<br>定制的选择器<br><br>jQuery包含一些在CSS和XPath都不用到的表达式，但我们觉得它们使用起来非常方便，所以包含进来了。<br><br>下列的列表式语法基于不同的CSS选择器，但又有非常相似的名字。<br><br>:even 从匹配的元素集中取序数为偶数的元素<br>:odd 从匹配的元素集中取序数为奇数的元素<br>:eq(0) and :nth(0) 从匹配的元素集中取第0个元素<br>:gt(4) 从匹配的元素集中取序数大于N的元素<br>:lt(4) 从匹配的元素集中取序数小于N的元素<br>:first 相当于 :eq(0)<br>:last 最后一个匹配的元素<br>:parent 选择包含子元素（包含text节点）的所有元素<br>:contains('test') 选择所有含有指定文本的元素<br>:visible 选择所有可见的元素（display值为block 或者visible 、visibility 值为visible的元素，不包括hide域）<br>:hidden 选择所有隐藏的元素(非Hide域，且display值为block 或者visible 、visibility 值为visible的元素)<br>例： <br><br>$("p:first").css("fontWeight","bold");<br>$("div:hidden").show();<br>$("div:contains('test')").hide();<br><br>表单选择器<br>这是为表单提供的一些选择器：<br><br>:input 选择表单元素（input, select, textarea, button）<br>:text 选择所有文本域(type="text")<br>:password 选择所有密码域(type="password").<br>:radio 选择所有单选按钮(type="radio").<br>:checkbox 选择所有复选框(type="checkbox").<br>:submit 选择所有提交按钮(type="submit").<br>:image 选择所有图像域 (type="image").<br>:reset 选择所有清除域(type="reset").<br>:button 选择所有按钮(type="button").<br>同样也可以使用:hidden，详细说明上面已经介绍过。<br><br>$('#myForm :input')<br><br>如果你需要指定表单：<br><br>$('input:radio', myForm)<br><br>这将选择myForm表单中所有单选按钮。选择radio通常是用[@type=radio]，但是这样用理精简些。<br><br>更多的选择器<br><br>jQuery选择器可以用一些第三方部件进行扩充：<br><br>More Selectors Plugin<br>Mike Alsup on Custom Selectors<br>Patch to allow selection by CSS property (full plugin to be released simultaneously with 1.1) <br><br>无常翻译：<a target="_blank" rel="nofollow" href="http://wuchang.cnblogs.com/"  >http://wuchang.cnblogs.com</a><br><a rel="nofollow" href="/mailto:wuChang@guet.edu.cn"  >wuChang@guet.edu.cn</a><br>QQ: 3263262</div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/900590602008101205357566</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/900590602008101205357566</guid>
    <pubDate>Wed, 12 Nov 2008 00:53:57 +0800</pubDate>
    <dcterms:modified>2011-10-01T10:49:52+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[jquery thickbox使用技巧 ]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/900590602008101205256631</link>
    <description><![CDATA[<div><h1 ><strong></strong><font size="2">作者:绯雨 日期:2007-07-04</font></h1>
     
    
       
    
     <p>thickbox是一个不错的对话框插件，不过官方站提供的使用方法具限性很大。比如，我页面上有个缩略图，点击之后用thickbox显示大图。使用官方的方法：</p>
<pre>&lt;a href="大图的URL" title="简介" class="thickbox"&gt;&lt;img src="小图的URL" border="0"/&gt;&lt;/a&gt;</pre>
<p>这种方法虽然方便，但局限性很大。<br>第一、你必须为每个这样的img标签外套一个a标签<br>第二、只能用class="thickbox"让thickbox去绑定事件<br>第三、不能自己定义事件<br>第四、当使用AJAX载入页面后，载入的页面内的这些DOM不会被thickbox绑定</p>
<p>稍稍看了下thickbox的代码，其实以上问题完全可以使用thickbox自己的方法来解决，以下举例说明。</p>
<p><strong>例一。</strong>我能自己定位到需要用thickbox的元素，不想再加上class="thickbox"。HTML如下：</p>
<pre>&lt;div id="PicList"&gt;<br>&nbsp; &lt;a href="Pic01.jpg"&gt;&lt;img src="Pic01s.jpg" border="0"/&gt;&lt;/a&gt;<br>&nbsp; &lt;a href="Pic02.jpg"&gt;&lt;img src="Pic01s.jpg" border="0"/&gt;&lt;/a&gt;<br>&lt;/div&gt;</pre>
<p>需要对id="PicList"里面的a标签下的img使用thickbox，代码如下：</p>
<pre>$(function() {<br>&nbsp; tb_init("#PicList a[img]");<br>});</pre>
<p><strong>例二。</strong>我用AJAX载入了一段HTML，但该HTML里的class="thickbox"这样的标签点击了没有任何反应。解决此问题只要在AJAX载入HTML并更新到页面后执行下以下代码：</p>
<pre>tb_init('a.thickbox,&nbsp;area.thickbox,&nbsp;input.thickbox'); //引号里的是thickbox的默认选择器，你可以使用例一内这样的自定义选择器</pre>
<p><strong>例三。</strong>我想点击img标签后显示thickbox，不想在img标签外面再套&lt;a&nbsp;url="大图"
class="thickbox"&gt;这样的标签。缩略图URL只不过在大图URL的后缀前加了s。比如大图是pic01.jpg、小图是
pic01s.jpg。使用以下方法可以做到。HTML如下：</p>
<pre>&lt;div id="PicList"&gt;<br>&nbsp; &lt;img src="Pic01s.jpg" border="0"/&gt;<br>&nbsp; &lt;img src="Pic01s.jpg" border="0"/&gt;<br>&lt;/div&gt;</pre>
<p>代码如下：</p>
<pre>$(function() {<br>&nbsp; $("#PicList img").click(function() {<br>&nbsp;&nbsp;&nbsp; tb_show("",this.src.substring(0,this.src.length-5)+'.jpg',false);<br>&nbsp; });<br>});</pre>
<p>另外，如果想用其它事件，请使将例3里的click改成你想触发thickbox的事件。</p></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/900590602008101205256631</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/900590602008101205256631</guid>
    <pubDate>Wed, 12 Nov 2008 00:52:56 +0800</pubDate>
    <dcterms:modified>2008-11-12T00:52:56+08:00</dcterms:modified>
  </item>    
  <item>
  	<title><![CDATA[ jQuery load()方法特殊用法！]]></title>	
    <link>http://enotsl.blog.163.com/blog/static/900590602008101205053375</link>
    <description><![CDATA[<div><p>在看jQuery源码时发现的，拿出来和大家分享。在load的url里加上空格后面就可以跟选择器了。</p>
<p>举例：我需要load&nbsp; test.html的内容，并只要取id为a的内容。</p>
<pre>$("body").load("test.html #a");</pre>
会了吧^^
     <br><br></div>]]></description>
	    <author><![CDATA[enotsl]]></author>
	    <comments>http://enotsl.blog.163.com/blog/static/900590602008101205053375</comments>
    <slash:comments>0</slash:comments>
    <guid isPermaLink="true">http://enotsl.blog.163.com/blog/static/900590602008101205053375</guid>
    <pubDate>Wed, 12 Nov 2008 00:50:53 +0800</pubDate>
    <dcterms:modified>2008-11-12T00:50:53+08:00</dcterms:modified>
  </item>    
 </channel>
</rss>
