<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.qiqiboy.com/styles/feedsky0.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feed.qiqiboy.com" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/qiqiboy" type="application/rss+xml"></fs:self_link><lastBuildDate>Mon, 09 Apr 2012 10:23:24 GMT</lastBuildDate><title>I'm qiqiboy !</title><description>Hello people.</description><link>http://www.qiqiboy.com</link><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><language>en</language><pubDate>Thu, 26 Apr 2012 01:42:44 GMT</pubDate><item><title>TouchSliderBox 1.0 –容器宽度可变的幻灯</title><link>http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644832/5446216/1/item.html</link><content:encoded>&lt;p&gt;之前写过一个《&lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html&quot;&gt;TouchSlider 1.0 – 兼容触摸屏手机与PC的幻灯片&lt;/a&gt;》，那么这个TouchSliderBox和之前的TouchSlider有什么区别呢？&lt;/p&gt;
&lt;p&gt;TouchSlider是支持幻灯宽度自适应的，也就是支持Responsive Layout（响应式布局）设计的页面上的slider。而TouchSliderBox其实也是支持响应式布局页面的，只不过每个幻灯的宽度是固定的，变化的是包围幻灯片的容器的宽度。其实差别就是TouchSlider你只能一次看到一张幻灯，而TouchSliderBox则随着幻灯容器宽度的不同，你可能同时可以看到多个幻灯片。&lt;/p&gt;
&lt;p&gt;用一副图片来解释：&lt;img title=&quot;slider&quot; style=&quot;float: none; margin-left: auto; display: block; margin-right: auto&quot; alt=&quot;slider&quot; src=&quot;http://www.qiqiboy.com/wp-content/uploads/2012/04/slider.jpg&quot; width=&quot;600&quot; height=&quot;442&quot;&gt;&lt;/p&gt;
&lt;p&gt;如上图，黄色线框即为幻灯容器。&lt;/p&gt;
&lt;h3&gt;为什么开发这个&lt;/h3&gt;
&lt;p&gt;这个主要是用来展示图片的，虽然TouchSlider也可以用来展示图片，但是由于每次只能显示一张图片，浪费了页面空间（在响应式布局中，从320到1920宽度都支持的话）。&lt;/p&gt;
&lt;p&gt;还有一个原因就是模仿苹果的AppStore的页面下部的应用截图：&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;QQ截图20120409181449&quot; style=&quot;display: inline&quot; alt=&quot;QQ截图20120409181449&quot; src=&quot;http://www.qiqiboy.com/wp-content/uploads/2012/04/QQ20120409181449.png&quot; width=&quot;400&quot; height=&quot;328&quot;&gt;
&lt;p&gt;使用TouchSliderBox可以做到所有浏览器上保持样式统一，并且支持前后切换、鼠标滚动切换以及自适应页面宽度。&lt;/p&gt;
&lt;h3&gt;如何使用&lt;/h3&gt;
&lt;p&gt;使用方法，先载入前一篇文章中提到的那个TouchScroll脚本，然后再载入TouchSliderBox的脚本文件，然后可以通过调用TouchSliderBox这个函数来使用：&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; background-color: #f4f4f4&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;
&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060&quot;&gt;   1:&lt;/span&gt; &amp;lt;script type=&lt;span style=&quot;color: #006080&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt; src=&lt;span style=&quot;color: #006080&quot;&gt;&quot;http://qiqiboy.sinaapp.com/touchscroll/touchScroll.js&quot;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum2&quot; style=&quot;color: #606060&quot;&gt;   2:&lt;/span&gt; &amp;lt;script type=&lt;span style=&quot;color: #006080&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt; src=&lt;span style=&quot;color: #006080&quot;&gt;&quot;http://qiqiboy.sinaapp.com/sliderbox/touchSliderBox.dev.js&quot;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum3&quot; style=&quot;color: #606060&quot;&gt;   3:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum4&quot; style=&quot;color: #606060&quot;&gt;   4:&lt;/span&gt; &amp;lt;script type=&lt;span style=&quot;color: #006080&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum5&quot; style=&quot;color: #606060&quot;&gt;   5:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;//第一个参数是幻灯所在容器的id，第二个参数为返回的幻灯实例的所附加的全局变量，可省略&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum6&quot; style=&quot;color: #606060&quot;&gt;   6:&lt;/span&gt; TouchSliderBox(&lt;span style=&quot;color: #006080&quot;&gt;'imgbox'&lt;/span&gt;,&lt;span style=&quot;color: #006080&quot;&gt;'t1'&lt;/span&gt;);&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum7&quot; style=&quot;color: #606060&quot;&gt;   7:&lt;/span&gt; &amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;为什么要载入TouchScroll呢？因为TouchSliderBox是基于TouchScroll开发的，也可以说是扩展了TouchScroll的一个插件，所以你需要预先载入TouchScroll。当然，你也可以只载入TouchSliderBox，然后会自动在页面中引入TouchScroll： &lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; background-color: #f4f4f4&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;
&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060&quot;&gt;   1:&lt;/span&gt; &amp;lt;script type=&lt;span style=&quot;color: #006080&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt; src=&lt;span style=&quot;color: #006080&quot;&gt;&quot;http://qiqiboy.sinaapp.com/sliderbox/touchSliderBox.dev.js&quot;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum2&quot; style=&quot;color: #606060&quot;&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum3&quot; style=&quot;color: #606060&quot;&gt;   3:&lt;/span&gt; &amp;lt;script type=&lt;span style=&quot;color: #006080&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&amp;gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum4&quot; style=&quot;color: #606060&quot;&gt;   4:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;//第一个参数是幻灯所在容器的id，第二个参数为返回的幻灯实例的所附加的全局变量，可省略&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum5&quot; style=&quot;color: #606060&quot;&gt;   5:&lt;/span&gt; TouchSliderBox(&lt;span style=&quot;color: #006080&quot;&gt;'imgbox'&lt;/span&gt;,&lt;span style=&quot;color: #006080&quot;&gt;'t1'&lt;/span&gt;);&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum6&quot; style=&quot;color: #606060&quot;&gt;   6:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/*不引入TouchScroll，这样子也是可以工作的*/&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum7&quot; style=&quot;color: #606060&quot;&gt;   7:&lt;/span&gt; &amp;lt;/script&amp;gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum8&quot; style=&quot;color: #606060&quot;&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;具体的效果以及使用可以参见我提供的 &lt;a href=&quot;http://qiqiboy.sinaapp.com/sliderbox/&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;DEMO&lt;/strong&gt;&lt;/a&gt; （可以用你的安卓或者苹果手机访问&lt;a href=&quot;http://qiqiboy.sinaapp.com/sliderbox/&quot;&gt;http://qiqiboy.sinaapp.com/sliderbox/&lt;/a&gt; 体验。PC用户可以使用鼠标拖拽模拟触摸操作）。可以通过改变浏览器宽度或者横竖屏切换来查看幻灯的自适应效果。&lt;/p&gt;
&lt;p&gt;JS的源码可以&lt;a href=&quot;http://qiqiboy.sinaapp.com/myJS/touchSliderBox.dev.js&quot; target=&quot;_blank&quot;&gt;点此查看&lt;/a&gt;。&lt;/p&gt;
&lt;ul class=&quot;related_post&quot;&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2012/04/touscroll.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;TouchScroll 1.0 &amp;ndash; 统一视觉样式的容器滚动解决方案&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2012/04/01/touchscroll-v1-0-publish.html&quot; title=&quot;TouchScroll 1.0 &amp;ndash; 统一视觉样式的容器滚动解决方案&quot;&gt;TouchScroll 1.0 &amp;ndash; 统一视觉样式的容器滚动解决方案&lt;/a&gt; (6)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2012/01/688860f891c5.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;TouchSlider 1.0 - 兼容触摸屏手机与PC的幻灯片&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html&quot; title=&quot;TouchSlider 1.0 &amp;#8211; 兼容触摸屏手机与PC的幻灯片&quot;&gt;TouchSlider 1.0 &amp;#8211; 兼容触摸屏手机与PC的幻灯片&lt;/a&gt; (15)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/07/810CI55J_0.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;JavaScript: 支持iphone、ipad 使用两根手指放大图片&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html&quot; title=&quot;JavaScript: 支持iphone、ipad 使用两根手指放大图片&quot;&gt;JavaScript: 支持iphone、ipad 使用两根手指放大图片&lt;/a&gt; (20)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/07/810CI55J_0.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;JavaScript: 让拖动支持iphone/ipad触摸&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/07/16/javascript-touch-drag-support.html&quot; title=&quot;JavaScript: 让拖动支持iphone/ipad触摸&quot;&gt;JavaScript: 让拖动支持iphone/ipad触摸&lt;/a&gt; (15)&lt;/li&gt;&lt;li class=&quot;last&quot;&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/05/imgready.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;javascript 图片预加载（远程获取图片尺寸）&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/05/20/javascript-image-preload.html&quot; title=&quot;javascript 图片预加载（远程获取图片尺寸）&quot;&gt;javascript 图片预加载（远程获取图片尺寸）&lt;/a&gt; (29)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;声明:&lt;/strong&gt; 本站遵循 &lt;a href=&quot;http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/&quot;&gt;署名-非商业性使用-相同方式共享 3.0&lt;/a&gt; 共享协议. 转载请注明转自 &lt;a href=&quot;http://www.qiqiboy.com&quot;&gt;I'm qiqiboy !&lt;/a&gt; &lt;/p&gt; &lt;p&gt;本文地址: &lt;a href=&quot;http://qiqi.boy.im/fn&quot;&gt;http://qiqi.boy.im/fn&lt;a&gt;&lt;/p&gt;&lt;span style=&quot;background:#cc5566;color:#fffff;&quot;&gt;&lt;h4&gt;Hi,welcome to leave your reply.&lt;/h4&gt;&lt;/span&gt;&lt;h3&gt;Related comments&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;2012年04月20日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html#comment-18037&quot;&gt;wmtimes&lt;/a&gt; say: 现在都开始进军手机了哈。我还在原地经。唉。&lt;/li&gt;&lt;li&gt;2012年04月10日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html#comment-17971&quot;&gt;博彩通&lt;/a&gt; say: 嗯 不错  拿moto860试试&lt;/li&gt;&lt;li&gt;2012年04月10日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html#comment-17966&quot;&gt;qiqiboy&lt;/a&gt; say: &lt;a href=&quot;#comment-17932&quot; rel=&quot;nofollow&quot;&gt;@Veezy &lt;/a&gt; 
 &lt;img src='http://www.qiqiboy.com/wp-content/themes/windPaled/images/smiles/icon_mad.gif' alt=':mad:' class='wp-smiley' /&gt;  多么优良的习惯，我长久坚持下来了&lt;/li&gt;&lt;li&gt;2012年04月10日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html#comment-17965&quot;&gt;qiqiboy&lt;/a&gt; say: &lt;a href=&quot;#comment-17957&quot; rel=&quot;nofollow&quot;&gt;@不能吧 &lt;/a&gt; 
