{"id":2718,"date":"2017-07-06T22:28:23","date_gmt":"2017-07-06T14:28:23","guid":{"rendered":"http:\/\/www.qdabc.cn\/?p=2718"},"modified":"2017-07-06T22:28:23","modified_gmt":"2017-07-06T14:28:23","slug":"%e5%9b%be%e7%89%87%e6%94%be%e5%a4%a7%e6%95%88%e6%9e%9c","status":"publish","type":"post","link":"http:\/\/www.qdabc.cn\/?p=2718","title":{"rendered":"\u56fe\u7247\u653e\u5927\u6548\u679c"},"content":{"rendered":"<p>\u7ec3\u4e60\u4e00\uff1a\u4e2d\u5fc3\u653e\u5927<\/p>\n<pre>&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n\t&lt;meta charset=\"UTF-8\"&gt;\r\n\t&lt;title&gt;\u4e2d\u5fc3\u653e\u5927&lt;\/title&gt;\r\n\t&lt;style type=\"text\/css\"&gt;\r\n\t\t#div1{\r\n\t\t\twidth: 300px;\r\n\t\t\theight: 300px;\r\n\t\t\tposition: relative;\r\n\t\t\tbackground: #eee;\r\n\t\t\tleft: 300px;\r\n\t\t\ttop: 300px;\r\n\t\t}\r\n\t\t#div2{\r\n\t\t\twidth: 200px;\r\n\t\t\theight: 200px;\r\n\t\t\tposition: absolute;\r\n\t\t\tbackground: red;\r\n\t\t\tleft: 300px;\r\n\t\t\ttop: 300px;\r\n\t\t}\r\n\t&lt;\/style&gt;\r\n\t&lt;script type=\"text\/javascript\" src=\"move.js\"&gt;&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\t&lt;div id=\"div1\"&gt;&lt;\/div&gt;\r\n\t&lt;div id=\"div2\"&gt;&lt;\/div&gt;\r\n\r\n\t&lt;script type=\"text\/javascript\"&gt;\r\n\tvar div1 = document.getElementById('div1');\r\n\tvar div2 = document.getElementById('div2');\r\n\r\n\tdiv1.onmouseover = function(){\r\n\t\tstartMove(div1,{width:200,height:200,marginTop:-50,marginLeft:-50})\r\n\t}\r\n\tdiv1.onmouseout = function(){\r\n\t\tstartMove(div1,{width:200,height:200,marginTop:0,marginLeft:0})\r\n\t}\r\n\t&lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u7ec3\u4e60\u4e8c\uff1a<\/p>\n<pre>&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n\t&lt;title&gt;\u6848\u4f8b&lt;\/title&gt;\r\n\t&lt;meta charset=\"utf-8\"&gt;\r\n\t&lt;script type=\"text\/javascript\" src=\"move.js\"&gt;&lt;\/script&gt;\r\n\t&lt;style type=\"text\/css\"&gt;\r\n\t\t*{\r\n\t\t\tmargin: 0;\r\n\t\t\tpadding: 0;\r\n\t\t}\r\n\t\t#ul1{\r\n\t\t\twidth: 366px;\r\n\t\t\tmargin: auto;\r\n\t\t\tposition: relative;\r\n\t\t\tmargin-top: 50px;\r\n\t\t}\r\n\t\t#ul1 li{\r\n\t\t\tlist-style: none;\r\n\t\t\twidth: 100px;\r\n\t\t\theight: 100px;\r\n\t\t\tbackground: #ccc;\r\n\t\t\tborder: 1px solid black;\r\n\t\t\tfloat: left;\r\n\t\t\tmargin: 10px;\r\n\t\t}\r\n\t\t#ul1 li img{\r\n\t\t\twidth: 100%;\r\n\t\t\theight: 100%;\r\n\t\t}\r\n\t&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;ul id=\"ul1\"&gt;\r\n\t&lt;li&gt;&lt;img src=\"img\/1.jpg\" alt=\"\"&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;img src=\"img\/2.jpg\" alt=\"\"&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;img src=\"img\/3.jpg\" alt=\"\"&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;img src=\"img\/4.jpg\" alt=\"\"&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;img src=\"img\/5.jpg\" alt=\"\"&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;img src=\"img\/6.jpg\" alt=\"\"&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;img src=\"img\/7.jpg\" alt=\"\"&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;img src=\"img\/1.jpg\" alt=\"\"&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;img src=\"img\/2.jpg\" alt=\"\"&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n\r\n&lt;script type=\"text\/javascript\"&gt;\r\n\tvar oul = document.getElementById('ul1');\r\n\tvar list = oul.getElementsByTagName('li');\r\n\r\n\tvar iMinZindex = 2;\r\n\t\/\/ \u5e03\u5c40\u8f6c\u6362\r\n\tfor (var i = 0; i &lt; list.length; i++) {\r\n\t\t\/\/ list[i].innerHTML = \"left:\"+list[i].offsetLeft+\",top:\"+list[i].offsetTop;\r\n\t\tlist[i].style.left = list[i].offsetLeft + \"px\";\r\n\t\tlist[i].style.top = list[i].offsetTop + \"px\";\r\n\t}\r\n\tfor (var i = 0; i &lt; list.length; i++) {\r\n\t\tlist[i].style.position = \"absolute\";\r\n\t\tlist[i].style.margin = \"0\";\r\n\t}\r\n\r\n\t\/\/ \u6dfb\u52a0\u4e8b\u4ef6\r\n\tfor (var i = 0; i &lt; list.length; i++) {\r\n\t\tlist[i].onmouseover = function(){\r\n\t\t\tthis.style.zIndex = iMinZindex ++;\r\n\t\t\tstartMove(this, {width: 200, height: 200, marginLeft:-50, marginTop:-50})\r\n\t\t}\r\n\t\tlist[i].onmouseout = function(){\r\n\t\t\tstartMove(this, {width: 100, height: 100, marginLeft:0, marginTop:0})\r\n\t\t}\r\n\t}\r\n\r\n&lt;\/script&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p class=\"post-copyright\">\u6b22\u8fce\u5206\u4eab\u672c\u6587\uff0c\u8f6c\u8f7d\u8bf7\u4fdd\u7559\u51fa\u5904\uff1a<a href=\"http:\/\/www.qdabc.cn\">\u524d\u7aefABC<\/a> &raquo; <a href=\"http:\/\/www.qdabc.cn\/?p=2718\">\u56fe\u7247\u653e\u5927\u6548\u679c<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u7ec3\u4e60\u4e00\uff1a\u4e2d\u5fc3\u653e\u5927 &lt;!DOCTYPE html&gt; &lt;html lang=&#8221;en&#8221;&gt; &lt;head&gt; &lt;meta charset=&#8221;UTF-8&#8243;&gt; &lt; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"_links":{"self":[{"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/posts\/2718"}],"collection":[{"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2718"}],"version-history":[{"count":1,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/posts\/2718\/revisions"}],"predecessor-version":[{"id":2719,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=\/wp\/v2\/posts\/2718\/revisions\/2719"}],"wp:attachment":[{"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2718"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.qdabc.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}