<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>追風箏的小孩 &#187; PNG</title>
	<atom:link href="http://m955.com/wp/archives/tag/png/feed" rel="self" type="application/rss+xml" />
	<link>http://m955.com/wp</link>
	<description></description>
	<lastBuildDate>Thu, 03 Nov 2011 14:47:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>如何讓 IE6 支援透明的 PNG 圖檔</title>
		<link>http://m955.com/wp/archives/117</link>
		<comments>http://m955.com/wp/archives/117#comments</comments>
		<pubDate>Sun, 18 May 2008 02:31:18 +0000</pubDate>
		<dc:creator>blue955</dc:creator>
				<category><![CDATA[架站]]></category>
		<category><![CDATA[PNG]]></category>

		<guid isPermaLink="false">http://m955.com/wp/archives/117</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;&#160;&#160; PNG 真的是一種不錯的圖檔格式，可支援 32 bit 色彩，GIF 只到 256 色，色彩上更細緻，而且不會像 JPEG 會有壓縮性的破壞，並可以儲存成透明格式，檔案也不會大... ]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; PNG 真的是一種不錯的圖檔格式，可支援 32 bit 色彩，GIF 只到 256 色，色彩上更細緻，而且不會像 JPEG 會有壓縮性的破壞，並可以儲存成透明格式，檔案也不會大的離譜，這些都是 JPEG 望塵莫及的。</p>
<p><span id="more-117"></span></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 這麼好的圖片格式，在 IE 6 上卻不支援，網頁設計師們只能退而求其次，選擇色彩較少的 GIF 檔，而且 GIF 在轉成透明圖時，會有難看的毛邊出現，並不像 PNG 那般平順。</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 其實早在10年前 W3C 早就將 PNG 檔列為標準，但是過了10年後的今天，IE 6 還是不支援，真的搞不懂微軟腦子裡在想什麼，那為什麼不改用 IE7 呢？，我們在做網頁時必須多方考慮 USER 的瀏覽器，要確定能夠執行無誤，還要用多種瀏覽器測試，因為世界上不只有一種瀏覽器，況且 IE7 很佔資源，其實我到現在還是用 IE6</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 要讓 IE6 支援 PNG ，在 GOOGLE 上搜尋有很多種方式，大部分是加上 Javascript 在使用 CSS 將其呼叫出來，不過此種方法會被 IE 的安全管理員檔下來，如果 USER 不選擇載入的話，圖片也是無法透明。</p>
<p><img src="http://farm3.static.flickr.com/2036/2500191987_7f858d0075_o.png" /> </p>
<p>&#160;</p>
<p>有另一種方式可以躲過 IE6 的檢查（<a href="http://homepage.ntlworld.com/bobosola/pnghowto.htm" target="_blank">官方網站</a>）：</p>
<p>1.先下載 <a href="http://homepage.ntlworld.com/bobosola/pngfix.js" target="_blank">pngfix.js</a></p>
<p>2.將 pngfix.js 放置在網頁的根目錄，之後在網頁的 &lt;head&gt; 部分加上以下 CODE</p>
<div class="igBar"><span id="lhtml-2"><a href="#" onclick="javascript:showPlainTxt('html-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-2">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!--[if lt IE 7.]&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/script.html" target="_blank"><span style="color: #000000; font-weight: bold;">&lt;script</span></a> <span style="color: #000066;">defer</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text/javascript"</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">"pngfix.js"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;</span></a>!<span style="color: #66cc66;">&#91;</span>endif<span style="color: #66cc66;">&#93;</span>--<span style="color: #000000; font-weight: bold;">&gt;</span></a></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>3.如此一來就大功告成了</p>
]]></content:encoded>
			<wfw:commentRss>http://m955.com/wp/archives/117/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