哈哈，这个其实是基于我上一篇文章里的TouchScroll的，所以还得载入那个脚本才行。不过总的代码量却是也不多，一共不到10K&lt;/li&gt;&lt;li&gt;2012年04月10日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html#comment-17957&quot;&gt;不能吧&lt;/a&gt; say: 感觉代码量很少啊，不过我木有智能手机……&lt;/li&gt;&lt;li&gt;2012年04月10日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html#comment-17937&quot;&gt;Yafei&lt;/a&gt; say: 手机测试了，效果很好。&lt;/li&gt;&lt;li&gt;2012年04月10日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html#comment-17936&quot;&gt;zwwooooo&lt;/a&gt; say: 我深更半夜来竟然发现某人自沙！
你这个强大了，以后用得着直接CP好了。&lt;/li&gt;&lt;li&gt;2012年04月9日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html#comment-17932&quot;&gt;Veezy&lt;/a&gt; say: &lt;a href=&quot;#comment-17930&quot; rel=&quot;nofollow&quot;&gt;@liuqiqi &lt;/a&gt; 
多年的恶习仍然不改。。。&lt;/li&gt;&lt;/ul&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/631644832/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644832/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html/feed</wfw:commentRss><slash:comments>9</slash:comments><description>之前写过一个《TouchSlider 1.0 – 兼容触摸屏手机与PC的幻灯片》，那么这个TouchSliderBox和之前的TouchSlider有什么区别呢？ TouchSlider是支持幻灯宽度自适应的，也就是支持Responsive Layout（响应式布局）设计的页面上的slider。而TouchSliderBox其实也是支持响应式布局页面的，只不过每个幻灯的宽度是固定的，变化的是包围幻灯片的容器的宽度。其实差别就是TouchSlider你只能一次看到一张幻灯，而TouchSliderBox则随着幻灯容器宽度的不同，你可能同时可以看到多个幻灯片。 用一副图片来解释： 如上图，黄色线框即为幻灯容器。 为什么开发这个 这个主要是用来展示图片的，虽然TouchSlider也可以用来展示图片，但是由于每次只能显示一张图片，浪费了页面空间（在响应式布局中，从320到1920宽度都支持的话）。 还有一个原因就是模仿苹果的AppStore的页面下部的应用截图： 使用TouchSliderBox可以做到所有浏览器上保持样式统一，并且支持前后切换、鼠标滚动切换以及自适应页面宽度。 如何使用 使用方法，先载入前一篇文章中提到的那个TouchScroll脚本，然后再载入TouchSliderBox的脚本文件，然后可以通过调用TouchSliderBox这个函数来使用： 1: &amp;#60;script type=&quot;text/javascript&quot; src=&quot;http://qiqiboy.sinaapp.com/touchscroll/touchScroll.js&quot;&amp;#62;&amp;#60;/script&amp;#62; 2: &amp;#60;script type=&quot;text/javascript&quot; src=&quot;http://qiqiboy.sinaapp.com/sliderbox/touchSliderBox.dev.js&quot;&amp;#62;&amp;#60;/script&amp;#62; 3:&amp;#160; 4: &amp;#60;script type=&quot;text/javascript&quot;&amp;#62; 5: //第一个参数是幻灯所在容器的id，第二个参数为返回的幻灯实例的所附加的全局变量，可省略 6: TouchSliderBox('imgbox','t1'); 7: &amp;#60;/script&amp;#62; 为什么要载入TouchScroll呢？因为TouchSliderBox是基于TouchScroll开发的，也可以说是扩展了TouchScroll的一个插件，所以你需要预先载入TouchScroll。当然，你也可以只载入TouchSliderBox，然后会自动在页面中引入TouchScroll： 1: &amp;#60;script type=&quot;text/javascript&quot; src=&quot;http://qiqiboy.sinaapp.com/sliderbox/touchSliderBox.dev.js&quot;&amp;#62;&amp;#60;/script&amp;#62; 2:&amp;#160; 3: &amp;#60;script [...]&lt;img src=&quot;http://www1.feedsky.com/t1/631644832/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644832/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>触摸</category><category>touch</category><category>iphone</category><category>幻灯</category><category>javascript</category><category>JavaScript</category><pubDate>Mon, 09 Apr 2012 18:23:24 +0800</pubDate><author>qiqiboy</author><comments>http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html#comments</comments><guid isPermaLink="false">http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html</guid><dc:creator>qiqiboy</dc:creator><fs:srclink>http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html</fs:srclink><fs:srcfeed>http://www.qiqiboy.com/feed</fs:srcfeed><fs:itemid>feedsky/qiqiboy/~7883632/631644832/5446216</fs:itemid></item><item><title>TouchSliderBox 1.0 –容器宽度可变的幻灯</title><link>http://item.feedsky.com/~feedsky/qiqiboy/~7883632/625628489/5446216/1/item.html</link><content:encoded>&lt;p&gt;之前写过一个《&lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html&quot;&gt;TouchSlider 1.0 – 兼容触摸屏手机与PC的幻灯片&lt;/a&gt;》，那么这个TouchSliderBox和之前的TouchSlider有什么区别呢？&lt;/p&gt;
&lt;p&gt;TouchSlider是支持幻灯宽度自适应的，也就是支持Responsive Layout（响应式布局）设计的页面上的slider。而TouchSliderBox其实也是支持响应式布局页面的，只不过每个幻灯的宽度是固定的，变化的是包围幻灯片的容器的宽度。其实差别就是TouchSlider你只能一次看到一张幻灯，而TouchSliderBox则随着幻灯容器宽度的不同，你可能同时可以看到多个幻灯片。&lt;/p&gt;
&lt;p&gt;用一副图片来解释：&lt;img title=&quot;slider&quot; style=&quot;float: none; margin-left: auto; display: block; margin-right: auto&quot; alt=&quot;slider&quot; src=&quot;http://www.qiqiboy.com/wp-content/uploads/2012/04/slider.jpg&quot; width=&quot;600&quot; height=&quot;442&quot;&gt;&lt;/p&gt;
&lt;p&gt;如上图，黄色线框即为幻灯容器。&lt;/p&gt;
&lt;h3&gt;为什么开发这个&lt;/h3&gt;
&lt;p&gt;这个主要是用来展示图片的，虽然TouchSlider也可以用来展示图片，但是由于每次只能显示一张图片，浪费了页面空间（在响应式布局中，从320到1920宽度都支持的话）。&lt;/p&gt;
&lt;p&gt;还有一个原因就是模仿苹果的AppStore的页面下部的应用截图：&lt;/p&gt;
&lt;h3&gt;&lt;img title=&quot;QQ截图20120409181449&quot; style=&quot;display: inline&quot; alt=&quot;QQ截图20120409181449&quot; src=&quot;http://www.qiqiboy.com/wp-content/uploads/2012/04/QQ20120409181449.png&quot; width=&quot;400&quot; height=&quot;328&quot;&gt;&lt;/h3&gt;
&lt;p&gt;使用TouchSliderBox可以做到所有浏览器上保持样式统一，并且支持前后切换、鼠标滚动切换以及自适应页面宽度。&lt;/p&gt;
&lt;h3&gt;如何使用&lt;/h3&gt;
&lt;p&gt;使用方法，载入TouchSliderBox的脚本文件，然后可以通过调用TouchSliderBox这个函数来使用：&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; background-color: #f4f4f4&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;
&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;//第一个参数是幻灯所在容器的id，第二个参数为返回的幻灯实例的所附加的全局变量，可省略&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum2&quot; style=&quot;color: #606060&quot;&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum3&quot; style=&quot;color: #606060&quot;&gt;   3:&lt;/span&gt; TouchSliderBox(&lt;span style=&quot;color: #006080&quot;&gt;'imgbox'&lt;/span&gt;,&lt;span style=&quot;color: #006080&quot;&gt;'t1'&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;具体的效果以及使用可以参见我提供的 &lt;a href=&quot;http://qiqiboy.sinaapp.com/touchslider/&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;DEMO&lt;/strong&gt;&lt;/a&gt; （可以用你的安卓或者苹果手机访问&lt;a href=&quot;http://qiqiboy.sinaapp.com/sliderbox/&quot;&gt;http://qiqiboy.sinaapp.com/sliderbox/&lt;/a&gt; 体验。PC用户可以使用鼠标拖拽模拟触摸操作）。可以通过改变浏览器宽度或者横竖屏切换来查看幻灯的自适应效果。&lt;/p&gt;
&lt;ul class=&quot;related_post&quot;&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2012/04/QQ20120409181449.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html&quot; title=&quot;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯&quot;&gt;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯&lt;/a&gt; (0)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2012/04/touscroll.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;TouchScroll 1.0 &amp;ndash; 统一视觉样式的容器滚动解决方案&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2012/04/01/touchscroll-v1-0-publish.html&quot; title=&quot;TouchScroll 1.0 &amp;ndash; 统一视觉样式的容器滚动解决方案&quot;&gt;TouchScroll 1.0 &amp;ndash; 统一视觉样式的容器滚动解决方案&lt;/a&gt; (3)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2012/01/688860f891c5.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;TouchSlider 1.0 - 兼容触摸屏手机与PC的幻灯片&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html&quot; title=&quot;TouchSlider 1.0 &amp;#8211; 兼容触摸屏手机与PC的幻灯片&quot;&gt;TouchSlider 1.0 &amp;#8211; 兼容触摸屏手机与PC的幻灯片&lt;/a&gt; (15)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/07/810CI55J_0.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;JavaScript: 支持iphone、ipad 使用两根手指放大图片&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html&quot; title=&quot;JavaScript: 支持iphone、ipad 使用两根手指放大图片&quot;&gt;JavaScript: 支持iphone、ipad 使用两根手指放大图片&lt;/a&gt; (20)&lt;/li&gt;&lt;li class=&quot;last&quot;&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/07/810CI55J_0.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;JavaScript: 让拖动支持iphone/ipad触摸&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/07/16/javascript-touch-drag-support.html&quot; title=&quot;JavaScript: 让拖动支持iphone/ipad触摸&quot;&gt;JavaScript: 让拖动支持iphone/ipad触摸&lt;/a&gt; (15)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;声明:&lt;/strong&gt; 本站遵循 &lt;a href=&quot;http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/&quot;&gt;署名-非商业性使用-相同方式共享 3.0&lt;/a&gt; 共享协议. 转载请注明转自 &lt;a href=&quot;http://www.qiqiboy.com&quot;&gt;I'm qiqiboy !&lt;/a&gt; &lt;/p&gt; &lt;p&gt;本文地址: &lt;a href=&quot;http://qiqi.boy.im/fm&quot;&gt;http://qiqi.boy.im/fm&lt;a&gt;&lt;/p&gt;&lt;span style=&quot;background:#cc5566;color:#fffff;&quot;&gt;&lt;h4&gt;There is no comments still.&lt;/h4&gt;&lt;/span&gt;&lt;h3&gt;Related comments&lt;/h3&gt;&lt;ul&gt;&lt;/ul&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/625628489/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/625628489/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish.html/feed</wfw:commentRss><slash:comments>0</slash:comments><description>之前写过一个《TouchSlider 1.0 – 兼容触摸屏手机与PC的幻灯片》，那么这个TouchSliderBox和之前的TouchSlider有什么区别呢？ TouchSlider是支持幻灯宽度自适应的，也就是支持Responsive Layout（响应式布局）设计的页面上的slider。而TouchSliderBox其实也是支持响应式布局页面的，只不过每个幻灯的宽度是固定的，变化的是包围幻灯片的容器的宽度。其实差别就是TouchSlider你只能一次看到一张幻灯，而TouchSliderBox则随着幻灯容器宽度的不同，你可能同时可以看到多个幻灯片。 用一副图片来解释： 如上图，黄色线框即为幻灯容器。 为什么开发这个 这个主要是用来展示图片的，虽然TouchSlider也可以用来展示图片，但是由于每次只能显示一张图片，浪费了页面空间（在响应式布局中，从320到1920宽度都支持的话）。 还有一个原因就是模仿苹果的AppStore的页面下部的应用截图： 使用TouchSliderBox可以做到所有浏览器上保持样式统一，并且支持前后切换、鼠标滚动切换以及自适应页面宽度。 如何使用 使用方法，载入TouchSliderBox的脚本文件，然后可以通过调用TouchSliderBox这个函数来使用： 1: //第一个参数是幻灯所在容器的id，第二个参数为返回的幻灯实例的所附加的全局变量，可省略 2:&amp;#160; 3: TouchSliderBox('imgbox','t1'); 具体的效果以及使用可以参见我提供的 DEMO （可以用你的安卓或者苹果手机访问http://qiqiboy.sinaapp.com/sliderbox/ 体验。PC用户可以使用鼠标拖拽模拟触摸操作）。可以通过改变浏览器宽度或者横竖屏切换来查看幻灯的自适应效果。 TouchSliderBox 1.0 &amp;#8211;容器宽度可变的幻灯 (0)TouchScroll 1.0 &amp;#8211; 统一视觉样式的容器滚动解决方案 (3)TouchSlider 1.0 &amp;#8211; 兼容触摸屏手机与PC的幻灯片 (15)JavaScript: 支持iphone、ipad 使用两根手指放大图片 (20)JavaScript: 让拖动支持iphone/ipad触摸 (15)声明: [...]&lt;img src=&quot;http://www1.feedsky.com/t1/625628489/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/625628489/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>触摸</category><category>touch</category><category>iphone</category><category>幻灯</category><category>javascript</category><category>JavaScript</category><pubDate>Mon, 09 Apr 2012 18:23:12 +0800</pubDate><author>qiqiboy</author><comments>http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish.html#comments</comments><guid isPermaLink="false">http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish.html</guid><dc:creator>qiqiboy</dc:creator><fs:srclink>http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish.html</fs:srclink><fs:srcfeed>http://www.qiqiboy.com/feed</fs:srcfeed><fs:itemid>feedsky/qiqiboy/~7883632/625628489/5446216</fs:itemid></item><item><title>TouchScroll 1.0 – 统一视觉样式的容器滚动解决方案</title><link>http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644833/5446216/1/item.html</link><content:encoded>&lt;p&gt;大概三个月之前，我发布了一个JS组件，《 &lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html&quot;&gt;&lt;strong&gt;TouchSlider 1.0 – 兼容触摸屏手机与PC的幻灯片&lt;/strong&gt;&lt;/a&gt; 》。后来陆续在项目中都有用到，觉自己得还是很方便的。&lt;/p&gt;
&lt;p&gt;今天，我又带来了自己空余时间写的另一个组件，&lt;strong&gt;TouchScroll。&lt;/strong&gt;&lt;font color=&quot;#ff0000&quot;&gt;它最大程度上模拟了ios上的默认UI组件的滚动条效果。&lt;/font&gt;&lt;/p&gt;
&lt;h3&gt;为什么开发这个东西&lt;/h3&gt;
&lt;p&gt;其实很大一部分原因是自己想通过写这么一个东西来更好地熟悉PC和触屏手机的JS开发方案中的差别和特点。当然还有一个原因当然就是有可能项目中会用到这个，例如，在多栏功能页面中。&lt;/p&gt;
&lt;p&gt;在页面上，一个容器如果内容的尺寸超过容器的大小，会自动出现滚动条，这个滚动条在不同浏览器中时各有差别的（windows 8上的IE的滚动条的metro风更是颠覆了IE多年的滚动条样式），并且自定义样式性也各不相同（如IE和chrome的通过css改变滚动条的方法就很不一样）或不可定义。而且，在IOS4上，出现滚动条的容器是不可被手指滚动浏览的（IOS5上的safair已经没有这个问题了），你一拖动页面，总是整个网页被拖动了。&lt;/p&gt;
&lt;p&gt;而TouchScroll正是解决这个问题的，并且它在所有PC和手机浏览器上提供了统一的滚动条样式。PC上&lt;strong&gt;&lt;font color=&quot;#ff0000&quot;&gt;支持鼠标拖动页面浏览或者拖动滚轮来滚动容器&lt;/font&gt;&lt;/strong&gt;，手机上支持手指滑动滚动容器。它也支持自适应大小的容器（目前有一些类似插件则是渲染出不可改变大小的容器）。TouchScroll压缩后只有8K。&lt;/p&gt;
&lt;h3&gt;TouchScroll开发注意的问题&lt;/h3&gt;
&lt;p&gt;首先是用不用css3，TouchScroll我前后开发了两版，第一版在支持css3的浏览器上，容器的移动以及缓动效果均有css3提供，在IE上则有JS动画提供缓动效果。这个版本遇到了一个我无法解决的问题（因为要兼容IE，所以我没用translate，而是普通的绝对定位absolute，这样子遇到了滚动条动画中时的位置定位问题，没找到解决办法），关于css3的，后来又由于各种原因，这个版本放弃了，又重新开发了目前这个版本。这个版本里的缓动效果是由JS支持的。&lt;/p&gt;
&lt;p&gt;还遇到一个快速移动后的缓动问题，需要取一定时间内的移动距离以及时间来计算加速度并从而计算出缓动的距离以及开始的速度。最后我是在拖动过程中（moveEvent）记录了每一次的时间与坐标，然后在拖动结束时（endEvent），取最后不大于200ms内的时间和距离，从而以此推算出需要缓动的距离和速度。大概过程如下： &lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; background-color: #f4f4f4&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;
&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; disc=[[&lt;span style=&quot;color: #008000&quot;&gt;/*时间*/&lt;/span&gt;],[&lt;span style=&quot;color: #008000&quot;&gt;/*坐标*/&lt;/span&gt;]]; &lt;span style=&quot;color: #008000&quot;&gt;//disc是用来保存时间与坐标的二维数组&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum2&quot; style=&quot;color: #606060&quot;&gt;   2:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; getMousePoint=&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(){....} &lt;span style=&quot;color: #008000&quot;&gt;//获取鼠标坐标&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum3&quot; style=&quot;color: #606060&quot;&gt;   3:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum4&quot; style=&quot;color: #606060&quot;&gt;   4:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/* 每一次触发moveEvent时记录当前的时间与坐标 */&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum5&quot; style=&quot;color: #606060&quot;&gt;   5:&lt;/span&gt; moveEvent=&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(){&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum6&quot; style=&quot;color: #606060&quot;&gt;   6:&lt;/span&gt;     ....&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum7&quot; style=&quot;color: #606060&quot;&gt;   7:&lt;/span&gt;     disc.push(&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Date());&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum8&quot; style=&quot;color: #606060&quot;&gt;   8:&lt;/span&gt;     disc.push(getMousePoint());&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum9&quot; style=&quot;color: #606060&quot;&gt;   9:&lt;/span&gt;     ....&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum10&quot; style=&quot;color: #606060&quot;&gt;  10:&lt;/span&gt; }&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum11&quot; style=&quot;color: #606060&quot;&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum12&quot; style=&quot;color: #606060&quot;&gt;  12:&lt;/span&gt; endEvent=&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(){&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum13&quot; style=&quot;color: #606060&quot;&gt;  13:&lt;/span&gt;     ....&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum14&quot; style=&quot;color: #606060&quot;&gt;  14:&lt;/span&gt;     &lt;span style=&quot;color: #008000&quot;&gt;//计算出最近不超过200豪秒内数据&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum15&quot; style=&quot;color: #606060&quot;&gt;  15:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; nowTime=&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Date(),&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum16&quot; style=&quot;color: #606060&quot;&gt;  16:&lt;/span&gt;         nowPos=getMousePoint();&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum17&quot; style=&quot;color: #606060&quot;&gt;  17:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;while&lt;/span&gt;(disc[0].length &amp;amp;&amp;amp; nowTime-disc[0][0]&amp;gt;200){&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum18&quot; style=&quot;color: #606060&quot;&gt;  18:&lt;/span&gt;         disc[0].shift();&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum19&quot; style=&quot;color: #606060&quot;&gt;  19:&lt;/span&gt;         disc[1].shift();&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum20&quot; style=&quot;color: #606060&quot;&gt;  20:&lt;/span&gt;     }&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum21&quot; style=&quot;color: #606060&quot;&gt;  21:&lt;/span&gt;     &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt;(disc[0].length){&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum22&quot; style=&quot;color: #606060&quot;&gt;  22:&lt;/span&gt;         time=nowTime-disc[0][0];&lt;span style=&quot;color: #008000&quot;&gt;//间隔时间&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum23&quot; style=&quot;color: #606060&quot;&gt;  23:&lt;/span&gt;          offX=nowPos.x-disc[0][1].x;&lt;span style=&quot;color: #008000&quot;&gt;//横向间隔距离&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum24&quot; style=&quot;color: #606060&quot;&gt;  24:&lt;/span&gt;           ...&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum25&quot; style=&quot;color: #606060&quot;&gt;  25:&lt;/span&gt;     }&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum26&quot; style=&quot;color: #606060&quot;&gt;  26:&lt;/span&gt;     ....&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum27&quot; style=&quot;color: #606060&quot;&gt;  27:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;TouchScroll如何使用&lt;/h3&gt;
&lt;p&gt;使用方法，载入TouchScroll的脚本文件，然后可以通过实例化“TouchScroll”这个类来使用。例如： &lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; background-color: #f4f4f4&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;
&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; TouchScroll({&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum2&quot; style=&quot;color: #606060&quot;&gt;   2:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'id'&lt;/span&gt;: &lt;span style=&quot;color: #006080&quot;&gt;'slider'&lt;/span&gt;,&lt;span style=&quot;color: #008000&quot;&gt;//要处理的容器的id&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum3&quot; style=&quot;color: #606060&quot;&gt;   3:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'width'&lt;/span&gt;:4,&lt;span style=&quot;color: #008000&quot;&gt;//滚动条宽度&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum4&quot; style=&quot;color: #606060&quot;&gt;   4:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'minLength'&lt;/span&gt;:20,&lt;span style=&quot;color: #008000&quot;&gt;//滚动条最小长度&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum5&quot; style=&quot;color: #606060&quot;&gt;   5:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'opacity'&lt;/span&gt;:0.8,&lt;span style=&quot;color: #008000&quot;&gt;//滚动条透明度&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum6&quot; style=&quot;color: #606060&quot;&gt;   6:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'color'&lt;/span&gt;:&lt;span style=&quot;color: #006080&quot;&gt;'black'&lt;/span&gt;,&lt;span style=&quot;color: #008000&quot;&gt;//滚动条颜色&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum7&quot; style=&quot;color: #606060&quot;&gt;   7:&lt;/span&gt; });&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;TouchScroll还存在的问题&lt;/h3&gt;
&lt;p&gt;目前可能还存在一些bug，另外在滚动超出边界后的动画处理也不是很理想，过渡有点生硬。&lt;/p&gt;
&lt;p&gt;目前TouchScroll也未提供一些操作接口，我会在日后慢慢完善，包括添加&lt;strike&gt;PC上的鼠标滚动支持&lt;/strike&gt;(已添加)、更多自定义内容等。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;目前可以使用的接口:&lt;/strong&gt;&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; background-color: #f4f4f4&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;
&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; t1=&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; TouchScroll();&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum2&quot; style=&quot;color: #606060&quot;&gt;   2:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;/*容器滚动接口&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum3&quot; style=&quot;color: #606060&quot;&gt;   3:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt; *@param Number offx: 水平方向上滚动offx距离&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum4&quot; style=&quot;color: #606060&quot;&gt;   4:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt; *@param Number offy: 垂直方向上滚动offy距离&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum5&quot; style=&quot;color: #606060&quot;&gt;   5:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt; */&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum6&quot; style=&quot;color: #606060&quot;&gt;   6:&lt;/span&gt; t1.scroll(offx,offy);&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;查看&lt;a href=&quot;http://qiqiboy.sinaapp.com/touchscroll/&quot; target=&quot;_blank&quot;&gt;DEMO&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt;请点击&lt;a href=&quot;http://qiqiboy.sinaapp.com/touchscroll/&quot;&gt;http://qiqiboy.sinaapp.com/touchscroll/&lt;/a&gt;。可以使用手机浏览器输入地址访问。&lt;/p&gt;
&lt;p&gt;DEMO2: &lt;a href=&quot;http://qiqiboy.sinaapp.com/touchscroll/scroll.html&quot;&gt;http://qiqiboy.sinaapp.com/touchscroll/scroll.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;查看源代码&lt;a href=&quot;http://qiqiboy.sinaapp.com/myJS/touchScroll.dev.js&quot; target=&quot;_blank&quot;&gt;请点此处&lt;/a&gt;。&lt;/p&gt;
&lt;p&gt;&lt;img title=&quot;touscroll&quot; style=&quot;display: inline&quot; alt=&quot;touscroll&quot; src=&quot;http://www.qiqiboy.com/wp-content/uploads/2012/04/touscroll.png&quot; width=&quot;520&quot; height=&quot;262&quot;&gt;&lt;/p&gt;
&lt;ul class=&quot;related_post&quot;&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2012/04/QQ20120409181449.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html&quot; title=&quot;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯&quot;&gt;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯&lt;/a&gt; (9)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/07/810CI55J_0.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;JavaScript: 支持iphone、ipad 使用两根手指放大图片&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html&quot; title=&quot;JavaScript: 支持iphone、ipad 使用两根手指放大图片&quot;&gt;JavaScript: 支持iphone、ipad 使用两根手指放大图片&lt;/a&gt; (20)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2012/01/688860f891c5.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;TouchSlider 1.0 - 兼容触摸屏手机与PC的幻灯片&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html&quot; title=&quot;TouchSlider 1.0 &amp;#8211; 兼容触摸屏手机与PC的幻灯片&quot;&gt;TouchSlider 1.0 &amp;#8211; 兼容触摸屏手机与PC的幻灯片&lt;/a&gt; (15)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/07/810CI55J_0.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;JavaScript: 让拖动支持iphone/ipad触摸&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/07/16/javascript-touch-drag-support.html&quot; title=&quot;JavaScript: 让拖动支持iphone/ipad触摸&quot;&gt;JavaScript: 让拖动支持iphone/ipad触摸&lt;/a&gt; (15)&lt;/li&gt;&lt;li class=&quot;last&quot;&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/05/imgready.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;javascript 图片预加载（远程获取图片尺寸）&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/05/20/javascript-image-preload.html&quot; title=&quot;javascript 图片预加载（远程获取图片尺寸）&quot;&gt;javascript 图片预加载（远程获取图片尺寸）&lt;/a&gt; (29)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;声明:&lt;/strong&gt; 本站遵循 &lt;a href=&quot;http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/&quot;&gt;署名-非商业性使用-相同方式共享 3.0&lt;/a&gt; 共享协议. 转载请注明转自 &lt;a href=&quot;http://www.qiqiboy.com&quot;&gt;I'm qiqiboy !&lt;/a&gt; &lt;/p&gt; &lt;p&gt;本文地址: &lt;a href=&quot;http://qiqi.boy.im/fk&quot;&gt;http://qiqi.boy.im/fk&lt;a&gt;&lt;/p&gt;&lt;span style=&quot;background:#cc5566;color:#fffff;&quot;&gt;&lt;h4&gt;Hi,welcome to leave your reply.&lt;/h4&gt;&lt;/span&gt;&lt;h3&gt;Related comments&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;2012年04月24日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/01/touchscroll-v1-0-publish.html#comment-18051&quot;&gt;普歌&lt;/a&gt; say: 好像没有很大区别，是不是我的浏览器有问题呢。&lt;/li&gt;&lt;li&gt;2012年04月18日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/01/touchscroll-v1-0-publish.html#comment-18030&quot;&gt;mopvhs&lt;/a&gt; say: 我在这里看到了Apps for the iPad的页面模板~~&lt;a href=&quot;http://www.dmxzone.com/demo/templates/ipad/index.html&quot; rel=&quot;nofollow&quot;&gt;点此查看Demo地址&lt;/a&gt;&lt;/li&gt;&lt;li&gt;2012年04月8日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/01/touchscroll-v1-0-publish.html#comment-17918&quot;&gt;刘印博客&lt;/a&gt; say: 算是有心的一个东西了，很多时候都觉得会自动有~&lt;/li&gt;&lt;li&gt;2012年04月6日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/01/touchscroll-v1-0-publish.html#comment-17913&quot;&gt;leilei&lt;/a&gt; say:  &lt;img src='http://www.qiqiboy.com/wp-content/themes/windPaled/images/smiles/icon_razz.gif' alt=':razz:' class='wp-smiley' /&gt;   &lt;img src='http://www.qiqiboy.com/wp-content/themes/windPaled/images/smiles/icon_exclaim.gif' alt=':!:' class='wp-smiley' /&gt; &lt;/li&gt;&lt;li&gt;2012年04月4日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/01/touchscroll-v1-0-publish.html#comment-17875&quot;&gt;emric&lt;/a&gt; say:  &lt;img src='http://www.qiqiboy.com/wp-content/themes/windPaled/images/smiles/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /&gt;   支持!&lt;/li&gt;&lt;li&gt;2012年04月1日, &lt;a href=&quot;http://www.qiqiboy.com/2012/04/01/touchscroll-v1-0-publish.html#comment-17844&quot;&gt;liuqiqi&lt;/a&gt; say: &lt;span style=&quot;color:red;&quot;&gt;&lt;strong&gt;美美的沙发。。。&lt;/strong&gt;&lt;/span&gt; &lt;img src='http://www.qiqiboy.com/wp-content/themes/windPaled/images/smiles/icon_biggrin.gif' alt=':grin:' class='wp-smiley' /&gt; &lt;/li&gt;&lt;/ul&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/631644833/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644833/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.qiqiboy.com/2012/04/01/touchscroll-v1-0-publish.html/feed</wfw:commentRss><slash:comments>6</slash:comments><description>大概三个月之前，我发布了一个JS组件，《 TouchSlider 1.0 – 兼容触摸屏手机与PC的幻灯片 》。后来陆续在项目中都有用到，觉自己得还是很方便的。 今天，我又带来了自己空余时间写的另一个组件，TouchScroll。它最大程度上模拟了ios上的默认UI组件的滚动条效果。 为什么开发这个东西 其实很大一部分原因是自己想通过写这么一个东西来更好地熟悉PC和触屏手机的JS开发方案中的差别和特点。当然还有一个原因当然就是有可能项目中会用到这个，例如，在多栏功能页面中。 在页面上，一个容器如果内容的尺寸超过容器的大小，会自动出现滚动条，这个滚动条在不同浏览器中时各有差别的（windows 8上的IE的滚动条的metro风更是颠覆了IE多年的滚动条样式），并且自定义样式性也各不相同（如IE和chrome的通过css改变滚动条的方法就很不一样）或不可定义。而且，在IOS4上，出现滚动条的容器是不可被手指滚动浏览的（IOS5上的safair已经没有这个问题了），你一拖动页面，总是整个网页被拖动了。 而TouchScroll正是解决这个问题的，并且它在所有PC和手机浏览器上提供了统一的滚动条样式。PC上支持鼠标拖动页面浏览或者拖动滚轮来滚动容器，手机上支持手指滑动滚动容器。它也支持自适应大小的容器（目前有一些类似插件则是渲染出不可改变大小的容器）。TouchScroll压缩后只有8K。 TouchScroll开发注意的问题 首先是用不用css3，TouchScroll我前后开发了两版，第一版在支持css3的浏览器上，容器的移动以及缓动效果均有css3提供，在IE上则有JS动画提供缓动效果。这个版本遇到了一个我无法解决的问题（因为要兼容IE，所以我没用translate，而是普通的绝对定位absolute，这样子遇到了滚动条动画中时的位置定位问题，没找到解决办法），关于css3的，后来又由于各种原因，这个版本放弃了，又重新开发了目前这个版本。这个版本里的缓动效果是由JS支持的。 还遇到一个快速移动后的缓动问题，需要取一定时间内的移动距离以及时间来计算加速度并从而计算出缓动的距离以及开始的速度。最后我是在拖动过程中（moveEvent）记录了每一次的时间与坐标，然后在拖动结束时（endEvent），取最后不大于200ms内的时间和距离，从而以此推算出需要缓动的距离和速度。大概过程如下： 1: var disc=[[/*时间*/],[/*坐标*/]]; //disc是用来保存时间与坐标的二维数组 2: var getMousePoint=function(){....} //获取鼠标坐标 3:&amp;#160; 4: /* 每一次触发moveEvent时记录当前的时间与坐标 */ 5: moveEvent=function(){ 6: .... 7: disc.push(new Date()); 8: disc.push(getMousePoint()); 9: .... 10: [...]&lt;img src=&quot;http://www1.feedsky.com/t1/631644833/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644833/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>ios</category><category>触摸</category><category>iphone</category><category>javascript</category><category>JavaScript</category><pubDate>Sun, 01 Apr 2012 16:20:40 +0800</pubDate><author>qiqiboy</author><comments>http://www.qiqiboy.com/2012/04/01/touchscroll-v1-0-publish.html#comments</comments><guid isPermaLink="false">http://www.qiqiboy.com/?p=2860</guid><dc:creator>qiqiboy</dc:creator><fs:srclink>http://www.qiqiboy.com/2012/04/01/touchscroll-v1-0-publish.html</fs:srclink><fs:srcfeed>http://www.qiqiboy.com/feed</fs:srcfeed><fs:itemid>feedsky/qiqiboy/~7883632/631644833/5446216</fs:itemid></item><item><title>注意，有骗子。。。。。13790942055</title><link>http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644834/5446216/1/item.html</link><content:encoded>&lt;p&gt;昨晚接到一电话：&lt;/p&gt;
&lt;p&gt;骗子：“XX，我到天津办事儿。你能猜到我是谁么？”&lt;/p&gt;
&lt;p&gt;我：“额。。。你是A还是B？”&lt;/p&gt;
&lt;p&gt;骗子：“嗯，对。”（我从这里开始以为对方就是B了）&lt;/p&gt;
&lt;p&gt;我：“你不是在国外么，怎么突然回来了”&lt;/p&gt;
&lt;p&gt;骗子：“。。。。。。。”&lt;br /&gt;骗子：“明天我去北京找你。”&lt;br /&gt;我：“好。”&lt;/p&gt;
&lt;p&gt;=========================== 第一部分结束============================&lt;/p&gt;
&lt;p&gt;第二天，&lt;/p&gt;
&lt;p&gt;骗子：“XX，我这边办事儿钱不够了，先借我点钱行不？8K就行了”&lt;/p&gt;
&lt;p&gt;我：“你的卡号发我？”（我很信任这个朋友，虽然我觉得以他的财力根本不可能去借钱）&lt;/p&gt;
&lt;p&gt;骗子：“我没带卡，我发你我朋友的卡”&lt;/p&gt;
&lt;p&gt;我此时才觉得对方肯定是个骗子，因为谁回国会他妈的忘记带银行卡！！！&lt;/p&gt;
&lt;p&gt;于是我登陆了gtalk，发现这位朋友在线。&lt;/p&gt;
&lt;p&gt;我灵机一动，要骗子在gtalk上给我发个消息。&lt;/p&gt;
&lt;p&gt;骗子：“你是不信任我是吧？”&lt;/p&gt;
&lt;p&gt;我：“你用gtalk给我发个消息我就给你转钱”&lt;/p&gt;
&lt;p&gt;骗子：“啥？”（骗子估计没听过gtalk，只会QQ）&lt;br /&gt;“你是不相信我是吧”（此时骗子提高了分贝数）&lt;/p&gt;
&lt;p&gt;我gtalk问了下我朋友，他说他没回过，还在澳洲。所以这时可以确定被骗了。&lt;br /&gt;我：“我操你姑奶奶的二舅的妹的。。。。……%&amp;amp;&amp;amp;*&amp;amp;*”&lt;/p&gt;
&lt;p&gt;骗子：“。。。。嘟嘟嘟”（挂电话了）&lt;/p&gt;
&lt;p&gt;。。。。。。。。&lt;/p&gt;
&lt;p&gt;我此刻满脸黑线。。。。&lt;/p&gt;
&lt;p&gt;=========================== 第二部分结束============================&lt;/p&gt;
&lt;p&gt;骗子骗术：事先得到你的手机号和你的名字，然后打电话给你，让你猜他的名字，在你说出了你朋友名字时，他顺势说你猜对了，他就是你说的那个人。然后并不急于立马向你要钱，他会说明天到你那里去找你。等到第二天，他会再给你打电弧找借口借钱。&lt;/p&gt;
&lt;p&gt;骗子电话：&lt;strong&gt;&lt;font size=&quot;3&quot;&gt;13790942055&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;求骚扰，求组队攻击骗子啊！！！！大家可以去和骗子玩玩。。没准你还能从它那里骗来钱呢。。&lt;/p&gt;
&lt;ul class=&quot;related_post&quot;&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/05/61b11ad9jw1dgiip0xm7qj.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;Social Medias Connect（社交媒体连接）&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/products/plugins/social-medias-connect&quot; title=&quot;Social Medias Connect（社交媒体连接）&quot;&gt;Social Medias Connect（社交媒体连接）&lt;/a&gt; (460)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/themes/windPaled/images/default-thumb.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;Guestbook&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/guestbook&quot; title=&quot;Guestbook&quot;&gt;Guestbook&lt;/a&gt; (365)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2010/08/1de9fb000bac.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;插件发布：边栏最新评论及ajax回复——WP RC Reply AJAX&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html&quot; title=&quot;插件发布：边栏最新评论及ajax回复——WP RC Reply AJAX&quot;&gt;插件发布：边栏最新评论及ajax回复——WP RC Reply AJAX&lt;/a&gt; (190)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2010/08/spam5.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;围观wordpress中文圈内好玩的spam&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2010/08/31/chinese-circle-surrounding-wordpress-spam-fun.html&quot; title=&quot;围观wordpress中文圈内好玩的spam&quot;&gt;围观wordpress中文圈内好玩的spam&lt;/a&gt; (133)&lt;/li&gt;&lt;li class=&quot;last&quot;&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2010/8c442710e869_BD9F/wp-enjoy-reading.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;【插件发布】WP Enjoy Reading(尽享阅读)&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2010/10/10/wordpress-plugin-wp-enjoy-reading.html&quot; title=&quot;【插件发布】WP Enjoy Reading(尽享阅读)&quot;&gt;【插件发布】WP Enjoy Reading(尽享阅读)&lt;/a&gt; (133)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;声明:&lt;/strong&gt; 本站遵循 &lt;a href=&quot;http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/&quot;&gt;署名-非商业性使用-相同方式共享 3.0&lt;/a&gt; 共享协议. 转载请注明转自 &lt;a href=&quot;http://www.qiqiboy.com&quot;&gt;I'm qiqiboy !&lt;/a&gt; &lt;/p&gt; &lt;p&gt;本文地址: &lt;a href=&quot;http://qiqi.boy.im/fi&quot;&gt;http://qiqi.boy.im/fi&lt;a&gt;&lt;/p&gt;&lt;span style=&quot;background:#cc5566;color:#fffff;&quot;&gt;&lt;h4&gt;Look, this post is replyed so hot, let's go O(∩_∩)O~.&lt;/h4&gt;&lt;/span&gt;&lt;h3&gt;Related comments&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;2012年04月9日, &lt;a href=&quot;http://www.qiqiboy.com/2012/03/23/there-is-a-cheater.html#comment-17929&quot;&gt;刘印博客&lt;/a&gt; say: 学到了，这是新招哟。 哈哈&lt;/li&gt;&lt;li&gt;2012年04月9日, &lt;a href=&quot;http://www.qiqiboy.com/2012/03/23/there-is-a-cheater.html#comment-17927&quot;&gt;岸边&lt;/a&gt; say: 直接打一毛钱 对方付手续费，嘎嘎&lt;/li&gt;&lt;li&gt;2012年04月9日, &lt;a href=&quot;http://www.qiqiboy.com/2012/03/23/there-is-a-cheater.html#comment-17926&quot;&gt;wmtimes&lt;/a&gt; say: 去骗骗子的钱还是不错的。&lt;/li&gt;&lt;li&gt;2012年04月9日, &lt;a href=&quot;http://www.qiqiboy.com/2012/03/23/there-is-a-cheater.html#comment-17925&quot;&gt;mopvhs&lt;/a&gt; say: 没听说过GTalk的骗子当时就斯巴达了~~&lt;/li&gt;&lt;li&gt;2012年04月6日, &lt;a href=&quot;http://www.qiqiboy.com/2012/03/23/there-is-a-cheater.html#comment-17916&quot;&gt;宝佑博客&lt;/a&gt; say: 不是我说，这年头骗子的胆量真的很大，而且手法多变态都有，钱，只有在自己手里才是安全的！&lt;/li&gt;&lt;li&gt;2012年04月5日, &lt;a href=&quot;http://www.qiqiboy.com/2012/03/23/there-is-a-cheater.html#comment-17909&quot;&gt;queenpro911&lt;/a&gt; say: 哈哈哈哈，我有手机攻击器。 就是无限发送垃圾短信的，我帮你干他。~&lt;/li&gt;&lt;li&gt;2012年04月4日, &lt;a href=&quot;http://www.qiqiboy.com/2012/03/23/there-is-a-cheater.html#comment-17879&quot;&gt;分享元素&lt;/a&gt; say: 最近这种骗子越来越多了&lt;/li&gt;&lt;li&gt;2012年03月30日, &lt;a href=&quot;http://www.qiqiboy.com/2012/03/23/there-is-a-cheater.html#comment-17803&quot;&gt;qiqiboy&lt;/a&gt; say: &lt;a href=&quot;#comment-17796&quot; rel=&quot;nofollow&quot;&gt;@Eversiming &lt;/a&gt; 
嗯，对，粤语口音。。我帮他当成我国外一位朋友了。。&lt;/li&gt;&lt;/ul&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/631644834/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644834/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.qiqiboy.com/2012/03/23/there-is-a-cheater.html/feed</wfw:commentRss><slash:comments>31</slash:comments><description>昨晚接到一电话： 骗子：“XX，我到天津办事儿。你能猜到我是谁么？” 我：“额。。。你是A还是B？” 骗子：“嗯，对。”（我从这里开始以为对方就是B了） 我：“你不是在国外么，怎么突然回来了” 骗子：“。。。。。。。”骗子：“明天我去北京找你。”我：“好。” =========================== 第一部分结束============================ 第二天， 骗子：“XX，我这边办事儿钱不够了，先借我点钱行不？8K就行了” 我：“你的卡号发我？”（我很信任这个朋友，虽然我觉得以他的财力根本不可能去借钱） 骗子：“我没带卡，我发你我朋友的卡” 我此时才觉得对方肯定是个骗子，因为谁回国会他妈的忘记带银行卡！！！ 于是我登陆了gtalk，发现这位朋友在线。 我灵机一动，要骗子在gtalk上给我发个消息。 骗子：“你是不信任我是吧？” 我：“你用gtalk给我发个消息我就给你转钱” 骗子：“啥？”（骗子估计没听过gtalk，只会QQ）“你是不相信我是吧”（此时骗子提高了分贝数） 我gtalk问了下我朋友，他说他没回过，还在澳洲。所以这时可以确定被骗了。我：“我操你姑奶奶的二舅的妹的。。。。……%&amp;#38;&amp;#38;*&amp;#38;*” 骗子：“。。。。嘟嘟嘟”（挂电话了） 。。。。。。。。 我此刻满脸黑线。。。。 =========================== 第二部分结束============================ 骗子骗术：事先得到你的手机号和你的名字，然后打电话给你，让你猜他的名字，在你说出了你朋友名字时，他顺势说你猜对了，他就是你说的那个人。然后并不急于立马向你要钱，他会说明天到你那里去找你。等到第二天，他会再给你打电弧找借口借钱。 骗子电话：13790942055 求骚扰，求组队攻击骗子啊！！！！大家可以去和骗子玩玩。。没准你还能从它那里骗来钱呢。。 Social Medias Connect（社交媒体连接） (460)Guestbook (365)插件发布：边栏最新评论及ajax回复——WP RC Reply AJAX (190)围观wordpress中文圈内好玩的spam (133)【插件发布】WP Enjoy Reading(尽享阅读) (133)声明: [...]&lt;img src=&quot;http://www1.feedsky.com/t1/631644834/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644834/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>骗子</category><category>Myself-Life</category><pubDate>Fri, 23 Mar 2012 10:11:22 +0800</pubDate><author>qiqiboy</author><comments>http://www.qiqiboy.com/2012/03/23/there-is-a-cheater.html#comments</comments><guid isPermaLink="false">http://www.qiqiboy.com/2012/03/23/there-is-a-cheater.html</guid><dc:creator>qiqiboy</dc:creator><fs:srclink>http://www.qiqiboy.com/2012/03/23/there-is-a-cheater.html</fs:srclink><fs:srcfeed>http://www.qiqiboy.com/feed</fs:srcfeed><fs:itemid>feedsky/qiqiboy/~7883632/631644834/5446216</fs:itemid></item><item><title>TouchSlider 1.0 – 兼容触摸屏手机与PC的幻灯片</title><link>http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644835/5446216/1/item.html</link><content:encoded>&lt;blockquote&gt;&lt;p&gt;注：应该是不支持IE6的。支持安卓系、iOS苹果机、平板以及PC上的浏览器，包括IE7、IE8等。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img title=&quot;捕获&quot; style=&quot;border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto&quot; border=&quot;0&quot; alt=&quot;捕获&quot; src=&quot;http://www.qiqiboy.com/wp-content/uploads/2012/01/688860f891c5.png&quot; width=&quot;550&quot; height=&quot;422&quot;&gt;触屏手机越来越流行，所以制作网站也要越来越多的考虑手机用户的使用体验。网站上如果有轮换图片的幻灯片（走马灯）之类的功能，就要考虑触屏手机用户的使用体验，而提供他们可以通过手指滑动来切换上一张/下一张的功能，将会是很大的体验提升。&lt;/p&gt;
&lt;p&gt;基于此考虑，我在参考了&lt;a href=&quot;http://swipejs.com/&quot; target=&quot;_blank&quot;&gt;Swipe&lt;/a&gt;的实现后，开发了可以同时支持触屏手机手指滑动与PC上鼠标点击滑动的一段脚本，命名为“TouchSlider”。(已经有叫这个名字的脚本了？俺NO Care ^_^)。&lt;/p&gt;
&lt;h3&gt;为什么开发这个东西&lt;/h3&gt;
&lt;p&gt;上面已经说了，是为了支持触屏手机。其实还有一个更重要的原因是，为了适应手机版网站的自适应宽度特性。&lt;/p&gt;
&lt;p&gt;由于手机、平板终端的多样性，其手机屏的分辨率各不相同，而许多网站为了适应多种设备的显示，往往是使用了自适应宽度的设计，也就是说页面宽度会随着所使用的设备的分辨率不同而有所变化，旋转设备方向后网站宽度也会变化。&lt;/p&gt;
&lt;p&gt;之前的许多幻灯脚本只支持固定高宽的幻灯显示，所以在手机上并不能很好的工作。&lt;/p&gt;
&lt;h3&gt;这个TouchSlider的特点&lt;/h3&gt;
&lt;p&gt;也没什么特别的，主要是以下几点：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;无JS库依赖，使用原生javascript开发。&lt;/strong&gt;&lt;br /&gt;手机端我个人并不建议载入太多JS，能少一个请求少一个。尤其是如果为了一个很小的功能而去载入一个jQuery或者prototype之类的库，有点太不划算了。TouchSlider整个脚本大小约12KB，压缩后只有6KB。
&lt;li&gt;&lt;strong&gt;触摸滑动与点击拖动切换全支持&lt;br /&gt;&lt;/strong&gt;支持触屏手机上的触摸滑动切换，也支持PC上的点击拖动切换。详细可以参见DEMO页面，并实际使用体验。用触屏手机的可以用手指滑动切换，电脑端的用户可以用鼠标点击拖动切换。
&lt;li&gt;&lt;strong&gt;幻灯支持多个方向切换&lt;br /&gt;&lt;/strong&gt;支持向左、向右以及向上和向下滑动切换。
&lt;li&gt;&lt;strong&gt;支持自适应浏览器宽度&lt;br /&gt;&lt;/strong&gt;手机横竖屏切换或者改变浏览器宽度时，全宽度幻灯依然能正常工作适应 &lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;TouchSlider的使用以及demo&lt;/h3&gt;
&lt;p&gt;使用方法，载入TouchSlider的脚本文件，然后可以通过实例化“TouchSlider”这个类来使用。例如：&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; background-color: #f4f4f4&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;
&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; TouchSlider({&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum2&quot; style=&quot;color: #606060&quot;&gt;   2:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'id'&lt;/span&gt;: &lt;span style=&quot;color: #006080&quot;&gt;'slider'&lt;/span&gt;, &lt;span style=&quot;color: #008000&quot;&gt;//幻灯容器的id&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum3&quot; style=&quot;color: #606060&quot;&gt;   3:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'auto'&lt;/span&gt;: 0, &lt;span style=&quot;color: #008000&quot;&gt;//是否自动开始，负数表示非自动开始，0,1,2,3....表示自动开始以及从第几个开始&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum4&quot; style=&quot;color: #606060&quot;&gt;   4:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'speed'&lt;/span&gt;:600, &lt;span style=&quot;color: #008000&quot;&gt;//动画效果持续时间 ms&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum5&quot; style=&quot;color: #606060&quot;&gt;   5:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'timeout'&lt;/span&gt;:5000,&lt;span style=&quot;color: #008000&quot;&gt;//幻灯切换的间隔时间 ms&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum6&quot; style=&quot;color: #606060&quot;&gt;   6:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'className'&lt;/span&gt;:&lt;span style=&quot;color: #006080&quot;&gt;''&lt;/span&gt;, &lt;span style=&quot;color: #008000&quot;&gt;//每个幻灯所在的li标签的classname,&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum7&quot; style=&quot;color: #606060&quot;&gt;   7:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'direction'&lt;/span&gt;:&lt;span style=&quot;color: #006080&quot;&gt;'left'&lt;/span&gt;, &lt;span style=&quot;color: #008000&quot;&gt;//left right up down&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum8&quot; style=&quot;color: #606060&quot;&gt;   8:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'mouseWheel'&lt;/span&gt;:&lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;,&lt;span style=&quot;color: #008000&quot;&gt;//是否支持鼠标滚轮&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum9&quot; style=&quot;color: #606060&quot;&gt;   9:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'before'&lt;/span&gt;:&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Function(),&lt;span style=&quot;color: #008000&quot;&gt;//幻灯切换前的回调&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum10&quot; style=&quot;color: #606060&quot;&gt;  10:&lt;/span&gt;     &lt;span style=&quot;color: #006080&quot;&gt;'after'&lt;/span&gt;:&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Function() &lt;span style=&quot;color: #008000&quot;&gt;//幻灯切换后的回调&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum11&quot; style=&quot;color: #606060&quot;&gt;  11:&lt;/span&gt; });&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum12&quot; style=&quot;color: #606060&quot;&gt;  12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;这样子幻灯就会工作了。&lt;/p&gt;
&lt;p&gt;当然，为了方便用户通过点击“上一张”/“下一张”来切换，实例化后的这个对象也具有一些方法来很方便的进行操作：&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; max-height: 200px; background-color: #f4f4f4&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;
&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum1&quot; style=&quot;color: #606060&quot;&gt;   1:&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; slider=&lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; TouchSlider({id:&lt;span style=&quot;color: #006080&quot;&gt;'slider'&lt;/span&gt;});&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum2&quot; style=&quot;color: #606060&quot;&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum3&quot; style=&quot;color: #606060&quot;&gt;   3:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;//切换上一张&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum4&quot; style=&quot;color: #606060&quot;&gt;   4:&lt;/span&gt; slider.prev();&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum5&quot; style=&quot;color: #606060&quot;&gt;   5:&lt;/span&gt;  &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum6&quot; style=&quot;color: #606060&quot;&gt;   6:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;//切换下一张&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum7&quot; style=&quot;color: #606060&quot;&gt;   7:&lt;/span&gt; slider.next();&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum8&quot; style=&quot;color: #606060&quot;&gt;   8:&lt;/span&gt;  &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum9&quot; style=&quot;color: #606060&quot;&gt;   9:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;//向前或者向后切换N张，例如，向前切换2张，可以通过 slider.prev(2) 来实现&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum10&quot; style=&quot;color: #606060&quot;&gt;  10:&lt;/span&gt; sldier.prev(num);&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum11&quot; style=&quot;color: #606060&quot;&gt;  11:&lt;/span&gt; slider.next(num);&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum12&quot; style=&quot;color: #606060&quot;&gt;  12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum13&quot; style=&quot;color: #606060&quot;&gt;  13:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;//暂停幻灯播放&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum14&quot; style=&quot;color: #606060&quot;&gt;  14:&lt;/span&gt; slider.pause();&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum15&quot; style=&quot;color: #606060&quot;&gt;  15:&lt;/span&gt;  &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum16&quot; style=&quot;color: #606060&quot;&gt;  16:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;//开始播放&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum17&quot; style=&quot;color: #606060&quot;&gt;  17:&lt;/span&gt; slider.begin();&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum18&quot; style=&quot;color: #606060&quot;&gt;  18:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum19&quot; style=&quot;color: #606060&quot;&gt;  19:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;//停止播放&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum20&quot; style=&quot;color: #606060&quot;&gt;  20:&lt;/span&gt; slider.stop();&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum21&quot; style=&quot;color: #606060&quot;&gt;  21:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum22&quot; style=&quot;color: #606060&quot;&gt;  22:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;//播放第N张幻灯片。N等于0,1,2...幻灯片数量&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum23&quot; style=&quot;color: #606060&quot;&gt;  23:&lt;/span&gt; sldier.slide(N)&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum24&quot; style=&quot;color: #606060&quot;&gt;  24:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum25&quot; style=&quot;color: #606060&quot;&gt;  25:&lt;/span&gt; &lt;span style=&quot;color: #008000&quot;&gt;//TouchSlider对象具有的其他属性&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum26&quot; style=&quot;color: #606060&quot;&gt;  26:&lt;/span&gt; slider.index &lt;span style=&quot;color: #008000&quot;&gt;//当前显示的幻灯的次序&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum27&quot; style=&quot;color: #606060&quot;&gt;  27:&lt;/span&gt; slider.length &lt;span style=&quot;color: #008000&quot;&gt;//幻灯片数量&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum28&quot; style=&quot;color: #606060&quot;&gt;  28:&lt;/span&gt; slider.width, slider.height &lt;span style=&quot;color: #008000&quot;&gt;//幻灯当前的宽度 高度（可能会随着浏览器尺寸变化而变化）&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white&quot;&gt;&lt;span id=&quot;lnum29&quot; style=&quot;color: #606060&quot;&gt;  29:&lt;/span&gt; slider.status &lt;span style=&quot;color: #008000&quot;&gt;//幻灯的状态。0表示停止，1表示正在播放，2表示暂停。-1表示脚本出错。如果出错，slider.errorInfo提供了出错信息&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4&quot;&gt;&lt;span id=&quot;lnum30&quot; style=&quot;color: #606060&quot;&gt;  30:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;具体的效果以及使用可以参见我提供的 &lt;a href=&quot;http://qiqiboy.sinaapp.com/touchslider/&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;DEMO&lt;/strong&gt;&lt;/a&gt; （可以用你的安卓或者苹果手机访问&lt;a href=&quot;http://qiqiboy.sinaapp.com/touchslider/&quot;&gt;http://qiqiboy.sinaapp.com/touchslider/&lt;/a&gt; 体验。PC用户可以使用鼠标拖拽模拟触摸操作）。可以通过改变浏览器宽度或者横竖屏切换来查看幻灯的自适应效果。&lt;/p&gt;
&lt;p&gt;源码下载点击&lt;a href=&quot;http://qiqiboy.sinaapp.com/myJS/touchslider.dev.js&quot; target=&quot;_blank&quot;&gt;此处下载&lt;/a&gt;。&lt;/p&gt;
&lt;ul class=&quot;related_post&quot;&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/07/810CI55J_0.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;JavaScript: 支持iphone、ipad 使用两根手指放大图片&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html&quot; title=&quot;JavaScript: 支持iphone、ipad 使用两根手指放大图片&quot;&gt;JavaScript: 支持iphone、ipad 使用两根手指放大图片&lt;/a&gt; (20)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/01/Pompidou_ZH-CN3304850761.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;终极完美版javascript获取并限制调整图片尺寸&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/01/30/javascript-and-limit-access-to-adjust-the-picture-size.html&quot; title=&quot;终极完美版javascript获取并限制调整图片尺寸&quot;&gt;终极完美版javascript获取并限制调整图片尺寸&lt;/a&gt; (44)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2012/04/QQ20120409181449.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html&quot; title=&quot;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯&quot;&gt;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯&lt;/a&gt; (9)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/06/5.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;wordpress的微博时间显示方法&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/06/10/sina-weibo-timestamp-function-2.html&quot; title=&quot;wordpress的微博时间显示方法&quot;&gt;wordpress的微博时间显示方法&lt;/a&gt; (18)&lt;/li&gt;&lt;li class=&quot;last&quot;&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/05/imgready.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;javascript 图片预加载（远程获取图片尺寸）&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/05/20/javascript-image-preload.html&quot; title=&quot;javascript 图片预加载（远程获取图片尺寸）&quot;&gt;javascript 图片预加载（远程获取图片尺寸）&lt;/a&gt; (29)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;声明:&lt;/strong&gt; 本站遵循 &lt;a href=&quot;http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/&quot;&gt;署名-非商业性使用-相同方式共享 3.0&lt;/a&gt; 共享协议. 转载请注明转自 &lt;a href=&quot;http://www.qiqiboy.com&quot;&gt;I'm qiqiboy !&lt;/a&gt; &lt;/p&gt; &lt;p&gt;本文地址: &lt;a href=&quot;http://qiqi.boy.im/fg&quot;&gt;http://qiqi.boy.im/fg&lt;a&gt;&lt;/p&gt;&lt;span style=&quot;background:#cc5566;color:#fffff;&quot;&gt;&lt;h4&gt;Look, this post is replyed so hot, let's go O(∩_∩)O~.&lt;/h4&gt;&lt;/span&gt;&lt;h3&gt;Related comments&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;2012年04月9日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html#comment-17928&quot;&gt;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯 - I&amp;#039;m qiqiboy !&lt;/a&gt; say: [...] 之前写过一个《TouchSlider 1.0 – 兼容触摸屏手机与PC的幻灯片》，那么这个TouchSliderBox和之前的TouchSlider有什么区别呢？ [...]&lt;/li&gt;&lt;li&gt;2012年04月1日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html#comment-17841&quot;&gt;leilei&lt;/a&gt; say: 嘻嘻，我又来顶一下。 &lt;img src='http://www.qiqiboy.com/wp-content/themes/windPaled/images/smiles/icon_cool.gif' alt=':cool:' class='wp-smiley' /&gt; &lt;/li&gt;&lt;li&gt;2012年04月1日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html#comment-17839&quot;&gt;TouchScroll 1.0 &amp;ndash; 统一视觉样式的容器滚动解决方案 - I&amp;#039;m qiqiboy !&lt;/a&gt; say: [...] TouchSlider 1.0 – 兼容触摸屏手机与PC的幻灯片 [...]&lt;/li&gt;&lt;li&gt;2012年03月17日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html#comment-17578&quot;&gt;苏州婚纱摄影&lt;/a&gt; say: 看起来是不错，就是不知道自己能不能搞的定啊！我的站：

http://www.zhenshi99.com，有时间帮踩下，感激不尽了！&lt;/li&gt;&lt;li&gt;2012年03月14日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html#comment-17546&quot;&gt;青浦房产&lt;/a&gt; say: 幻灯片知道 但代码就看不懂了&lt;/li&gt;&lt;li&gt;2012年03月13日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html#comment-17533&quot;&gt;爱音族&lt;/a&gt; say: 很给力啊！&lt;/li&gt;&lt;li&gt;2012年03月10日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html#comment-17430&quot;&gt;www.hioils.com&lt;/a&gt; say: 嗯。效果不错。一回来就出新作品了。支持。&lt;/li&gt;&lt;li&gt;2012年02月17日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html#comment-17182&quot;&gt;起航博客导航&lt;/a&gt; say: 不懂代码-_-&lt;/li&gt;&lt;/ul&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/631644835/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644835/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html/feed</wfw:commentRss><slash:comments>15</slash:comments><description>注：应该是不支持IE6的。支持安卓系、iOS苹果机、平板以及PC上的浏览器，包括IE7、IE8等。 触屏手机越来越流行，所以制作网站也要越来越多的考虑手机用户的使用体验。网站上如果有轮换图片的幻灯片（走马灯）之类的功能，就要考虑触屏手机用户的使用体验，而提供他们可以通过手指滑动来切换上一张/下一张的功能，将会是很大的体验提升。 基于此考虑，我在参考了Swipe的实现后，开发了可以同时支持触屏手机手指滑动与PC上鼠标点击滑动的一段脚本，命名为“TouchSlider”。(已经有叫这个名字的脚本了？俺NO Care ^_^)。 为什么开发这个东西 上面已经说了，是为了支持触屏手机。其实还有一个更重要的原因是，为了适应手机版网站的自适应宽度特性。 由于手机、平板终端的多样性，其手机屏的分辨率各不相同，而许多网站为了适应多种设备的显示，往往是使用了自适应宽度的设计，也就是说页面宽度会随着所使用的设备的分辨率不同而有所变化，旋转设备方向后网站宽度也会变化。 之前的许多幻灯脚本只支持固定高宽的幻灯显示，所以在手机上并不能很好的工作。 这个TouchSlider的特点 也没什么特别的，主要是以下几点： 无JS库依赖，使用原生javascript开发。手机端我个人并不建议载入太多JS，能少一个请求少一个。尤其是如果为了一个很小的功能而去载入一个jQuery或者prototype之类的库，有点太不划算了。TouchSlider整个脚本大小约12KB，压缩后只有6KB。 触摸滑动与点击拖动切换全支持支持触屏手机上的触摸滑动切换，也支持PC上的点击拖动切换。详细可以参见DEMO页面，并实际使用体验。用触屏手机的可以用手指滑动切换，电脑端的用户可以用鼠标点击拖动切换。 幻灯支持多个方向切换支持向左、向右以及向上和向下滑动切换。 支持自适应浏览器宽度手机横竖屏切换或者改变浏览器宽度时，全宽度幻灯依然能正常工作适应 TouchSlider的使用以及demo 使用方法，载入TouchSlider的脚本文件，然后可以通过实例化“TouchSlider”这个类来使用。例如： 1: new TouchSlider({ 2: 'id': 'slider', //幻灯容器的id 3: 'auto': 0, //是否自动开始，负数表示非自动开始，0,1,2,3....表示自动开始以及从第几个开始 4: 'speed':600, //动画效果持续时间 ms 5: 'timeout':5000,//幻灯切换的间隔时间 ms 6: 'className':'', //每个幻灯所在的li标签的classname, 7: 'direction':'left', [...]&lt;img src=&quot;http://www1.feedsky.com/t1/631644835/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644835/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>code</category><category>代码</category><category>iphone</category><category>幻灯</category><category>javascript</category><category>JavaScript</category><category>安卓</category><category>技术</category><pubDate>Wed, 11 Jan 2012 20:39:41 +0800</pubDate><author>qiqiboy</author><comments>http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html#comments</comments><guid isPermaLink="false">http://www.qiqiboy.com/?p=2854</guid><dc:creator>qiqiboy</dc:creator><fs:srclink>http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html</fs:srclink><fs:srcfeed>http://www.qiqiboy.com/feed</fs:srcfeed><fs:itemid>feedsky/qiqiboy/~7883632/631644835/5446216</fs:itemid></item><item><title>qiqiboy归来 – 纯吐槽</title><link>http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644836/5446216/1/item.html</link><content:encoded>&lt;p&gt;博客很久没更新了，上次更新还是去年的9月16日了。算来已经快三个月了。当然，从没想过要把博客停掉，只是期间太多杂事，也没有折腾什么可分享的技术文。&lt;/p&gt;
&lt;p&gt;还是从最近来说。&lt;/p&gt;
&lt;h3&gt;订购火车票&lt;/h3&gt;
&lt;p&gt;&lt;img class=&quot;aligncenter size-full wp-image-2853&quot; title=&quot;61b11ad9tw1douqptegsnj&quot; alt=&quot;&quot; src=&quot;http://www.qiqiboy.com/wp-content/uploads/2012/01/61b11ad9tw1douqptegsnj.jpg&quot; width=&quot;955&quot; height=&quot;416&quot;&gt;今天早上一早7点半多我爬起来，打开12306.cn来定火车票，战战兢兢地连续登陆了几十遍后终于在八点15分时登陆了上去。然后是订票，依然是提交了无数遍后网站依然淡定的显示着“系统忙。。。”。我眼睁睁的看着卧铺票数量从“有”变成“10”最后成为“无”。最后三十分钟后，又一次提交订单时，终于看到了“有未完成订单”的提示。遂迅速付款完成车票购买。当然，只是硬座了。&lt;/p&gt;
&lt;p&gt;我已经问候了铁道部全家数遍。&lt;/p&gt;
&lt;h3&gt;网站宕机风波&lt;/h3&gt;
&lt;p&gt;1月5号之前的两周，我的博客访问的话会一直是“域名已被阻断”的提示。最初以为是暂时的，后来发现一个多星期了还是这个提示。于是我询问了万网（域名在万网）工作人员，答曰“域名正常解析，与他们无关”。于是联系了我的主机提供商，确认是机房屏蔽的，说是前段时间的数据库大面积泄露导致上头对未备案网站的监察收紧，他们临时屏蔽了未备案网站。我的域名是备过案的，所以我在提交了备案号后网站立马就解封了。&lt;/p&gt;
&lt;p&gt;重见天日了。&lt;/p&gt;
&lt;h3&gt;蜗居在帝都&lt;/h3&gt;
&lt;p&gt;正因为身在帝都苟活，所以才有了开头的订购火车票回家的需求。&lt;/p&gt;
&lt;p&gt;当然，求被请客，求腐败的需求也很旺盛。↖(^ω^)↗&lt;/p&gt;
&lt;h3&gt;博客未来&lt;/h3&gt;
&lt;p&gt;博客继续更新，内容依然是与javascript、wordpress等技术文为主。&lt;/p&gt;
&lt;p&gt;相信有不少之前的博客主都已经陆续离开这个圈子了，当然也有不少新人加入。有意与小站友链的，欢迎留言板申请。&lt;/p&gt;
&lt;p&gt;感谢各位支持。&lt;/p&gt;
&lt;ul class=&quot;related_post&quot;&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/05/200808311631407821.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;旅行在云南&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/05/27/i-am-traveling-in-yun-nan.html&quot; title=&quot;旅行在云南&quot;&gt;旅行在云南&lt;/a&gt; (36)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2009/10/20091023002_thumb.gif&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;最近口腔溃疡+牙龈疼&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2009/10/23/nothing-the-life.html&quot; title=&quot;最近口腔溃疡+牙龈疼&quot;&gt;最近口腔溃疡+牙龈疼&lt;/a&gt; (4)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/05/61b11ad9jw1dgiip0xm7qj.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;Social Medias Connect（社交媒体连接）&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/products/plugins/social-medias-connect&quot; title=&quot;Social Medias Connect（社交媒体连接）&quot;&gt;Social Medias Connect（社交媒体连接）&lt;/a&gt; (460)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/themes/windPaled/images/default-thumb.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;Guestbook&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/guestbook&quot; title=&quot;Guestbook&quot;&gt;Guestbook&lt;/a&gt; (365)&lt;/li&gt;&lt;li class=&quot;last&quot;&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2010/08/1de9fb000bac.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;插件发布：边栏最新评论及ajax回复——WP RC Reply AJAX&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2010/08/20/wordpress-plugin-wp-rc-reply-ajax.html&quot; title=&quot;插件发布：边栏最新评论及ajax回复——WP RC Reply AJAX&quot;&gt;插件发布：边栏最新评论及ajax回复——WP RC Reply AJAX&lt;/a&gt; (190)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;声明:&lt;/strong&gt; 本站遵循 &lt;a href=&quot;http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/&quot;&gt;署名-非商业性使用-相同方式共享 3.0&lt;/a&gt; 共享协议. 转载请注明转自 &lt;a href=&quot;http://www.qiqiboy.com&quot;&gt;I'm qiqiboy !&lt;/a&gt; &lt;/p&gt; &lt;p&gt;本文地址: &lt;a href=&quot;http://qiqi.boy.im/fd&quot;&gt;http://qiqi.boy.im/fd&lt;a&gt;&lt;/p&gt;&lt;span style=&quot;background:#cc5566;color:#fffff;&quot;&gt;&lt;h4&gt;Look, this post is replyed so hot, let's go O(∩_∩)O~.&lt;/h4&gt;&lt;/span&gt;&lt;h3&gt;Related comments&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;2012年04月4日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/08/qiqiboy-coming-again.html#comment-17865&quot;&gt;LL.CX&lt;/a&gt; say: 买票变得鸡巴容易了啊 ，直接付款 就行&lt;/li&gt;&lt;li&gt;2012年03月10日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/08/qiqiboy-coming-again.html#comment-17431&quot;&gt;www.hioils.com&lt;/a&gt; say: 期待你的新文章&lt;/li&gt;&lt;li&gt;2012年02月9日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/08/qiqiboy-coming-again.html#comment-17140&quot;&gt;爱蝌蚪&lt;/a&gt; say: 期待你的新文章&lt;/li&gt;&lt;li&gt;2012年02月8日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/08/qiqiboy-coming-again.html#comment-17133&quot;&gt;刘学政博客&lt;/a&gt; say: 老兄终于回来了，以后要加强更新啊&lt;/li&gt;&lt;li&gt;2012年01月16日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/08/qiqiboy-coming-again.html#comment-16934&quot;&gt;掌柜的马甲&lt;/a&gt; say: 欢迎回来~网上买票买的早,没有遇到啥麻烦&lt;/li&gt;&lt;li&gt;2012年01月15日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/08/qiqiboy-coming-again.html#comment-16924&quot;&gt;超人&lt;/a&gt; say: 乍一看以为是船票~~没想到是帝都出来的火车票。哈哈。今年不用再为购票而烦恼了 &lt;img src='http://www.qiqiboy.com/wp-content/themes/windPaled/images/smiles/icon_twisted.gif' alt=':twisted:' class='wp-smiley' /&gt; &lt;/li&gt;&lt;li&gt;2012年01月13日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/08/qiqiboy-coming-again.html#comment-16891&quot;&gt;康康&lt;/a&gt; say: 春节不回家，离家近感受不到买票的热闹氛围确实是一大憾事。&lt;/li&gt;&lt;li&gt;2012年01月12日, &lt;a href=&quot;http://www.qiqiboy.com/2012/01/08/qiqiboy-coming-again.html#comment-16882&quot;&gt;jixiangac&lt;/a&gt; say: 网上有个利用FIREBUG购票攻略的，很牛的&lt;/li&gt;&lt;/ul&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/631644836/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644836/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.qiqiboy.com/2012/01/08/qiqiboy-coming-again.html/feed</wfw:commentRss><slash:comments>49</slash:comments><description>博客很久没更新了，上次更新还是去年的9月16日了。算来已经快三个月了。当然，从没想过要把博客停掉，只是期间太多杂事，也没有折腾什么可分享的技术文。 还是从最近来说。 订购火车票 今天早上一早7点半多我爬起来，打开12306.cn来定火车票，战战兢兢地连续登陆了几十遍后终于在八点15分时登陆了上去。然后是订票，依然是提交了无数遍后网站依然淡定的显示着“系统忙。。。”。我眼睁睁的看着卧铺票数量从“有”变成“10”最后成为“无”。最后三十分钟后，又一次提交订单时，终于看到了“有未完成订单”的提示。遂迅速付款完成车票购买。当然，只是硬座了。 我已经问候了铁道部全家数遍。 网站宕机风波 1月5号之前的两周，我的博客访问的话会一直是“域名已被阻断”的提示。最初以为是暂时的，后来发现一个多星期了还是这个提示。于是我询问了万网（域名在万网）工作人员，答曰“域名正常解析，与他们无关”。于是联系了我的主机提供商，确认是机房屏蔽的，说是前段时间的数据库大面积泄露导致上头对未备案网站的监察收紧，他们临时屏蔽了未备案网站。我的域名是备过案的，所以我在提交了备案号后网站立马就解封了。 重见天日了。 蜗居在帝都 正因为身在帝都苟活，所以才有了开头的订购火车票回家的需求。 当然，求被请客，求腐败的需求也很旺盛。↖(^ω^)↗ 博客未来 博客继续更新，内容依然是与javascript、wordpress等技术文为主。 相信有不少之前的博客主都已经陆续离开这个圈子了，当然也有不少新人加入。有意与小站友链的，欢迎留言板申请。 感谢各位支持。 旅行在云南 (36)最近口腔溃疡+牙龈疼 (4)Social Medias Connect（社交媒体连接） (460)Guestbook (365)插件发布：边栏最新评论及ajax回复——WP RC Reply AJAX (190)声明: 本站遵循 署名-非商业性使用-相同方式共享 3.0 共享协议. 转载请注明转自 I'm qiqiboy ! 本文地址: http://qiqi.boy.im/fdLook, this post is replyed [...]&lt;img src=&quot;http://www1.feedsky.com/t1/631644836/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644836/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>工作</category><category>生活</category><category>Myself-Life</category><category>吐槽</category><category>life</category><pubDate>Sun, 08 Jan 2012 12:50:58 +0800</pubDate><author>qiqiboy</author><comments>http://www.qiqiboy.com/2012/01/08/qiqiboy-coming-again.html#comments</comments><guid isPermaLink="false">http://www.qiqiboy.com/2012/01/08/qiqiboy-coming-again.html</guid><dc:creator>qiqiboy</dc:creator><fs:srclink>http://www.qiqiboy.com/2012/01/08/qiqiboy-coming-again.html</fs:srclink><fs:srcfeed>http://www.qiqiboy.com/feed</fs:srcfeed><fs:itemid>feedsky/qiqiboy/~7883632/631644836/5446216</fs:itemid></item><item><title>社交媒体连接 V1.6更新 支持facebook 完全重写的注册流程</title><link>http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644837/5446216/1/item.html</link><content:encoded>&lt;p&gt;这几天抽空对我的插件 &lt;a href=&quot;http://www.qiqiboy.com/products/plugins/social-medias-connect&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;社交媒体连接&lt;/strong&gt;&lt;/a&gt; 进行了更新，一连更新了三个版本，新增的特性如下：&lt;/p&gt;
&lt;h3&gt;增加对facebook的支持&lt;/h3&gt;
&lt;p&gt;使用了V1.6的同学应该已经在后台看到facebook的连接登陆图标。需要说明的是，管理员在启用facebook连接注册前，自己一定要到后台的 “绑定微博同步文章” 页面， 点击facebook的登陆连接，在弹出的要求输入facebook appid窗口中，填写为你网站申请的appid和appsecret。（不知道如何申请，那还是不要用facebook了）&lt;img style=&quot;display: block; float: none; margin-left: auto; margin-right: auto&quot; title=&quot;fb1&quot; alt=&quot;fb1&quot; src=&quot;http://www.qiqiboy.com/wp-content/uploads/2011/09/fb1.png&quot; width=&quot;397&quot; height=&quot;376&quot; /&gt;&lt;/p&gt;
&lt;p&gt;设置完成后，你的网站用户才可以在前台使用facebook连接功能。&lt;/p&gt;
&lt;p&gt;如果要修改输入的appid和appsecret。可以点击facebook连接按钮右边的“修改appKey”按钮，进行修改操作。&lt;/p&gt;
&lt;h3&gt;完全重写的账户注册流程&lt;/h3&gt;
&lt;p&gt;这是V1.6重点功能。原先的账号注册流程是：&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;用户点击微博连接 –》 带入到微博授权页面 –》 授权后返回网站 –》 获得授权的用户信息 –》 使用这些信息自动为用户建立账号 &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;上面的缺点是，整个过程是自动的，用户没有选择用户名、邮箱的权利。尤其是邮箱，由于权限限制，即使授权后也无法获得用户的真实邮箱，所以使用虚拟的邮箱为用户注册后，用户也无法即时从网站得到信息（如评论回复信息）。&lt;/p&gt;
&lt;p&gt;新的注册流程，在最后一步，将用户带到一个全新的注册页面，让他输入自己的真实可用的邮箱，这样一来就避免了上面的不足。并且如果用户愿意，他还可以自行更换一个用户名，并修改自己的网站地址（默认是用户的微博地址）。&lt;/p&gt;
&lt;p&gt;最重要的是，使用新的注册流程后，旧的注册用户完全不受影响。&lt;/p&gt;
&lt;p&gt;&lt;img style=&quot;display: inline&quot; title=&quot;ty&quot; alt=&quot;ty&quot; src=&quot;http://www.qiqiboy.com/wp-content/uploads/2011/09/ty.png&quot; width=&quot;503&quot; height=&quot;564&quot; /&gt;&lt;/p&gt;
&lt;p&gt;欢迎大家去更新最新版。&lt;a href=&quot;http://wordpress.org/extend/plugins/social-medias-connect/&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;wordpress官方下载地址&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;#160;&lt;/p&gt;
&lt;p&gt;有任何问题可以在新浪微博：&lt;a href=&quot;http://weibo.com/qiqiboy&quot; target=&quot;_blank&quot;&gt;http://weibo.com/qiqiboy&lt;/a&gt; 或者我博客任意页面留言交流。&lt;/p&gt;
&lt;ul class=&quot;related_post&quot;&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/04/smc-plugin.gif&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;Social Medias Connect V1.3发布 新增图片同步&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/04/21/social-medias-connect-v1-3.html&quot; title=&quot;Social Medias Connect V1.3发布 新增图片同步&quot;&gt;Social Medias Connect V1.3发布 新增图片同步&lt;/a&gt; (25)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/04/a9dff5b61cf6.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;WordPress插件发布: Social Medias Connect&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/04/15/publish-social-medias-connect.html&quot; title=&quot;WordPress插件发布: Social Medias Connect&quot;&gt;WordPress插件发布: Social Medias Connect&lt;/a&gt; (83)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/05/fanfousmc.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;有关社交媒体连接插件对饭否、follow5支持的说明&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/05/12/social-medias-connect-about-fanfou-and-follow5.html&quot; title=&quot;有关社交媒体连接插件对饭否、follow5支持的说明&quot;&gt;有关社交媒体连接插件对饭否、follow5支持的说明&lt;/a&gt; (32)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/04/comemnt-format.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;Social Medias Connect V1.4更新，自定义同步格式 vs 标签、摘要同步&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/04/26/social-medias-connect-v1-4.html&quot; title=&quot;Social Medias Connect V1.4更新，自定义同步格式 vs 标签、摘要同步&quot;&gt;Social Medias Connect V1.4更新，自定义同步格式 vs 标签、摘要同步&lt;/a&gt; (50)&lt;/li&gt;&lt;li class=&quot;last&quot;&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/04/ttt.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;新玩意儿-Social Medias Connect 微博连接&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/04/14/social-medias-connect-plugin.html&quot; title=&quot;新玩意儿-Social Medias Connect 微博连接&quot;&gt;新玩意儿-Social Medias Connect 微博连接&lt;/a&gt; (67)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;声明:&lt;/strong&gt; 本站遵循 &lt;a href=&quot;http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/&quot;&gt;署名-非商业性使用-相同方式共享 3.0&lt;/a&gt; 共享协议. 转载请注明转自 &lt;a href=&quot;http://www.qiqiboy.com&quot;&gt;I'm qiqiboy !&lt;/a&gt; &lt;/p&gt; &lt;p&gt;本文地址: &lt;a href=&quot;http://qiqi.boy.im/f8&quot;&gt;http://qiqi.boy.im/f8&lt;a&gt;&lt;/p&gt;&lt;span style=&quot;background:#cc5566;color:#fffff;&quot;&gt;&lt;h4&gt;Look, this post is replyed so hot, let's go O(∩_∩)O~.&lt;/h4&gt;&lt;/span&gt;&lt;h3&gt;Related comments&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;2012年04月15日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/16/socila-medias-connect-1-6-update.html#comment-18022&quot;&gt;Name (required)&lt;/a&gt; say: &lt;blockquote cite=&quot;#commentbody-16006&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-16006&quot; rel=&quot;nofollow&quot;&gt;笑话皇后&lt;/a&gt; :&lt;/strong&gt;
博主的博客很专业，我学到了很多东西。目前已经用上了你的一个插件。
&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;2012年03月17日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/16/socila-medias-connect-1-6-update.html#comment-17579&quot;&gt;AuZeonfung&lt;/a&gt; say: 一直在用這個插件，我填入了FB的appid和appsecret但是有動態的時候都不會同步到FB，是這個插件沒有這個功能嗎？還是我人品問題？&lt;/li&gt;&lt;li&gt;2011年12月16日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/16/socila-medias-connect-1-6-update.html#comment-16454&quot;&gt;蓝颜博客&lt;/a&gt; say: 第一次过来，围观一下&lt;/li&gt;&lt;li&gt;2011年11月26日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/16/socila-medias-connect-1-6-update.html#comment-16006&quot;&gt;笑话皇后&lt;/a&gt; say: 博主的博客很专业，我学到了很多东西。目前已经用上了你的一个插件。&lt;/li&gt;&lt;li&gt;2011年11月14日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/16/socila-medias-connect-1-6-update.html#comment-15581&quot;&gt;微代码-鸿枫业&lt;/a&gt; say: 我又来看你的新博了~~支持一下&lt;/li&gt;&lt;li&gt;2011年11月12日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/16/socila-medias-connect-1-6-update.html#comment-15571&quot;&gt;大学便民网&lt;/a&gt; say: 收下了 还不错 之前的bug解决的了不少 但是不知道用户名太长这个解决了没 之前是太长不能注册
顺便问下 你的评论框这的编辑器怎么弄的呢？&lt;/li&gt;&lt;li&gt;2011年11月3日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/16/socila-medias-connect-1-6-update.html#comment-15403&quot;&gt;懒人工具&lt;/a&gt; say: &lt;a href=&quot;http://www.lrtool.net/&quot; rel=&quot;nofollow&quot;&gt;懒人&lt;/a&gt;已阅，哈哈&lt;/li&gt;&lt;li&gt;2011年11月3日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/16/socila-medias-connect-1-6-update.html#comment-15402&quot;&gt;s.ing&lt;/a&gt; say: 支持！&lt;/li&gt;&lt;/ul&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/631644837/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644837/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.qiqiboy.com/2011/09/16/socila-medias-connect-1-6-update.html/feed</wfw:commentRss><slash:comments>42</slash:comments><description>这几天抽空对我的插件 社交媒体连接 进行了更新，一连更新了三个版本，新增的特性如下： 增加对facebook的支持 使用了V1.6的同学应该已经在后台看到facebook的连接登陆图标。需要说明的是，管理员在启用facebook连接注册前，自己一定要到后台的 “绑定微博同步文章” 页面， 点击facebook的登陆连接，在弹出的要求输入facebook appid窗口中，填写为你网站申请的appid和appsecret。（不知道如何申请，那还是不要用facebook了） 设置完成后，你的网站用户才可以在前台使用facebook连接功能。 如果要修改输入的appid和appsecret。可以点击facebook连接按钮右边的“修改appKey”按钮，进行修改操作。 完全重写的账户注册流程 这是V1.6重点功能。原先的账号注册流程是： 用户点击微博连接 –》 带入到微博授权页面 –》 授权后返回网站 –》 获得授权的用户信息 –》 使用这些信息自动为用户建立账号 上面的缺点是，整个过程是自动的，用户没有选择用户名、邮箱的权利。尤其是邮箱，由于权限限制，即使授权后也无法获得用户的真实邮箱，所以使用虚拟的邮箱为用户注册后，用户也无法即时从网站得到信息（如评论回复信息）。 新的注册流程，在最后一步，将用户带到一个全新的注册页面，让他输入自己的真实可用的邮箱，这样一来就避免了上面的不足。并且如果用户愿意，他还可以自行更换一个用户名，并修改自己的网站地址（默认是用户的微博地址）。 最重要的是，使用新的注册流程后，旧的注册用户完全不受影响。 欢迎大家去更新最新版。wordpress官方下载地址 &amp;#160; 有任何问题可以在新浪微博：http://weibo.com/qiqiboy 或者我博客任意页面留言交流。 Social Medias Connect V1.3发布 新增图片同步 (25)WordPress插件发布: Social Medias Connect (83)有关社交媒体连接插件对饭否、follow5支持的说明 (32)Social [...]&lt;img src=&quot;http://www1.feedsky.com/t1/631644837/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644837/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>SocialMedias</category><category>微博</category><category>更新</category><category>插件</category><category>社交媒体连接</category><category>plugin</category><pubDate>Fri, 16 Sep 2011 15:14:09 +0800</pubDate><author>qiqiboy</author><comments>http://www.qiqiboy.com/2011/09/16/socila-medias-connect-1-6-update.html#comments</comments><guid isPermaLink="false">http://www.qiqiboy.com/2011/09/16/socila-medias-connect-1-6-update.html</guid><dc:creator>qiqiboy</dc:creator><fs:srclink>http://www.qiqiboy.com/2011/09/16/socila-medias-connect-1-6-update.html</fs:srclink><fs:srcfeed>http://www.qiqiboy.com/feed</fs:srcfeed><fs:itemid>feedsky/qiqiboy/~7883632/631644837/5446216</fs:itemid></item><item><title>wordpress 搜索自定义字段(模糊查询)</title><link>http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644838/5446216/1/item.html</link><content:encoded>&lt;p&gt;如果有关注我博客人，应该会发现最近一周之内博客都一直打不开。我一直以为是主机问题，今天联系了客服，才发现原来是我自己的主题的问题。所以今天花了大半天的时间一点点排除问题，最后发现原来是和gravatar的服务器被墙有关。去掉了头像缓存，问题就解决了。&lt;/p&gt;
&lt;p&gt;当然，不会白白更新一篇博客的。下面说一个根据自定义字段查询文章的方法。&lt;/p&gt;
&lt;p&gt;query_posts可以实现多种组合查询，但是我遇到的一个问题是，需要搜索自定义字段的值。比如为一个post定义了一个字段“my_address”，它的值表示一个地址，比如“中国 北京 海淀区 北四环路”。如果我们要想通过搜索“北京”这个关键词来找到这篇post，那么通过query_posts就办不到了。&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-2820&quot;&gt;&lt;/span&gt;
&lt;p&gt;虽然query_posts的查询有“meta_value”这个方法，但是这个必须是完整的值，也就是只有查询“中国 北京 海淀区 北四环路”这个长关键句才能找到文章，而只通过“北京”是会查询失败的。也就是说meta_value是精确查询的，而不能模糊查询。&lt;/p&gt;
&lt;p&gt;最后，我琢磨了两种方法，虽然我自己都感觉并不怎么完美。&lt;/p&gt;
&lt;h3&gt;方法一，通过add_filter处理posts_join、posts_search勾子&lt;/h3&gt;
&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;
&lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;
&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;add_filter( &lt;span style=&quot;color: #006080&quot;&gt;'posts_search'&lt;/span&gt;, &lt;span style=&quot;color: #006080&quot;&gt;'wp_custom_search'&lt;/span&gt; );&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt; wp_custom_search($search){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt;(!&lt;span style=&quot;color: #0000ff&quot;&gt;isset&lt;/span&gt;($_GET[&lt;span style=&quot;color: #006080&quot;&gt;'meta_search'&lt;/span&gt;]))&lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; $search;&lt;span style=&quot;color: #008000&quot;&gt;//通过$_GET['meta_search']确保是要进行meta查询&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    $s=get_query_var(&lt;span style=&quot;color: #006080&quot;&gt;'s'&lt;/span&gt;);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    $search = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;AND (((wp_posts.post_title LIKE '%{$s}%') &lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                OR (wp_posts.post_content LIKE '%{$s}%') &lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                OR (wp_postmeta.meta_value LIKE '%{$s}%')&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;               )) AND (wp_posts.post_password = '')&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; $search;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;}&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;add_filter( &lt;span style=&quot;color: #006080&quot;&gt;'posts_join'&lt;/span&gt;, &lt;span style=&quot;color: #006080&quot;&gt;'wp_custom_search_join'&lt;/span&gt; );&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt; wp_custom_search_join($join){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt;(!&lt;span style=&quot;color: #0000ff&quot;&gt;isset&lt;/span&gt;($_GET[&lt;span style=&quot;color: #006080&quot;&gt;'meta_search'&lt;/span&gt;]))&lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; $join;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    $join = &lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id)&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; $join;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;为了不影响其它地方的query，所以我们通过检查是否有一个get请求meta_search，来判断是否要对查询进行处理。&lt;/p&gt;
&lt;h3&gt;方法二，将字段信息加入到post_content中&lt;/h3&gt;
&lt;p&gt;因为默认的post_title和post_content里的内容是模糊查询的，所以我们可以将postmeta的内容追加到post_content中。手动添加可以，自动加入也行。&lt;/p&gt;
&lt;p&gt;下面是自动加入的方法： &lt;/p&gt;
&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;
&lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;
&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;add_action(&lt;span style=&quot;color: #006080&quot;&gt;'wp_insert_post_data'&lt;/span&gt;,&lt;span style=&quot;color: #006080&quot;&gt;'wp_my_post'&lt;/span&gt;,10,2);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt; wp_my_post($data, $postarr){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    $arrmeta=&lt;span style=&quot;color: #0000ff&quot;&gt;array&lt;/span&gt;(&lt;span style=&quot;color: #006080&quot;&gt;'my_address'&lt;/span&gt;,&lt;span style=&quot;color: #006080&quot;&gt;'meta2'&lt;/span&gt;,&lt;span style=&quot;color: #006080&quot;&gt;'meta3'&lt;/span&gt;);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    $info=&lt;span style=&quot;color: #006080&quot;&gt;'&amp;lt;span style=&amp;quot;display:none;color:#fff;&amp;quot;&amp;gt;'&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;foreach&lt;/span&gt;($arrmeta &lt;span style=&quot;color: #0000ff&quot;&gt;as&lt;/span&gt; $meta){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        $info .= &lt;span style=&quot;color: #006080&quot;&gt;' '&lt;/span&gt;.$_POST[$meta];&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    }&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    $info.=&lt;span style=&quot;color: #006080&quot;&gt;'&amp;lt;/span&amp;gt;'&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    $data[&lt;span style=&quot;color: #006080&quot;&gt;'post_content'&lt;/span&gt;] .= $info;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; $data;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;仅供参考。&lt;/p&gt;
&lt;p&gt;如果你还有更好的方法,欢迎与我交流分享。&lt;/p&gt;
&lt;p&gt;&lt;img style=&quot;display: inline&quot; title=&quot;rrr&quot; alt=&quot;rrr&quot; src=&quot;http://www.qiqiboy.com/wp-content/uploads/2011/09/rrr.png&quot; width=&quot;464&quot; height=&quot;348&quot; /&gt;&lt;/p&gt;
&lt;ul class=&quot;related_post&quot;&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/08/demo.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;wordpress 按首字母排列文章/检索文章&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html&quot; title=&quot;wordpress 按首字母排列文章/检索文章&quot;&gt;wordpress 按首字母排列文章/检索文章&lt;/a&gt; (19)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/07/renren.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;wordpress开发 - 仿淫淫网新鲜事评论的评论列表实现&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/07/13/wordpress-comemnts-like-renren.html&quot; title=&quot;wordpress开发 &amp;#8211; 仿淫淫网新鲜事评论的评论列表实现&quot;&gt;wordpress开发 &amp;#8211; 仿淫淫网新鲜事评论的评论列表实现&lt;/a&gt; (49)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/06/5.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;wordpress的微博时间显示方法&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/06/10/sina-weibo-timestamp-function-2.html&quot; title=&quot;wordpress的微博时间显示方法&quot;&gt;wordpress的微博时间显示方法&lt;/a&gt; (18)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2010/1d7a79196621_DAE1/434.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;仿腾讯微博式访客信息悬浮显示（JavaScript &amp;amp; ajax）&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html&quot; title=&quot;仿腾讯微博式访客信息悬浮显示（JavaScript &amp;amp; ajax）&quot;&gt;仿腾讯微博式访客信息悬浮显示（JavaScript &amp;amp; ajax）&lt;/a&gt; (110)&lt;/li&gt;&lt;li class=&quot;last&quot;&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/07/810CI55J_0.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;JavaScript: 让拖动支持iphone/ipad触摸&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/07/16/javascript-touch-drag-support.html&quot; title=&quot;JavaScript: 让拖动支持iphone/ipad触摸&quot;&gt;JavaScript: 让拖动支持iphone/ipad触摸&lt;/a&gt; (15)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;声明:&lt;/strong&gt; 本站遵循 &lt;a href=&quot;http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/&quot;&gt;署名-非商业性使用-相同方式共享 3.0&lt;/a&gt; 共享协议. 转载请注明转自 &lt;a href=&quot;http://www.qiqiboy.com&quot;&gt;I'm qiqiboy !&lt;/a&gt; &lt;/p&gt; &lt;p&gt;本文地址: &lt;a href=&quot;http://qiqi.boy.im/f7&quot;&gt;http://qiqi.boy.im/f7&lt;a&gt;&lt;/p&gt;&lt;span style=&quot;background:#cc5566;color:#fffff;&quot;&gt;&lt;h4&gt;Look, this post is replyed so hot, let's go O(∩_∩)O~.&lt;/h4&gt;&lt;/span&gt;&lt;h3&gt;Related comments&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;2012年04月16日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html#comment-18025&quot;&gt;beibei&lt;/a&gt; say: 还是不会使用，我想在搜索中含自定义字段!&lt;/li&gt;&lt;li&gt;2012年03月24日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html#comment-17670&quot;&gt;citier&lt;/a&gt; say: Q大求救，wordpress多关键字分类筛选怎么做，有点类似你这个，纠结中&lt;/li&gt;&lt;li&gt;2012年02月7日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html#comment-17125&quot;&gt;joysk&lt;/a&gt; say: 啊哈，头像还在的啊？&lt;/li&gt;&lt;li&gt;2011年12月12日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html#comment-16353&quot;&gt;胡实&lt;/a&gt; say: 挖宝中 你懂得&lt;/li&gt;&lt;li&gt;2011年11月19日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html#comment-15704&quot;&gt;beyondme&lt;/a&gt; say: &quot;Fuck you! Ni Ma Bi!&quot; 这什么意思，网站不能留言了？&lt;/li&gt;&lt;li&gt;2011年10月29日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html#comment-15249&quot;&gt;宝宝健康成长&lt;/a&gt; say: 新的theme很给力啊！&lt;/li&gt;&lt;li&gt;2011年10月3日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html#comment-14919&quot;&gt;wmtimes&lt;/a&gt; say: 模糊查询啊。主题完成了再试。&lt;/li&gt;&lt;li&gt;2011年09月28日, &lt;a href=&quot;http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html#comment-14757&quot;&gt;软件风暴&lt;/a&gt; say: 赶紧试试去 真不错&lt;/li&gt;&lt;/ul&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/631644838/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644838/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html/feed</wfw:commentRss><slash:comments>20</slash:comments><description>如果有关注我博客人，应该会发现最近一周之内博客都一直打不开。我一直以为是主机问题，今天联系了客服，才发现原来是我自己的主题的问题。所以今天花了大半天的时间一点点排除问题，最后发现原来是和gravatar的服务器被墙有关。去掉了头像缓存，问题就解决了。 当然，不会白白更新一篇博客的。下面说一个根据自定义字段查询文章的方法。 query_posts可以实现多种组合查询，但是我遇到的一个问题是，需要搜索自定义字段的值。比如为一个post定义了一个字段“my_address”，它的值表示一个地址，比如“中国 北京 海淀区 北四环路”。如果我们要想通过搜索“北京”这个关键词来找到这篇post，那么通过query_posts就办不到了。 虽然query_posts的查询有“meta_value”这个方法，但是这个必须是完整的值，也就是只有查询“中国 北京 海淀区 北四环路”这个长关键句才能找到文章，而只通过“北京”是会查询失败的。也就是说meta_value是精确查询的，而不能模糊查询。 最后，我琢磨了两种方法，虽然我自己都感觉并不怎么完美。 方法一，通过add_filter处理posts_join、posts_search勾子 add_filter( 'posts_search', 'wp_custom_search' ); function wp_custom_search($search){ if(!isset($_GET['meta_search']))return $search;//通过$_GET['meta_search']确保是要进行meta查询 $s=get_query_var('s'); $search = &amp;#34;AND (((wp_posts.post_title LIKE '%{$s}%') OR (wp_posts.post_content LIKE '%{$s}%') OR (wp_postmeta.meta_value LIKE '%{$s}%') )) AND (wp_posts.post_password = '')&amp;#34;; [...]&lt;img src=&quot;http://www1.feedsky.com/t1/631644838/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644838/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>wordpress技巧</category><category>开发</category><category>PHP</category><category>技术</category><category>WordPress</category><pubDate>Wed, 14 Sep 2011 17:11:13 +0800</pubDate><author>qiqiboy</author><comments>http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html#comments</comments><guid isPermaLink="false">http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html</guid><dc:creator>qiqiboy</dc:creator><fs:srclink>http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html</fs:srclink><fs:srcfeed>http://www.qiqiboy.com/feed</fs:srcfeed><fs:itemid>feedsky/qiqiboy/~7883632/631644838/5446216</fs:itemid></item><item><title>wordpress 按首字母排列文章/检索文章</title><link>http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644839/5446216/1/item.html</link><content:encoded>&lt;p&gt;从标题中可以看出，本文要讲两个方面内容：&lt;/p&gt;
&lt;h3&gt;第一，按标题首字母排列文章&lt;/h3&gt;
&lt;p&gt;这个简单，只需在循环（loop）前，添加&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #008000;&quot;&gt;/**&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #008000;&quot;&gt; * 方式一，直接添加查询字符串&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #008000;&quot;&gt; */&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;&amp;lt;?php query_posts( $query_string . &lt;span style=&quot;color: #006080;&quot;&gt;'&amp;amp;orderby=title&amp;amp;order=asc'&lt;/span&gt; ); ?&amp;gt;&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #008000;&quot;&gt;/**&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #008000;&quot;&gt; * 方式二，合并查询数组&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #008000;&quot;&gt; */&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;&amp;lt;?php $args=array_merge( $wp_query-&amp;gt;query, &lt;span style=&quot;color: #0000ff;&quot;&gt;array&lt;/span&gt;( &lt;span style=&quot;color: #006080;&quot;&gt;'orderby'&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #006080;&quot;&gt;'title'&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;'order'&lt;/span&gt; =&amp;gt; &lt;span style=&quot;color: #006080;&quot;&gt;'asc'&lt;/span&gt; ) );&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;    query_posts($args); ?&amp;gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;注&lt;/strong&gt;: &lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;em&gt;query_posts($args)&lt;/em&gt;&lt;/span&gt;用来改变主循环，相关使用方法可查询&lt;a href=&quot;http://codex.wordpress.org/Template_Tags/query_posts&quot; target=&quot;_blank&quot;&gt;wordpress官方&lt;/a&gt;说明文档。&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-2818&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h3&gt;第二，按首标题字母检索文章&lt;/h3&gt;
&lt;p&gt;这个普通用户可能用处不大，但是对于一些将wordpress用来做产品展示的网站来说，按照字母名称快速查询相关产品则是一个很基本的需求。最近在一个项目中有用到，研究了wordpress的query后，一点小心得在这里分享出来。&lt;/p&gt;
&lt;p&gt;既然是检索，那肯定就是要用到”s=word”这个查询变量了。比如查找以字母“A”开头的文章&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;&amp;lt;?php query_posts(&lt;span style=&quot;color: #006080;&quot;&gt;'s=A'&lt;/span&gt;); ?&amp;gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;这样的话,wordpress会通过标题和内容查找包含字母A的文章,而不是我们需要的”以字母A开头的文章”.要达到我们的目的应该怎么做呢？&lt;/p&gt;
&lt;div id=&quot;codeSnippetWrapper&quot; style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;&quot;&gt;
&lt;div id=&quot;codeSnippet&quot; style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;
&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;add_filter( &lt;span style=&quot;color: #006080;&quot;&gt;'posts_search'&lt;/span&gt;, &lt;span style=&quot;color: #006080;&quot;&gt;'wp_custom_search'&lt;/span&gt; );&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;function&lt;/span&gt; wp_custom_search($search){&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;    $s=get_query_var(&lt;span style=&quot;color: #006080;&quot;&gt;'s'&lt;/span&gt;);&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;if&lt;/span&gt;(!$s)&lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; $search;&lt;span style=&quot;color: #008000;&quot;&gt;//非搜索，直接返回。&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;    $search = &lt;span style=&quot;color: #006080;&quot;&gt;&quot;AND (((wp_ymimds_posts.post_title LIKE '{$s}%'))) AND (wp_ymimds_posts.post_password = '')&quot;&lt;/span&gt;;&lt;span style=&quot;color: #008000;&quot;&gt;//会sql的你应该懂得，模糊查询&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;    &lt;span style=&quot;color: #0000ff;&quot;&gt;return&lt;/span&gt; $search;&lt;/pre&gt;

&lt;pre style=&quot;text-align: left; line-height: 12pt; background-color: white; margin: 0px; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;&quot;&gt;}&lt;/pre&gt;

&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;将以上代码放到主题的functions.php中即可。&lt;/p&gt;
&lt;p&gt;demo可看我在项目中的具体应用。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;http://www.soewp.devave.com/directory/?browse=membername&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;查询以某一字母开头的文章示例&lt;/span&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style=&quot;display: inline;&quot; title=&quot;demo&quot; src=&quot;http://www.qiqiboy.com/wp-content/uploads/2011/08/demo.png&quot; alt=&quot;demo&quot; width=&quot;600&quot; height=&quot;431&quot; /&gt;&lt;/p&gt;
&lt;ul class=&quot;related_post&quot;&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/09/rrr.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;wordpress 搜索自定义字段(模糊查询)&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/09/14/query-posts-by-postmeta.html&quot; title=&quot;wordpress 搜索自定义字段(模糊查询)&quot;&gt;wordpress 搜索自定义字段(模糊查询)&lt;/a&gt; (20)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/07/renren.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;wordpress开发 - 仿淫淫网新鲜事评论的评论列表实现&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/07/13/wordpress-comemnts-like-renren.html&quot; title=&quot;wordpress开发 &amp;#8211; 仿淫淫网新鲜事评论的评论列表实现&quot;&gt;wordpress开发 &amp;#8211; 仿淫淫网新鲜事评论的评论列表实现&lt;/a&gt; (49)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/06/5.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;wordpress的微博时间显示方法&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/06/10/sina-weibo-timestamp-function-2.html&quot; title=&quot;wordpress的微博时间显示方法&quot;&gt;wordpress的微博时间显示方法&lt;/a&gt; (18)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2010/1d7a79196621_DAE1/434.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;仿腾讯微博式访客信息悬浮显示（JavaScript &amp;amp; ajax）&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2010/08/16/visitor-information-tencent-suspended-micro-display.html&quot; title=&quot;仿腾讯微博式访客信息悬浮显示（JavaScript &amp;amp; ajax）&quot;&gt;仿腾讯微博式访客信息悬浮显示（JavaScript &amp;amp; ajax）&lt;/a&gt; (110)&lt;/li&gt;&lt;li class=&quot;last&quot;&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/07/810CI55J_0.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;JavaScript: 让拖动支持iphone/ipad触摸&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/07/16/javascript-touch-drag-support.html&quot; title=&quot;JavaScript: 让拖动支持iphone/ipad触摸&quot;&gt;JavaScript: 让拖动支持iphone/ipad触摸&lt;/a&gt; (15)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;声明:&lt;/strong&gt; 本站遵循 &lt;a href=&quot;http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/&quot;&gt;署名-非商业性使用-相同方式共享 3.0&lt;/a&gt; 共享协议. 转载请注明转自 &lt;a href=&quot;http://www.qiqiboy.com&quot;&gt;I'm qiqiboy !&lt;/a&gt; &lt;/p&gt; &lt;p&gt;本文地址: &lt;a href=&quot;http://qiqi.boy.im/f5&quot;&gt;http://qiqi.boy.im/f5&lt;a&gt;&lt;/p&gt;&lt;span style=&quot;background:#cc5566;color:#fffff;&quot;&gt;&lt;h4&gt;Look, this post is replyed so hot, let's go O(∩_∩)O~.&lt;/h4&gt;&lt;/span&gt;&lt;h3&gt;Related comments&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;2011年11月9日, &lt;a href=&quot;http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html#comment-15528&quot;&gt;微代码&lt;/a&gt; say: &lt;span style=&quot;color:#FF0000;&quot;&gt;非常不错的博客，顶一个，欢迎回访，更欢迎互换链接&lt;/span&gt;&lt;/li&gt;&lt;li&gt;2011年11月3日, &lt;a href=&quot;http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html#comment-15405&quot;&gt;懒人工具&lt;/a&gt; say: 不错，受益了&lt;/li&gt;&lt;li&gt;2011年09月2日, &lt;a href=&quot;http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html#comment-12726&quot;&gt;扒站&lt;/a&gt; say: 很专业的博客,受益匪浅.&lt;/li&gt;&lt;li&gt;2011年08月26日, &lt;a href=&quot;http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html#comment-12620&quot;&gt;zhbconan&lt;/a&gt; say: 隔壁工位的哥们介绍我看你的网站，做的很不错，希望以后可以多向你学习。&lt;/li&gt;&lt;li&gt;2011年08月23日, &lt;a href=&quot;http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html#comment-12600&quot;&gt;c&lt;/a&gt; say: 感觉你的博客有点像cms了哦。。 &lt;img src='http://www.qiqiboy.com/wp-content/themes/windPaled/images/smiles/icon_surprised.gif' alt=':eek:' class='wp-smiley' /&gt; &lt;/li&gt;&lt;li&gt;2011年08月16日, &lt;a href=&quot;http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html#comment-12495&quot;&gt;美容护肤小窍门&lt;/a&gt; say: 通过百度访问到您的博客
内容很好
页面很漂亮
以后会常来看看你的博文的
谢谢你的分享&lt;/li&gt;&lt;li&gt;2011年08月14日, &lt;a href=&quot;http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html#comment-12450&quot;&gt;loosky&lt;/a&gt; say: 有的时候的却需要这个功能。&lt;/li&gt;&lt;li&gt;2011年08月13日, &lt;a href=&quot;http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html#comment-12446&quot;&gt;毕节教育网&lt;/a&gt; say: 代码看不明白。&lt;/li&gt;&lt;/ul&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/631644839/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644839/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html/feed</wfw:commentRss><slash:comments>19</slash:comments><description>从标题中可以看出，本文要讲两个方面内容： 第一，按标题首字母排列文章 这个简单，只需在循环（loop）前，添加 /** * 方式一，直接添加查询字符串 */ &amp;#60;?php query_posts( $query_string . '&amp;#38;orderby=title&amp;#38;order=asc' ); ?&amp;#62; /** * 方式二，合并查询数组 */ &amp;#60;?php $args=array_merge( $wp_query-&amp;#62;query, array( 'orderby' =&amp;#62; 'title', 'order' =&amp;#62; 'asc' ) ); query_posts($args); ?&amp;#62; 注: query_posts($args)用来改变主循环，相关使用方法可查询wordpress官方说明文档。 第二，按首标题字母检索文章 这个普通用户可能用处不大，但是对于一些将wordpress用来做产品展示的网站来说，按照字母名称快速查询相关产品则是一个很基本的需求。最近在一个项目中有用到，研究了wordpress的query后，一点小心得在这里分享出来。 既然是检索，那肯定就是要用到”s=word”这个查询变量了。比如查找以字母“A”开头的文章 &amp;#60;?php query_posts('s=A'); ?&amp;#62; [...]&lt;img src=&quot;http://www1.feedsky.com/t1/631644839/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644839/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>网站开发</category><category>开发</category><category>PHP</category><category>技术</category><category>WordPress</category><pubDate>Wed, 10 Aug 2011 16:01:14 +0800</pubDate><author>qiqiboy</author><comments>http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html#comments</comments><guid isPermaLink="false">http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html</guid><dc:creator>qiqiboy</dc:creator><fs:srclink>http://www.qiqiboy.com/2011/08/10/wordpress-search-post-by-first-char.html</fs:srclink><fs:srcfeed>http://www.qiqiboy.com/feed</fs:srcfeed><fs:itemid>feedsky/qiqiboy/~7883632/631644839/5446216</fs:itemid></item><item><title>JavaScript: 支持iphone、ipad 使用两根手指放大图片</title><link>http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644840/5446216/1/item.html</link><content:encoded>&lt;p&gt;昨天写了一篇《 &lt;a href=&quot;http://www.qiqiboy.com/2011/07/16/javascript-touch-drag-support.html&quot;&gt;JavaScript: 让拖动支持iphone/ipad触摸&lt;/a&gt; 》，今天又无聊，想到了图片放大(zoom)，让使用ios设备的的用户可以使用两根手指来缩放图片。想了一下，很容易就实现了。&lt;/p&gt;
&lt;p&gt;其实原理也就是在图片接收了两个有效触摸点后，在手指移动过程中检测两点之间的距离的变化，以此来对图片进行放大缩小。&lt;/p&gt;
&lt;p&gt;  &lt;span id=&quot;more-2816&quot;&gt;&lt;/span&gt;
&lt;p&gt;不多说，&lt;a href=&quot;http://u.boy.im/zoom&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;demo在这里&lt;/strong&gt;&lt;/a&gt;（必须使用ios设备查看）。代码如下：&lt;/p&gt;
&lt;div style=&quot;border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px&quot; id=&quot;codeSnippetWrapper&quot;&gt;
&lt;div style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot; id=&quot;codeSnippet&quot;&gt;
&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; getZoomClass=(&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;&lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; SupportsTouches = (&lt;span style=&quot;color: #006080&quot;&gt;&amp;quot;createTouch&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;in&lt;/span&gt; document),&lt;span style=&quot;color: #008000&quot;&gt;//判断是否支持触摸&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    $=&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(id){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; document.getElementById(id);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    },&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    preventDefault=&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(ev){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt;(ev)ev.preventDefault();&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; window.&lt;span style=&quot;color: #0000ff&quot;&gt;event&lt;/span&gt;.returnValue = &lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    },&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    getTwoPointSub=&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(ev){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;var&lt;/span&gt; x1=x2=y1=y2=0,sub;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        x1=ev.touches.item(0).pageX;x2=ev.touches.item(1).pageX;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        y1=ev.touches.item(0).pageY;y2=ev.touches.item(1).pageY;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        sub=Math.round(Math.sqrt(Math.pow(x1-x2,2)+Math.pow(y1-y2,2)));&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; sub;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    },&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    getSize=&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(img){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; {width:img.width,height:img.height};&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    };&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt; _zoom(opt){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt;(!SupportsTouches)&lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.el=&lt;span style=&quot;color: #0000ff&quot;&gt;typeof&lt;/span&gt; opt.el==&lt;span style=&quot;color: #006080&quot;&gt;'string'&lt;/span&gt;?$(opt.el):opt.el;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.onstart=opt.start || &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Function();&lt;span style=&quot;color: #008000&quot;&gt;//&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.onmove=opt.move || &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Function();&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.onend=opt.end || &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; Function();&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.action=&lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.init();&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    }&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    _zoom.prototype={&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        init:&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.el[&lt;span style=&quot;color: #006080&quot;&gt;'ontouchstart'&lt;/span&gt;]=&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.bind(&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(e){&lt;span style=&quot;color: #008000&quot;&gt;//绑定节点的 [鼠标按下/触摸开始] 事件&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.action || e.touches.length&amp;lt;2)&lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;;&lt;span style=&quot;color: #008000&quot;&gt;//这里监测了触摸点的数量，小于两个说明不是在进行缩放操作&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.action=&lt;span style=&quot;color: #0000ff&quot;&gt;true&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                preventDefault(e);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.startSub=getTwoPointSub(e);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.startSize=getSize(&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.el);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.onstart();&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                document.ontouchmove=&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.bind(&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(e){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;if&lt;/span&gt;(e.touches.length&amp;gt;1){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                        preventDefault(e);&lt;span style=&quot;color: #008000&quot;&gt;//取消文档的默认行为[鼠标移动、触摸移动]&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.nowSub=getTwoPointSub(e);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.el.width=&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.startSize.width*&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.nowSub/&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.startSub;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.el.height=&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.startSize.height*&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.nowSub/&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.startSub;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                        &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.onmove();&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                    }&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                },&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                document.ontouchend=document.ontouchcancel=&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.bind(&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                    document.ontouchend=document.ontouchcancel=document.ontouchmove=&lt;span style=&quot;color: #0000ff&quot;&gt;null&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.action=&lt;span style=&quot;color: #0000ff&quot;&gt;false&lt;/span&gt;;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                    &lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;.onend();&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                },&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;            },&lt;span style=&quot;color: #0000ff&quot;&gt;this&lt;/span&gt;);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        },&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        bind:&lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(fn,obj){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;            &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;                fn.apply(obj,arguments);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;            }&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        },&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        tool:&lt;span style=&quot;color: #0000ff&quot;&gt;null&lt;/span&gt;&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    }&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;function&lt;/span&gt;(opt){&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;        &lt;span style=&quot;color: #0000ff&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #0000ff&quot;&gt;new&lt;/span&gt; _zoom(opt);&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;    }&lt;/pre&gt;

&lt;pre style=&quot;border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0px; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px&quot;&gt;})();&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href=&quot;http://u.boy.im/zoom&quot; target=&quot;_blank&quot;&gt;&lt;strong&gt;demo在这里&lt;/strong&gt;&lt;/a&gt;（必须使用ios设备查看）。&lt;img src=&quot;http://www.qiqiboy.com/wp-content/uploads/2011/07/810CI55J_0.jpg&quot; /&gt;&lt;/p&gt;
&lt;ul class=&quot;related_post&quot;&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2012/01/688860f891c5.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;TouchSlider 1.0 - 兼容触摸屏手机与PC的幻灯片&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2012/01/11/touchslider-1-0-publish.html&quot; title=&quot;TouchSlider 1.0 &amp;#8211; 兼容触摸屏手机与PC的幻灯片&quot;&gt;TouchSlider 1.0 &amp;#8211; 兼容触摸屏手机与PC的幻灯片&lt;/a&gt; (15)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2012/04/QQ20120409181449.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2012/04/09/touchsliderbox-v1-0-publish-2.html&quot; title=&quot;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯&quot;&gt;TouchSliderBox 1.0 &amp;ndash;容器宽度可变的幻灯&lt;/a&gt; (9)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2012/04/touscroll.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;TouchScroll 1.0 &amp;ndash; 统一视觉样式的容器滚动解决方案&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2012/04/01/touchscroll-v1-0-publish.html&quot; title=&quot;TouchScroll 1.0 &amp;ndash; 统一视觉样式的容器滚动解决方案&quot;&gt;TouchScroll 1.0 &amp;ndash; 统一视觉样式的容器滚动解决方案&lt;/a&gt; (6)&lt;/li&gt;&lt;li&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/07/810CI55J_0.jpg&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;JavaScript: 让拖动支持iphone/ipad触摸&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/07/16/javascript-touch-drag-support.html&quot; title=&quot;JavaScript: 让拖动支持iphone/ipad触摸&quot;&gt;JavaScript: 让拖动支持iphone/ipad触摸&lt;/a&gt; (15)&lt;/li&gt;&lt;li class=&quot;last&quot;&gt;&lt;img src=&quot;http://www.qiqiboy.com/wp-content/themes/windPaled/timthumb.php?src=http://www.qiqiboy.com/wp-content/uploads/2011/05/imgready.png&amp;amp;h=100&amp;amp;w=100&amp;amp;zc=1&quot; alt=&quot;javascript 图片预加载（远程获取图片尺寸）&quot; class=&quot;thumb&quot; /&gt;&lt;a href=&quot;http://www.qiqiboy.com/2011/05/20/javascript-image-preload.html&quot; title=&quot;javascript 图片预加载（远程获取图片尺寸）&quot;&gt;javascript 图片预加载（远程获取图片尺寸）&lt;/a&gt; (29)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;声明:&lt;/strong&gt; 本站遵循 &lt;a href=&quot;http:\/\/creativecommons.org/licenses/by-nc-sa/3.0/&quot;&gt;署名-非商业性使用-相同方式共享 3.0&lt;/a&gt; 共享协议. 转载请注明转自 &lt;a href=&quot;http://www.qiqiboy.com&quot;&gt;I'm qiqiboy !&lt;/a&gt; &lt;/p&gt; &lt;p&gt;本文地址: &lt;a href=&quot;http://qiqi.boy.im/ez&quot;&gt;http://qiqi.boy.im/ez&lt;a&gt;&lt;/p&gt;&lt;span style=&quot;background:#cc5566;color:#fffff;&quot;&gt;&lt;h4&gt;Look, this post is replyed so hot, let's go O(∩_∩)O~.&lt;/h4&gt;&lt;/span&gt;&lt;h3&gt;Related comments&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;2012年02月21日, &lt;a href=&quot;http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html#comment-17210&quot;&gt;地方&lt;/a&gt; say: gggggggggggg&lt;/li&gt;&lt;li&gt;2012年02月21日, &lt;a href=&quot;http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html#comment-17209&quot;&gt;地方&lt;/a&gt; say: 对方的身份&lt;/li&gt;&lt;li&gt;2011年10月25日, &lt;a href=&quot;http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html#comment-15226&quot;&gt;懒人&lt;/a&gt; say: 我还在折腾安卓&lt;/li&gt;&lt;li&gt;2011年07月31日, &lt;a href=&quot;http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html#comment-12288&quot;&gt;晨光&lt;/a&gt; say: 这方面懂得还是很少呀&lt;/li&gt;&lt;li&gt;2011年07月25日, &lt;a href=&quot;http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html#comment-12259&quot;&gt;丰禾棋牌&lt;/a&gt; say: 电脑这方面不是特别懂  学习了&lt;/li&gt;&lt;li&gt;2011年07月24日, &lt;a href=&quot;http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html#comment-12255&quot;&gt;小五&lt;/a&gt; say: 没有接触过IP4&lt;/li&gt;&lt;li&gt;2011年07月23日, &lt;a href=&quot;http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html#comment-12250&quot;&gt;孤夜狂狼&lt;/a&gt; say: Android 平板 XOOM 测试成功…… 
好东西啊~ 收藏了~  虽然暂时没有什么用法方面的创意……&lt;/li&gt;&lt;li&gt;2011年07月23日, &lt;a href=&quot;http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html#comment-12248&quot;&gt;人好哇！&lt;/a&gt; say: 唔。。。我表示现在为IOS做的优化随处可见了呢~~不过还真没想过JS还可以这么搞，哈哈&lt;/li&gt;&lt;/ul&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/631644840/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644840/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html/feed</wfw:commentRss><slash:comments>20</slash:comments><description>昨天写了一篇《 JavaScript: 让拖动支持iphone/ipad触摸 》，今天又无聊，想到了图片放大(zoom)，让使用ios设备的的用户可以使用两根手指来缩放图片。想了一下，很容易就实现了。 其实原理也就是在图片接收了两个有效触摸点后，在手指移动过程中检测两点之间的距离的变化，以此来对图片进行放大缩小。 不多说，demo在这里（必须使用ios设备查看）。代码如下： var getZoomClass=(function(){ var SupportsTouches = (&amp;#34;createTouch&amp;#34; in document),//判断是否支持触摸 $=function(id){ return document.getElementById(id); }, preventDefault=function(ev){ if(ev)ev.preventDefault(); else window.event.returnValue = false; }, getTwoPointSub=function(ev){ var x1=x2=y1=y2=0,sub; x1=ev.touches.item(0).pageX;x2=ev.touches.item(1).pageX; y1=ev.touches.item(0).pageY;y2=ev.touches.item(1).pageY; sub=Math.round(Math.sqrt(Math.pow(x1-x2,2)+Math.pow(y1-y2,2))); return sub; }, getSize=function(img){ return {width:img.width,height:img.height}; }; function _zoom(opt){ [...]&lt;img src=&quot;http://www1.feedsky.com/t1/631644840/qiqiboy/feedsky/s.gif?r=http://item.feedsky.com/~feedsky/qiqiboy/~7883632/631644840/5446216/1/item.html&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>触摸</category><category>代码</category><category>iphone</category><category>javascript</category><category>JavaScript</category><category>技术</category><pubDate>Sun, 17 Jul 2011 15:13:20 +0800</pubDate><author>qiqiboy</author><comments>http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html#comments</comments><guid isPermaLink="false">http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html</guid><dc:creator>qiqiboy</dc:creator><fs:srclink>http://www.qiqiboy.com/2011/07/17/javascript-touch-support-zoom-image.html</fs:srclink><fs:srcfeed>http://www.qiqiboy.com/feed</fs:srcfeed><fs:itemid>feedsky/qiqiboy/~7883632/631644840/5446216</fs:itemid></item></channel></rss>
