{"id":157,"date":"2011-01-11T16:37:49","date_gmt":"2011-01-11T16:37:49","guid":{"rendered":"http:\/\/blog.yyhcw.com\/post\/157.html"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T07:54:17","slug":"pngie6","status":"publish","type":"post","link":"http:\/\/blog.yyhcw.com\/post\/157.html","title":{"rendered":"PNG\u56fe\u7247\u5728IE6\u4e0b\u80cc\u666f\u4e0d\u900f\u660e\u7684\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"<div>\u3000\u3000\u6700\u8fd1\u5728\u4f7f\u7528png\u56fe\u7247\u505a\u80cc\u666f\u7684\u65f6\u5019\u7279\u90c1\u95f7\uff1b\u603b\u7ed3\u4e0b\uff1aPNG\u56fe\u7247\u6709\u5f88\u597d\u7684\u54c1\u8d28\u3002\u9634\u5f71\u6548\u679c\u4e5f\u4e0d\u4f1a\u6709\u6742\u8fb9,\u5f88\u6d41\u7545\u3002\u5982\u679c\u63d2\u5165\u7f51\u9875\u7684\u8bdd\u53ef\u4ee5\u7ed9\u7f51\u7ad9\u5185\u5bb9\u589e\u8272\u4e0d\u5c11!\u66f4\u91cd\u8981\u7684\u662f\u5728\u4e0d\u589e\u52a0\u56fe\u7247\u5bb9\u91cf\u5927\u5c0f\u7684\u60c5\u51b5\u4e0b\u63d0\u9ad8\u4e86\u9875\u9762\u7684\u56fe\u7247\u7684\u8d28\u91cf\u3002<\/div>\n<div>&nbsp;<\/div>\n<div>\u3000\u3000\u5bf9\u4e8e\u6709\u590d\u6742\u80cc\u666f\uff0c\u5982\uff1a\u5728\u6709\u989c\u8272\u8fc7\u5ea6\u80cc\u666f\u4e0a\u63d2\u5165\u4e0d\u89c4\u5219\u8fb9\u6846\u7684\u56fe\u7247\u5e26\u6765\u6781\u5927\u5f88\u4fbf\u5229!&nbsp;<\/div>\n<div>&nbsp;<\/div>\n<div>\u3000\u3000\u4f46\u5728\u4f7f\u7528IE\u7684\u65f6\u5019\u5bf9\u4e8e\u63d2\u5165\u7684\u900f\u660e\u80cc\u666f\u7684.png\u7684\u56fe\u7247\u662f\u4e0d\u80fd\u6b63\u5e38\u663e\u793a\u7684\u3002IE\u4f1a\u81ea\u52a8\u7ed9&quot;.png&quot;\u683c\u5f0f\u7684\u56fe\u7247\u52a0\u4e2a\u7070\u8272\u80cc\u666f\u3002\u8fd9\u662f\u5f88\u591a\u524d\u7aef\u5de5\u4f5c\u4eba\u5458\u975e\u5e38\u7ea0\u7ed3\u7684\u95ee\u9898\u3002\u672c\u4eba\u6700\u8fd1\u5c31\u9047\u5230\u4e86\u8fd9\u6837\u7684\u95ee\u9898...<\/div>\n<div>&nbsp;<\/div>\n<div>\u3000\u3000\u89e3\u51b3\u8fd9\u4e2a\u7684\u65b9\u6cd5\u662f\u589e\u52a0javascript\u3002\u628a\u4e0b\u9762\u7684\u4ee3\u7801\u653e\u5728head\u533a\u5c31\u53ef\u4ee5\u89e3\u51b3\u95ee\u9898\u4e86\u3002\u5177\u4f53\u65b9\u6cd5\u5982\u4e0b\uff1a<\/div>\n<div>&nbsp;<\/div>\n<div>&lt;script language=&quot;javascript&quot;&gt; <br \/>function correctPNG()&nbsp;&nbsp;<br \/>{  <br \/>for(var i=0; i&lt;document.images.length; i++) <br \/>{ <br \/>&nbsp;&nbsp;var img =  document.images[i] <br \/>&nbsp;&nbsp;var imgName = img.src.toUpperCase() <br \/>&nbsp;&nbsp;if  (imgName.substring(imgName.length-3, imgName.length) == &quot;PNG&quot;) <br \/>&nbsp;&nbsp;{ <br \/>&nbsp;&nbsp;  var imgID = (img.id) ? &quot;id='&quot; + img.id + &quot;' &quot; : &quot;&quot; <br \/>&nbsp;&nbsp; var imgClass =  (img.className) ? &quot;class='&quot; + img.className + &quot;' &quot; : &quot;&quot; <br \/>&nbsp;&nbsp; var imgTitle =  (img.title) ? &quot;title='&quot; + img.title + &quot;' &quot; : &quot;title='&quot; + img.alt + &quot;' &quot; <br \/>&nbsp;&nbsp;  var imgStyle = &quot;display:inline-block;&quot; + img.style.cssText&nbsp;&nbsp;<br \/>&nbsp;&nbsp; if (img.align  == &quot;left&quot;) imgStyle = &quot;float:left;&quot; + imgStyle <br \/>&nbsp;&nbsp; if (img.align == &quot;right&quot;)  imgStyle = &quot;float:right;&quot; + imgStyle <br \/>&nbsp;&nbsp; if (img.parentElement.href) imgStyle  = &quot;cursor:hand;&quot; + imgStyle&nbsp;&nbsp; <br \/>&nbsp;&nbsp; var strNewHTML = &quot;&lt;span &quot; + imgID +  imgClass + imgTitle <br \/>&nbsp;&nbsp; + &quot; style=\\&quot;&quot; + &quot;width:&quot; + img.width + &quot;px; height:&quot;  + img.height + &quot;px;&quot; + imgStyle + &quot;;&quot; <br \/>&nbsp;&nbsp;+  &quot;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader&quot; <br \/>&nbsp;&nbsp; + &quot;(src=\\'&quot; +  img.src + &quot;\\', sizingMethod='scale');\\&quot;&gt;&lt;\/span&gt;&quot;&nbsp;&nbsp;<br \/>&nbsp;&nbsp; img.outerHTML  = strNewHTML <br \/>&nbsp;&nbsp; i = i-1 <br \/>&nbsp;&nbsp;} <br \/>} <br \/>} <br \/>window.attachEvent(&quot;onload&quot;,  correctPNG); <br \/>&lt;\/script&gt;<\/div>\n<div>&nbsp;<\/div>\n<div>&nbsp;<\/div>\n<div>\u52a0\u5165\u4e86\u8fd9\u4e2a\u4ee3\u7801\u4f60\u518d\u8bd5\u8bd5\uff0c\u770b\u6709\u6ca1\u6709\u6548\u679c\uff01<\/div>\n","protected":false},"excerpt":{"rendered":"\u3000\u3000\u6700\u8fd1\u5728\u4f7f\u7528png\u56fe\u7247\u505a\u80cc\u666f\u7684\u65f6\u5019\u7279\u90c1\u95f7\uff1b\u603b\u7ed3\u4e0b\uff1aPNG\u56fe\u7247\u6709\u5f88\u597d\u7684\u54c1\u8d28\u3002\u9634\u5f71\u6548\u679c\u4e5f\u4e0d\u4f1a\u6709\u6742\u8fb9,\u5f88\u6d41\u7545\u3002\u5982\u679c \u00b7\u00b7\u00b7","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"views":249,"_links":{"self":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts\/157"}],"collection":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/comments?post=157"}],"version-history":[{"count":0,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts\/157\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/media?parent=157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/categories?post=157"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.yyhcw.com\/api\/wp\/v2\/tags?post=157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}