<?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>idealMind &#187; png ie6 css</title>
	<atom:link href="http://blog.idealmind.com.br/tag/png-ie6-css/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.idealmind.com.br</link>
	<description>Soluções que facilitam a sua vida</description>
	<lastBuildDate>Mon, 26 Dec 2011 00:11:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>fixPng Jquery Plugin ie6</title>
		<link>http://blog.idealmind.com.br/geral/fixpng-jquery-plugin-for-ie6/</link>
		<comments>http://blog.idealmind.com.br/geral/fixpng-jquery-plugin-for-ie6/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 21:32:38 +0000</pubDate>
		<dc:creator>Wellington Ribeiro</dc:creator>
				<category><![CDATA[geral]]></category>
		<category><![CDATA[background png ie6]]></category>
		<category><![CDATA[fix png ie6]]></category>
		<category><![CDATA[fixpng]]></category>
		<category><![CDATA[png fix jquery plugin]]></category>
		<category><![CDATA[png fix plugin]]></category>
		<category><![CDATA[png ie6 css]]></category>
		<category><![CDATA[png jquery]]></category>
		<category><![CDATA[png no ie6]]></category>
		<category><![CDATA[png transparent ie6]]></category>
		<category><![CDATA[png transparente ie6]]></category>

		<guid isPermaLink="false">http://blog.idealmind.com.br/?p=308</guid>
		<description><![CDATA[This plugin solves png transparency issues in IE 6, and it is free and easy to use. Este plugin gratuito e fácil de usar resolve o problema de transparência no IE6.]]></description>
			<content:encoded><![CDATA[<div id="HOTWordsTxt" name="HOTWordsTxt"><h2>Download &#038; Demo</h2>
<p><strong>Demo:</strong> <a href="http://blog.idealmind.com.br/exemplos/fixpng/" target="_blank">http://blog.idealmind.com.br/exemplos/fixpng/</a><br />
<strong>Download</strong>: <a href="http://blog.idealmind.com.br/exemplos/fixpng/fixpng.rar" target="_blank">http://blog.idealmind.com.br/exemplos/fixpng/fixpng.rar</a></p>
<h2>ENGLISH</h2>
<p>This plugin solves the problems of transparency in PNG in Internet Explorer 6.</p>
<p>It looks for all the images and puts them in the background with an opacity filter, replacing the original image with a transparent 1px gif.</p>
<h3>Using</h3>
<pre class="brush: jscript; title: ; notranslate">

&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;js/fixpng.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot;&gt;
 $(document).ready(function(){
 $(&quot;body&quot;).fixPng();
 });
 &lt;/script&gt;
</pre>
<p>The code to put images not changes:</p>
<pre class="brush: xml; title: ; notranslate">

&lt;img src=&quot;img/image.png&quot; alt=&quot;png image&quot; /&gt;
</pre>
<h3>Options</h3>
<pre class="brush: jscript; title: ; notranslate">

$(&quot;body&quot;).fixPng( [ string gif_file, string attr, string noreplace ] );
</pre>
<p><strong>gif_file</strong> &#8211; If you use a file different then &#8220;img/vazio.gif&#8221;, use this option to set the correct path to a transparent gif.</p>
<p><strong>attr</strong> &#8211; If you do not want to apply the filter on a specific image, use this option to set the attribute of the image that will not have the filter. The default is the attribute &#8216;rel&#8217;.</p>
<p><strong>noreplace</strong> &#8211; The attribute value defined above. The default is &#8216;noreplace&#8217;.</p>
<p>Example</p>
<pre class="brush: jscript; title: ; notranslate">

$(&quot;body&quot;).fixPng( &quot;images/null.gif&quot;, &quot;class&quot;, &quot;nofixpng&quot; );
</pre>
<p><strong>Image that will not filter</strong></p>
<pre class="brush: xml; title: ; notranslate">

&lt;img src=&quot;img/imagem.png&quot; class=&quot;test nofixpng&quot; /&gt;
</pre>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XWV9MWQD7PMLG">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/pt_BR/i/scr/pixel.gif" width="1" height="1"><br />
</form>
</p>
<h2>PORTUGUÊS</h2>
<p>Este plugin resolve os problemas de transparência em PNG no Internet Explorer 6.</p>
<p>Ele procura por todas as imagens e as coloca em background com um filtro de opacidade, substituindo a imagem original por um gif transparente de 1px.</p>
<h3>Como usar</h3>
<pre class="brush: jscript; title: ; notranslate">

&lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot; src=&quot;js/fixpng.js&quot;&gt;&lt;/script&gt;
 &lt;script type=&quot;text/javascript&quot;&gt;
 $(document).ready(function(){
 $(&quot;body&quot;).fixPng();
 });
 &lt;/script&gt;
</pre>
<p>O código de iserção das imagens é normal:</p>
<pre class="brush: xml; title: ; notranslate">

&lt;img src=&quot;img/imagem.png&quot; alt=&quot;png image&quot; /&gt;
</pre>
<h3>Opções</h3>
<pre class="brush: jscript; title: ; notranslate">

$(&quot;body&quot;).fixPng( [ string gif_file, string attr, string noreplace ] );
</pre>
<p><strong>gif_file</strong> &#8211; Se você for usar um gif diferente de &#8220;img/vazio.gif&#8221;, use esta opção para definir o caminho correto.</p>
<p><strong>attr</strong> &#8211; Se você não deseja aplicar o filtro em uma determinada imagem, use esta opção para definir o atributo da imagem que não terá o filtro. O padrão é o atributo &#8216;rel&#8217;.</p>
<p><strong>noreplace</strong> &#8211; O valor do atributo definido acima. O padrão é &#8216;noreplace&#8217;.</p>
<p>Exemplo</p>
<pre class="brush: jscript; title: ; notranslate">

$(&quot;body&quot;).fixPng( &quot;images/null.gif&quot;, &quot;class&quot;, &quot;nofixpng&quot; );
</pre>
<p><strong>Imagem que não terá o filtro</strong></p>
<pre class="brush: xml; title: ; notranslate">

&lt;img src=&quot;img/imagem.png&quot; class=&quot;test nofixpng&quot; /&gt;
</pre>
<p><a name="license">&nbsp;</a><br />
<h3>Licence/Licença</h3>
<p>This plugin is under <a href="http://www.gnu.org/licenses/gpl.html">GNU GENERAL PUBLIC LICENSE.</a></p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XWV9MWQD7PMLG">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/pt_BR/i/scr/pixel.gif" width="1" height="1"><br />
</form>
</p>
<h3 class='related_post_title'>Posts Relacionados:</h3>
<ul class='related_post'>
<li><a href='http://blog.idealmind.com.br/javascript/fix-png-transparente-ie6/' title='Fix png transparente ie6'>Fix png transparente ie6</a></li>
</ul>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.idealmind.com.br/geral/fixpng-jquery-plugin-for-ie6/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Fix png transparente ie6</title>
		<link>http://blog.idealmind.com.br/javascript/fix-png-transparente-ie6/</link>
		<comments>http://blog.idealmind.com.br/javascript/fix-png-transparente-ie6/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 02:57:48 +0000</pubDate>
		<dc:creator>Wellington Ribeiro</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[background png ie6]]></category>
		<category><![CDATA[fix png ie6]]></category>
		<category><![CDATA[png ie6 css]]></category>
		<category><![CDATA[png no ie6]]></category>
		<category><![CDATA[png transparent ie6]]></category>
		<category><![CDATA[png transparente ie6]]></category>

		<guid isPermaLink="false">http://blog.idealmind.com.br/?p=52</guid>
		<description><![CDATA[PNG transparente no IE6 usando javascript, de modo fácil!]]></description>
			<content:encoded><![CDATA[<div id="HOTWordsTxt" name="HOTWordsTxt"><p>Olá!</p>
<p>Há um tempinho atrás desenvolvi uma solução em javascript para resolver problemas de transparência no ie6.</p>
<p>Segue abaixo a função desenvolvida por mim:</p>
<pre class="brush: jscript; title: ; notranslate">

function fixPng()
{
	if( navigator.appVersion.match('MSIE 6') )
	{
		var imagem = document.getElementsByTagName(&quot;img&quot;);
		for ( var i = 0; i &lt; imagem.length; i++)
		{
			src = imagem[i].getAttribute(&quot;src&quot;);
			if (src.indexOf(&quot;.png&quot;) != -1) {
				imagem[i].setAttribute(&quot;width&quot;, imagem[i].width);
				imagem[i].setAttribute(&quot;height&quot;, imagem[i].height);
				imagem[i].setAttribute(&quot;src&quot;, &quot;/images/vazio.gif&quot;);
				imagem[i].runtimeStyle.filter = &quot;progid:DXImageTransform.Microsoft.AlphaImageLoader(src='&quot;+ src + &quot;',sizingMethod='scale')&quot;;
			}
		}
	}
}
</pre>
<p><strong>A funcionalidade é bem simples:</strong></p>
<ul>
<li>A linha 2 busca todos os elementos img da página e armazena no vetor imagem</li>
<li>A linha 3 vai verificar cada tag img encontrada para analisar.</li>
<li>A linha 4 atribui o caminho da imagem à variável src</li>
<li>A linha 5 verifica se encontra .png (teoricamente, a extensão do arquivo) no caminho do arquivo e, se encontrar, vai aplicar algumas propriedades na tag encontrada</li>
<li>As linhas 6 e 7 vão setar os atributos de largura e altura para a tag img encontrada, setando de acordo com as dimensões da imagem correspondente.</li>
<li>A linha 8 vai mudar o atributo src da tag para uma imagem gif (/images/vazio.gif) de 1px por 1px 100% transparente</li>
<li>Por fim, a linha 9 vai atribuir um background à tag usando a imagem que antes estava no atributo src (a imagem original), usando um filtro que só o ie6 entende: <strong>progid:DXImageTransform.Microsoft.AlphaImageLoader(parâmetros)</strong>.</li>
</ul>
<p>Pronto! Todos os pngs da página vão aparecer com as suas respectivas trasparências!</p>
<p>A função nada mais faz que vasculhar todas as tags img que chamem pngs no atributo src (na verdade, que contenham a string &#8220;.png&#8221; no caminho), coloca uma imagem gif tranparente no lugar mantendo as proporções da imagem original, e coloca a imagem png em background aplicando nele um filtro que o carrega usando um filtro de transparência alpha, isso para cada elemento encontrado!</p>
<p>Para funcionar, basta chamar a função no evento onload<br />
<strong>&lt;body onload=&#8221;fixPng()&#8221;&gt;</strong></p>
<p>ou assim: <strong><br />
$(document).ready(function(){ fixPng();});</strong></p>
<p>-  se você usa jQuery.</p>
<p>Acredito que essa solução será bem útil!</p>
<p>Deixe seu comentário!<br />
<h3 class='related_post_title'>Posts Relacionados:</h3>
<ul class='related_post'>
<li><a href='http://blog.idealmind.com.br/geral/fixpng-jquery-plugin-for-ie6/' title='fixPng Jquery Plugin ie6'>fixPng Jquery Plugin ie6</a></li>
</ul>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.idealmind.com.br/javascript/fix-png-transparente-ie6/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

