{"id":217,"date":"2019-07-21T23:54:26","date_gmt":"2019-07-21T15:54:26","guid":{"rendered":"http:\/\/qssjx.com\/?p=217"},"modified":"2019-07-22T14:35:48","modified_gmt":"2019-07-22T06:35:48","slug":"%e9%9a%8f%e9%bc%a0%e6%a0%87%e5%8f%98%e6%8d%a2%e7%9a%84%e5%8a%a8%e6%80%81%e7%ba%bf%e6%9d%a1%e6%95%88%e6%9e%9c","status":"publish","type":"post","link":"https:\/\/qssjx.com\/?p=217","title":{"rendered":"\u968f\u9f20\u6807\u53d8\u6362\u7684\u52a8\u6001\u7ebf\u6761\u6548\u679c"},"content":{"rendered":"<p>\u5728\u522b\u4eba\u7684\u535a\u5ba2\u770b\u5230\u4e00\u4e2a\u968f\u9f20\u6807\u53d8\u6362\u7684\u52a8\u6001\u7ebf\u6761\u6548\u679c\uff0c\u4e5f\u5c31\u662f\u4fd7\u79f0\u7684\u8718\u86db\u7f51\u6548\u679c\uff0c\u5982\u4e0b\u56fe\uff08\u6216\u8005\u76f4\u63a5\u770b\u6211\u7684\u535a\u5ba2\u80cc\u666f\u4e5f\u53ef\u4ee5\u54e6\uff09<br \/>\n<a href=\"http:\/\/qssjx.com\/wp-content\/uploads\/2019\/07\/2019072115414079.png\" rel=\"box\" class=\"fancybox\" title=\"\u968f\u9f20\u6807\u53d8\u6362\u7684\u52a8\u6001\u7ebf\u6761\u6548\u679c\"><img decoding=\"async\" loading=\"lazy\" width=\"298\" height=\"357\" src=\"http:\/\/qssjx.com\/wp-content\/uploads\/2019\/07\/2019072115414079.png\" alt=\"\u968f\u9f20\u6807\u53d8\u6362\u7684\u52a8\u6001\u7ebf\u6761\u6548\u679c\" title=\"\u968f\u9f20\u6807\u53d8\u6362\u7684\u52a8\u6001\u7ebf\u6761\u6548\u679c\" alt=\"\" class=\"aligncenter size-full wp-image-216\" \/><\/a><br \/>\n\u8fd9\u4e2a\u6548\u679c\u7684\u5b9e\u73b0\u5176\u5b9e\u5e76\u4e0d\u96be\uff0c\u6709\u4e24\u79cd\u65b9\u6cd5\u63d0\u4f9b\u7ed9\u4e86\u5927\u5bb6\uff1a<\/p>\n<h2>\u65b9\u5f0f\u4e00<\/h2>\n<p>\u76f4\u63a5\u4f7f\u7528\u7f51\u4e0a\u7684js\u4ee3\u7801<\/p>\n<pre class=\"prettyprint linenums\" >\r\n&lt;script type=&quot;text\/javascript&quot; src=&quot;https:\/\/cdn.bootcss.com\/canvas-nest.js\/1.0.1\/canvas-nest.min.js&quot;&gt;&lt;\/script&gt;\u3000\r\n<\/pre>\n<p>\u5c06\u4e0a\u9762\u7684\u4ee3\u7801\u76f4\u63a5\u6dfb\u52a0\u5230\u535a\u5ba2\u4e3b\u9875\u9762\u5c31\u884c\u4e86\u3002<\/p>\n<h2>\u65b9\u5f0f\u4e8c<\/h2>\n<p>\u6dfb\u52a0\u5230\u672c\u5730js\u6587\u4ef6\uff1a<\/p>\n<pre class=\"prettyprint linenums\" >\r\n\/**\r\n* Copyright (c) 2016 hustcc\r\n* License: MIT\r\n* Version: v1.0.1\r\n* GitHub: https:\/\/github.com\/hustcc\/canvas-nest.js\r\n**\/\r\n!\r\nfunction() {\r\n    function n(n, e, t) {\r\n        return n.getAttribute(e) || t\r\n    }\r\n    function e(n) {\r\n        return document.getElementsByTagName(n)\r\n    }\r\n    function t() {\r\n        var t = e(&quot;script&quot;),\r\n        o = t.length,\r\n        i = t[o - 1];\r\n        return {\r\n            l: o,\r\n            z: n(i, &quot;zIndex&quot;, -1),\r\n            o: n(i, &quot;opacity&quot;, .5),\r\n            c: n(i, &quot;color&quot;, &quot;0,0,0&quot;),\r\n            n: n(i, &quot;count&quot;, 99)\r\n        }\r\n    }\r\n    function o() {\r\n        a = m.width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,\r\n        c = m.height = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight\r\n    }\r\n    function i() {\r\n        r.clearRect(0, 0, a, c);\r\n        var n, e, t, o, m, l;\r\n        s.forEach(function(i, x) {\r\n            for (i.x += i.xa, i.y += i.ya, i.xa *= i.x &gt; a || i.x &lt; 0 ? -1 : 1, i.ya *= i.y &gt; c || i.y &lt; 0 ? -1 : 1, r.fillRect(i.x - .5, i.y - .5, 1, 1), e = x + 1; e &lt; u.length; e++) n = u[e],\r\n            null !== n.x &amp;&amp; null !== n.y &amp;&amp; (o = i.x - n.x, m = i.y - n.y, l = o * o + m * m, l &lt; n.max &amp;&amp; (n === y &amp;&amp; l &gt;= n.max \/ 2 &amp;&amp; (i.x -= .03 * o, i.y -= .03 * m), t = (n.max - l) \/ n.max, r.beginPath(), r.lineWidth = t \/ 2, r.strokeStyle = &quot;rgba(&quot; + d.c + &quot;,&quot; + (t + .2) + &quot;)&quot;, r.moveTo(i.x, i.y), r.lineTo(n.x, n.y), r.stroke()))\r\n        }),\r\n        x(i)\r\n    }\r\n    var a, c, u, m = document.createElement(&quot;canvas&quot;),\r\n    d = t(),\r\n    l = &quot;c_n&quot; + d.l,\r\n    r = m.getContext(&quot;2d&quot;),\r\n    x = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ||\r\n    function(n) {\r\n        window.setTimeout(n, 1e3 \/ 45)\r\n    },\r\n    w = Math.random,\r\n    y = {\r\n        x: null,\r\n        y: null,\r\n        max: 2e4\r\n    };\r\n    m.id = l,\r\n    m.style.cssText = &quot;position:fixed;top:0;left:0;z-index:&quot; + d.z + &quot;;opacity:&quot; + d.o,\r\n    e(&quot;body&quot;)[0].appendChild(m),\r\n    o(),\r\n    window.onresize = o,\r\n    window.onmousemove = function(n) {\r\n        n = n || window.event,\r\n        y.x = n.clientX,\r\n        y.y = n.clientY\r\n    },\r\n    window.onmouseout = function() {\r\n        y.x = null,\r\n        y.y = null\r\n    };\r\n    for (var s = [], f = 0; d.n &gt; f; f++) {\r\n        var h = w() * a,\r\n        g = w() * c,\r\n        v = 2 * w() - 1,\r\n        p = 2 * w() - 1;\r\n        s.push({\r\n            x: h,\r\n            y: g,\r\n            xa: v,\r\n            ya: p,\r\n            max: 6e3\r\n        })\r\n    }\r\n    u = s.concat([y]),\r\n    setTimeout(function() {\r\n        i()\r\n    },\r\n    )\r\n} ();\r\n\r\n<\/pre>\n<p>\u672c\u6548\u679c\u7684\u539f\u4f5c\u8005\u7684GitHub\u5730\u5740\u662fhttps:\/\/github.com\/hustcc\/canvas-nest.js<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b9e\u73b0\u8718\u86db\u7f51\u6548\u679c\u7684\u4e24\u79cd\u65b9\u6cd5<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[28,2],"tags":[],"_links":{"self":[{"href":"https:\/\/qssjx.com\/index.php?rest_route=\/wp\/v2\/posts\/217"}],"collection":[{"href":"https:\/\/qssjx.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qssjx.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qssjx.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qssjx.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=217"}],"version-history":[{"count":9,"href":"https:\/\/qssjx.com\/index.php?rest_route=\/wp\/v2\/posts\/217\/revisions"}],"predecessor-version":[{"id":244,"href":"https:\/\/qssjx.com\/index.php?rest_route=\/wp\/v2\/posts\/217\/revisions\/244"}],"wp:attachment":[{"href":"https:\/\/qssjx.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qssjx.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qssjx.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}