{"id":2246,"date":"2017-10-30T11:43:58","date_gmt":"2017-10-30T03:43:58","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=2246"},"modified":"2017-10-30T11:43:58","modified_gmt":"2017-10-30T03:43:58","slug":"jquerycss3%e5%ae%9e%e7%8e%b0%e7%9b%b8%e5%86%8c%e6%8b%bc%e5%9b%be%e6%95%88%e6%9e%9c","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=2246","title":{"rendered":"jQuery+CSS3\u5b9e\u73b0\u76f8\u518c\u62fc\u56fe\u6548\u679c"},"content":{"rendered":"<p>\n\t\u767e\u5ea6\u641c\u7d22\u76f8\u518c\u62fc\u56fe\uff0c\u53d1\u73b0\u5339\u914d\u7684\u5185\u5bb9\u5f88\u5c11\u3002\u56e0\u6b64\u6211\u51b3\u5b9a\u4f7f\u7528 <a href=\"https:\/\/www.xttblog.com\/?tag=jquery\" name=\"jquery\" target=\"_blank\" title=\"jquery\">jQuery<\/a> \u548c <a href=\"https:\/\/www.xttblog.com\/?tag=css3\" name=\"css3\" target=\"_blank\" title=\"css3\">CSS3<\/a> \u6765\u5b9e\u73b0\u4e00\u6b3e\u76f8\u518c\u62fc\u56fe\u63d2\u4ef6\u3002\n<\/p>\n<p>\n\t\u76f8\u518c\u62fc\u56fe\u5728PS\u8f6f\u4ef6\u4e2d\u8f83\u4e3a\u5e38\u89c1\uff0c\u6bd4\u5982\u7f8e\u56fe\u79c0\u79c0\u7b49\u8f6f\u4ef6\u90fd\u5e26\u6709\u8fd9\u6837\u7684\u529f\u80fd\u3002\u76f8\u518c\u62fc\u56fe\u5c31\u662f\u5c06\u591a\u5f20\u7167\u7247\u62fc\u63a5\u5728\u4e00\u8d77\u5f62\u6210\u4e00\u5f20\u7167\u7247\u3002\u5176\u6548\u679c\u5982\u4e0b\uff1a\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u6211\u7684\u535a\u5ba2\uff0c\u5982\u6709\u7591\u95ee\uff0c\u8bf7\u52a0qq\u7fa4\uff1a454796847\u3001135430763 \u5171\u540c\u8fdb\u6b65\uff01\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"jQuery + CSS3 \u5b9e\u73b0\u76f8\u518c\u62fc\u56fe\" src=\"http:\/\/img.bbs.csdn.net\/upload\/201710\/30\/1509333306_407240.jpg\" style=\"width: 404px;height: 302px\" \/>\n<\/p>\n<p>\n\t\u9996\u5148\u76f8\u518c\u4e2d\u7684\u56fe\u7247\u4f1a\u4ee5\u4e00\u5b9a\u7684\u89d2\u5ea6\u503e\u659c\u653e\u7f6e\u5728\u9875\u9762\u4e0a\uff0c\u70b9\u51fb\u56fe\u7247\u7f29\u7565\u56fe\u5c31\u53ef\u4ee5\u5c55\u5f00\u56fe\u7247\uff0c\u5e76\u4e14\u56fe\u7247\u662f\u7531\u6240\u6709\u7f29\u7565\u56fe\u62fc\u63a5\u800c\u6210\uff0c\u56fe\u7247\u5c55\u5f00\u548c\u6536\u62e2\u7684\u52a8\u753b\u6548\u679c\u4e5f\u975e\u5e38\u4e0d\u9519\u3002\u5f53\u7136\u56fe\u7247\u503e\u659c\u9700\u8981CSS3\u652f\u6301\u3002\n<\/p>\n<p>\n\t\u76f8\u5173\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\uff1a\n<\/p>\n<pre class=\"brush:xml;\">\r\n&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n    &lt;head&gt;\r\n        &lt;title&gt;jQuery\/CSS3\u5b9e\u73b0\u62fc\u56fe\u6548\u679c\u7684\u76f8\u518c\u63d2\u4ef6DEMO\u6f14\u793a&lt;\/title&gt;\r\n        &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=UTF-8&quot;\/&gt;\r\n        &lt;link rel=&quot;stylesheet&quot; href=&quot;css\/style.css&quot; type=&quot;text\/css&quot; media=&quot;screen&quot;\/&gt;\r\n\t\t&lt;script src=&quot;js\/cufon-yui.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;\r\n\t\t&lt;script src=&quot;js\/ChunkFive_400.font.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;\r\n\t\t&lt;script type=&quot;text\/javascript&quot;&gt;\r\n\t\t\tCufon.replace(&#039;h1&#039;,{ textShadow: &#039;1px 1px #fff&#039;});\r\n\t\t\tCufon.replace(&#039;.description&#039;,{ textShadow: &#039;1px 1px #fff&#039;});\r\n\t\t\tCufon.replace(&#039;a&#039;,{ textShadow: &#039;1px 1px #fff&#039;, hover : true});\r\n\t\t&lt;\/script&gt;\r\n        &lt;style type=&quot;text\/css&quot;&gt;\r\n\t\t\t.description{\r\n\t\t\t\tposition:fixed;\r\n\t\t\t\tright:10px;\r\n\t\t\t\ttop:10px;\r\n\t\t\t\tfont-size:12px;\r\n\t\t\t\tcolor:#888;\r\n\t\t\t}\r\n\t\t\tspan.reference{\r\n\t\t\t\tposition:fixed;\r\n\t\t\t\tleft:10px;\r\n\t\t\t\tbottom:10px;\r\n\t\t\t\tfont-size:12px;\r\n\t\t\t}\r\n\t\t\tspan.reference a{\r\n\t\t\t\tcolor:#888;\r\n\t\t\t\ttext-transform:uppercase;\r\n\t\t\t\ttext-decoration:none;\r\n\t\t\t\tpadding-right:20px;\r\n\t\t\t}\r\n\t\t\tspan.reference a:hover{\r\n\t\t\t\tcolor:#444;\r\n\t\t\t}\r\n\t\t&lt;\/style&gt;\r\n    &lt;\/head&gt;\r\n    &lt;body&gt;\r\n\t\t&lt;div id=&quot;im_wrapper&quot; class=&quot;im_wrapper&quot;&gt;\r\n\t\t\t&lt;div style=&quot;background-position:0px 0px;&quot;&gt;&lt;img src=&quot;1.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-125px 0px;&quot;&gt;&lt;img src=&quot;2.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-250px 0px;&quot;&gt;&lt;img src=&quot;3.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-375px 0px;&quot;&gt;&lt;img src=&quot;4.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-500px 0px;&quot;&gt;&lt;img src=&quot;5.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-625px 0px;&quot;&gt;&lt;img src=&quot;6.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:0px -125px;&quot;&gt;&lt;img src=&quot;7.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-125px -125px;&quot;&gt;&lt;img src=&quot;8.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-250px -125px;&quot;&gt;&lt;img src=&quot;9.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-375px -125px;&quot;&gt;&lt;img src=&quot;10.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-500px -125px;&quot;&gt;&lt;img src=&quot;11.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-625px -125px;&quot;&gt;&lt;img src=&quot;12.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:0px -250px;&quot;&gt;&lt;img src=&quot;13.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-125px -250px;&quot;&gt;&lt;img src=&quot;14.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-250px -250px;&quot;&gt;&lt;img src=&quot;15.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-375px -250px;&quot;&gt;&lt;img src=&quot;16.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-500px -250px;&quot;&gt;&lt;img src=&quot;17.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-625px -250px;&quot;&gt;&lt;img src=&quot;18.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:0px -375px;&quot;&gt;&lt;img src=&quot;19.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-125px -375px;&quot;&gt;&lt;img src=&quot;20.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-250px -375px;&quot;&gt;&lt;img src=&quot;21.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-375px -375px;&quot;&gt;&lt;img src=&quot;22.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-500px -375px;&quot;&gt;&lt;img src=&quot;23.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t\t&lt;div style=&quot;background-position:-625px -375px;&quot;&gt;&lt;img src=&quot;24.jpg&quot; alt=&quot;&quot; \/&gt;&lt;\/div&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div id=&quot;im_loading&quot; class=&quot;im_loading&quot;&gt;&lt;\/div&gt;\r\n\t\t&lt;div id=&quot;im_next&quot; class=&quot;im_next&quot;&gt;&lt;\/div&gt;\r\n\t\t&lt;div id=&quot;im_prev&quot; class=&quot;im_prev&quot;&gt;&lt;\/div&gt;\r\n        &lt;div&gt;\r\n\t\t&lt;\/div&gt;\r\n        &lt;script type=&quot;text\/javascript&quot; src=&quot;js\/jquery.min.js&quot;&gt;&lt;\/script&gt;\r\n\t\t&lt;script src=&quot;js\/jquery.transform-0.9.1.min.js&quot;&gt;&lt;\/script&gt;\r\n\t\t&lt;script type=&quot;text\/javascript&quot;&gt;\r\n\t\t\t(function($,sr){\r\n\t\t\t\tvar debounce = function (func, threshold, execAsap) {\r\n\t\t\t\t\tvar timeout;\r\n\t\t\t\t\treturn function debounced () {\r\n\t\t\t\t\t\tvar obj = this, args = arguments;\r\n\t\t\t\t\t\tfunction delayed () {\r\n\t\t\t\t\t\t\tif (!execAsap)\r\n\t\t\t\t\t\t\t\tfunc.apply(obj, args);\r\n\t\t\t\t\t\t\ttimeout = null;\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tif (timeout)\r\n\t\t\t\t\t\t\tclearTimeout(timeout);\r\n\t\t\t\t\t\telse if (execAsap)\r\n\t\t\t\t\t\t\tfunc.apply(obj, args);\r\n\t\t\t\t\t\ttimeout = setTimeout(delayed, threshold || 100);\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\tjQuery.fn[sr] = function(fn){  return fn ? this.bind(&#039;resize&#039;, debounce(fn)) : this.trigger(sr); };\r\n\t\t\t})(jQuery,&#039;smartresize&#039;);\r\n\t\t&lt;\/script&gt;\r\n        &lt;script type=&quot;text\/javascript&quot;&gt;\t\r\n            $(function() {\r\n\t\t\t\tvar ie \t\t\t= false;\r\n\t\t\t\tif ($.browser.msie)\r\n\t\t\t\t\tie = true;\r\n\t\t\t\tvar flg_click\t= true;\r\n                var $im_wrapper\t= $(&#039;#im_wrapper&#039;);\r\n\t\t\t\tvar $thumbs\t\t= $im_wrapper.children(&#039;div&#039;);\r\n\t\t\t\tvar $thumb_imgs = $thumbs.find(&#039;img&#039;);\r\n\t\t\t\tvar nmb_thumbs\t= $thumbs.length;\r\n\t\t\t\tvar $im_loading\t= $(&#039;#im_loading&#039;);\r\n\t\t\t\tvar $im_next\t= $(&#039;#im_next&#039;);\r\n\t\t\t\tvar $im_prev\t= $(&#039;#im_prev&#039;);\r\n\t\t\t\tvar per_line\t= 6;\r\n\t\t\t\tvar per_col\t\t= Math.ceil(nmb_thumbs\/per_line)\r\n\t\t\t\tvar current\t\t= -1;\r\n\t\t\t\tvar mode\t\t= &#039;grid&#039;;\r\n\t\t\t\tvar positionsArray = [];\r\n\t\t\t\tfor(var i = 0; i &lt; nmb_thumbs; ++i)\r\n\t\t\t\t\tpositionsArray[i]=i;\r\n\t\t\t\t$im_loading.show();\r\n\t\t\t\tvar loaded\t\t= 0;\r\n\t\t\t\t$thumb_imgs.each(function(){\r\n\t\t\t\t\tvar $this = $(this);\r\n\t\t\t\t\t$(&#039;&lt;img\/&gt;&#039;).load(function(){\r\n\t\t\t\t\t\t++loaded;\r\n\t\t\t\t\t\tif(loaded == nmb_thumbs*2)\r\n\t\t\t\t\t\t\tstart();\r\n\t\t\t\t\t}).attr(&#039;src&#039;,$this.attr(&#039;src&#039;));\r\n\t\t\t\t\t$(&#039;&lt;img\/&gt;&#039;).load(function(){\r\n\t\t\t\t\t\t++loaded;\r\n\t\t\t\t\t\tif(loaded == nmb_thumbs*2)\r\n\t\t\t\t\t\t\tstart();\r\n\t\t\t\t\t}).attr(&#039;src&#039;,$this.attr(&#039;src&#039;).replace(&#039;\/thumbs&#039;,&#039;&#039;));\r\n\t\t\t\t});\r\n\t\t\t\tfunction start(){\r\n\t\t\t\t\t$im_loading.hide();\r\n\t\t\t\t\tdisperse();\r\n\t\t\t\t}\r\n\t\t\t\tfunction disperse(){\r\n\t\t\t\t\tif(!flg_click) return;\r\n\t\t\t\t\tsetflag();\r\n\t\t\t\t\tmode\t\t\t= &#039;grid&#039;;\r\n\t\t\t\t\tvar spaces_w \t= $(window).width()\/(per_line + 1);\r\n\t\t\t\t\tvar spaces_h \t= $(window).height()\/(per_col + 1);\r\n\t\t\t\t\t$thumbs.each(function(i){\r\n\t\t\t\t\t\tvar $thumb \t= $(this);\r\n\t\t\t\t\t\tvar left\t= spaces_w*((i%per_line)+1) - $thumb.width()\/2;\r\n\t\t\t\t\t\tvar top\t\t= spaces_h*(Math.ceil((i+1)\/per_line)) - $thumb.height()\/2;\r\n\t\t\t\t\t\tvar r \t\t= Math.floor(Math.random()*41)-20;\r\n\t\t\t\t\t\tif(ie)\r\n\t\t\t\t\t\t\tvar param = {\r\n\t\t\t\t\t\t\t\t&#039;left&#039;\t\t: left + &#039;px&#039;,\r\n\t\t\t\t\t\t\t\t&#039;top&#039;\t\t: top + &#039;px&#039;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tvar param = {\r\n\t\t\t\t\t\t\t\t&#039;left&#039;\t\t: left + &#039;px&#039;,\r\n\t\t\t\t\t\t\t\t&#039;top&#039;\t\t: top + &#039;px&#039;,\r\n\t\t\t\t\t\t\t\t&#039;rotate&#039;\t: r + &#039;deg&#039;\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t$thumb.stop()\r\n\t\t\t\t\t\t.animate(param,700,function(){\r\n\t\t\t\t\t\t\tif(i==nmb_thumbs-1)\r\n\t\t\t\t\t\t\t\tsetflag();\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\t.find(&#039;img&#039;)\r\n\t\t\t\t\t\t.fadeIn(700,function(){\r\n\t\t\t\t\t\t\t$thumb.css({\r\n\t\t\t\t\t\t\t\t&#039;background-image&#039;\t: &#039;none&#039;\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t$(this).animate({\r\n\t\t\t\t\t\t\t\t&#039;width&#039;\t\t: &#039;115px&#039;,\r\n\t\t\t\t\t\t\t\t&#039;height&#039;\t: &#039;115px&#039;,\r\n\t\t\t\t\t\t\t\t&#039;marginTop&#039;\t: &#039;5px&#039;,\r\n\t\t\t\t\t\t\t\t&#039;marginLeft&#039;: &#039;5px&#039;\r\n\t\t\t\t\t\t\t},150);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tfunction setflag(){\r\n\t\t\t\t\tflg_click = !flg_click\r\n\t\t\t\t}\r\n\t\t\t\t$thumbs.bind(&#039;click&#039;,function(){\r\n\t\t\t\t\tif(!flg_click) return;\r\n\t\t\t\t\tsetflag();\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar $this \t\t= $(this);\r\n\t\t\t\t\tcurrent \t\t= $this.index();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(mode\t== &#039;grid&#039;){\r\n\t\t\t\t\t\tmode\t\t\t= &#039;single&#039;;\r\n\t\t\t\t\t\tvar image_src\t= $this.find(&#039;img&#039;).attr(&#039;src&#039;).replace(&#039;\/thumbs&#039;,&#039;&#039;);\r\n\t\t\t\t\t\t$thumbs.each(function(i){\r\n\t\t\t\t\t\t\tvar $thumb \t= $(this);\r\n\t\t\t\t\t\t\tvar $image \t= $thumb.find(&#039;img&#039;);\r\n\t\t\t\t\t\t\t$image.stop().animate({\r\n\t\t\t\t\t\t\t\t&#039;width&#039;\t\t: &#039;100%&#039;,\r\n\t\t\t\t\t\t\t\t&#039;height&#039;\t: &#039;100%&#039;,\r\n\t\t\t\t\t\t\t\t&#039;marginTop&#039;\t: &#039;0px&#039;,\r\n\t\t\t\t\t\t\t\t&#039;marginLeft&#039;: &#039;0px&#039;\r\n\t\t\t\t\t\t\t},150,function(){\r\n\t\t\t\t\t\t\t\tvar f_w\t= per_line * 125;\r\n\t\t\t\t\t\t\t\tvar f_h\t= per_col * 125;\r\n\t\t\t\t\t\t\t\tvar f_l = $(window).width()\/2 - f_w\/2\r\n\t\t\t\t\t\t\t\tvar f_t = $(window).height()\/2 - f_h\/2\r\n\t\t\t\t\t\t\t\tif(ie)\r\n\t\t\t\t\t\t\t\t\tvar param = {\r\n\t\t\t\t\t\t\t\t\t\t&#039;left&#039;\t: f_l + (i%per_line)*125 + &#039;px&#039;,\r\n\t\t\t\t\t\t\t\t\t\t&#039;top&#039;\t: f_t + Math.floor(i\/per_line)*125 + &#039;px&#039;\r\n\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\tvar param = {\r\n\t\t\t\t\t\t\t\t\t\t&#039;rotate&#039;: &#039;0deg&#039;,\r\n\t\t\t\t\t\t\t\t\t\t&#039;left&#039;\t: f_l + (i%per_line)*125 + &#039;px&#039;,\r\n\t\t\t\t\t\t\t\t\t\t&#039;top&#039;\t: f_t + Math.floor(i\/per_line)*125 + &#039;px&#039;\r\n\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\t$thumb.css({\r\n\t\t\t\t\t\t\t\t\t&#039;background-image&#039;\t: &#039;url(&#039;+image_src+&#039;)&#039;\r\n\t\t\t\t\t\t\t\t}).stop()\r\n\t\t\t\t\t\t\t\t.animate(param,1200,function(){\r\n\t\t\t\t\t\t\t\t\tif(i==nmb_thumbs-1){\r\n\t\t\t\t\t\t\t\t\t\taddNavigation();\r\n\t\t\t\t\t\t\t\t\t\tsetflag();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t$image.fadeOut(700);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tsetflag();\r\n\t\t\t\t\t\tremoveNavigation();\r\n\t\t\t\t\t\tdisperse();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\/\/ \u4e1a\u4f59\u8349\uff1awww.xttblog.com\r\n\t\t\t\tfunction removeNavigation(){\r\n\t\t\t\t\t$im_next.stop().animate({&#039;right&#039;:&#039;-50px&#039;},300);\r\n\t\t\t\t\t$im_prev.stop().animate({&#039;left&#039;:&#039;-50px&#039;},300);\r\n\t\t\t\t}\/\/ \u4e1a\u4f59\u8349\uff1awww.xttblog.com\r\n\t\t\t\tfunction addNavigation(){\r\n\t\t\t\t\t$im_next.stop().animate({&#039;right&#039;:&#039;0px&#039;},300);\r\n\t\t\t\t\t$im_prev.stop().animate({&#039;left&#039;:&#039;0px&#039;},300);\r\n\t\t\t\t}\/\/ \u4e1a\u4f59\u8349\uff1awww.xttblog.com\r\n\t\t\t\t$im_next.bind(&#039;click&#039;,function(){\r\n\t\t\t\t\tif(!flg_click) return;\r\n\t\t\t\t\tsetflag();\r\n\t\t\t\t\t\r\n\t\t\t\t\t++current;\r\n\t\t\t\t\tvar $next_thumb\t= $im_wrapper.children(&#039;div:nth-child(&#039;+(current+1)+&#039;)&#039;);\r\n\t\t\t\t\tif($next_thumb.length&gt;0){\r\n\t\t\t\t\t\tvar image_src\t= $next_thumb.find(&#039;img&#039;).attr(&#039;src&#039;).replace(&#039;\/thumbs&#039;,&#039;&#039;);\r\n\t\t\t\t\t\tvar arr \t\t= Array.shuffle(positionsArray.slice(0));\r\n\t\t\t\t\t\t$thumbs.each(function(i){\r\n\t\t\t\t\t\t\t\/\/ \u4e1a\u4f59\u8349\uff1awww.xttblog.com\r\n\t\t\t\t\t\t\tvar t = $(this);\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tt.css({\r\n\t\t\t\t\t\t\t\t\t&#039;background-image&#039;\t: &#039;url(&#039;+image_src+&#039;)&#039;\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\tif(i == nmb_thumbs-1)\r\n\t\t\t\t\t\t\t\t\tsetflag();\r\n\t\t\t\t\t\t\t},arr.shift()*20);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tsetflag();\r\n\t\t\t\t\t\t--current;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\/\/ \u4e1a\u4f59\u8349\uff1awww.xttblog.com\r\n\t\t\t\t$im_prev.bind(&#039;click&#039;,function(){\r\n\t\t\t\t\tif(!flg_click) return;\r\n\t\t\t\t\tsetflag();\r\n\t\t\t\t\t--current;\r\n\t\t\t\t\tvar $prev_thumb\t= $im_wrapper.children(&#039;div:nth-child(&#039;+(current+1)+&#039;)&#039;);\r\n\t\t\t\t\tif($prev_thumb.length&gt;0){\r\n\t\t\t\t\t\tvar image_src\t= $prev_thumb.find(&#039;img&#039;).attr(&#039;src&#039;).replace(&#039;\/thumbs&#039;,&#039;&#039;);\r\n\t\t\t\t\t\tvar arr \t\t= Array.shuffle(positionsArray.slice(0));\r\n\t\t\t\t\t\t$thumbs.each(function(i){\r\n\t\t\t\t\t\t\tvar t = $(this);\r\n\t\t\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\t\t\tt.css({\r\n\t\t\t\t\t\t\t\t\t&#039;background-image&#039;\t: &#039;url(&#039;+image_src+&#039;)&#039;\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\tif(i == nmb_thumbs-1)\r\n\t\t\t\t\t\t\t\t\tsetflag();\r\n\t\t\t\t\t\t\t},arr.shift()*20);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tsetflag();\r\n\t\t\t\t\t\t++current;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\/\/ \u4e1a\u4f59\u8349\uff1awww.xttblog.com\r\n\t\t\t\t$(window).smartresize(function(){\r\n\t\t\t\t\tremoveNavigation()\r\n\t\t\t\t\tdisperse();\r\n\t\t\t\t});\r\n\t\t\t\t\/\/ \u4e1a\u4f59\u8349\uff1awww.xttblog.com\r\n\t\t\t\tArray.shuffle = function( array ){\r\n\t\t\t\t\tfor(\r\n\t\t\t\t\tvar j, x, i = array.length; i;\r\n\t\t\t\t\tj = parseInt(Math.random() * i),\r\n\t\t\t\t\tx = array[--i], array[i] = array[j], array[j] = x\r\n\t\t\t\t);\r\n\t\t\t\t\treturn array;\r\n\t\t\t\t};\r\n            });\r\n        &lt;\/script&gt;\r\n    &lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>\n\t\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u6211\u7684\u535a\u5ba2\uff0c\u5982\u6709\u7591\u95ee\uff0c\u8bf7\u52a0qq\u7fa4\uff1a454796847\u3001135430763 \u5171\u540c\u8fdb\u6b65\uff01<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=2246\">jQuery+CSS3\u5b9e\u73b0\u76f8\u518c\u62fc\u56fe\u6548\u679c<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u767e\u5ea6\u641c\u7d22\u76f8\u518c\u62fc\u56fe\uff0c\u53d1\u73b0\u5339\u914d\u7684\u5185\u5bb9\u5f88\u5c11\u3002\u56e0\u6b64\u6211\u51b3\u5b9a\u4f7f\u7528 jQuery \u548c CSS3 \u6765\u5b9e\u73b0\u4e00\u6b3e\u76f8\u518c\u62fc\u56fe\u63d2\u4ef6\u3002 \u76f8 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[814,1106,49,115],"class_list":["post-2246","post","type-post","status-publish","format-standard","hentry","category-html5","tag-css3","tag-javascript","tag-jquery","tag-transform"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2246"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2246\/revisions"}],"predecessor-version":[{"id":2247,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2246\/revisions\/2247"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}