Rechercher
 
 

Résultats par :
 


Rechercher Recherche avancée

Créer un forum
Créer un forum
Derniers sujets
Flux RSS

Yahoo! 
Google Reader 
MSN 
AOL 
NewsGator 
Rojo 
Bloglines 


Marque-page social

  http://illiweb.com/fa/social_bookmarking/digg.gif   http://illiweb.com/fa/social_bookmarking/delicious.gif   http://illiweb.com/fa/social_bookmarking/reddit.gif   http://illiweb.com/fa/social_bookmarking/stumbleupon.gif   http://illiweb.com/fa/social_bookmarking/slashdot.gif   http://illiweb.com/fa/social_bookmarking/furl.gif   http://illiweb.com/fa/social_bookmarking/yahoo.gif   http://illiweb.com/fa/social_bookmarking/google.gif   http://illiweb.com/fa/social_bookmarking/blinklist.gif   http://illiweb.com/fa/social_bookmarking/blogmarks.gif   http://illiweb.com/fa/social_bookmarking/technorati.gif 

Conservez et partagez l'adresse de Forum gratuit : Le forum des forums actifs sur votre site de social bookmarking

Qui est en ligne ?
Il y a en tout 260 utilisateurs en ligne :: 31 Enregistrés, 2 Invisibles et 227 Invités :: 2 Moteurs de recherche

adam_sfp, angelina2b, anne, areuno, benhurburg, benji7065, Caline-08, choupette60, christel, claude51000, DeoXD, Dracos, Dracul, Etana, kilari tsukishima, LA FOISE, La relève, Lili1, Lucy Jones, m.dynamite, mercedes, Nilana, perlette, SandyL, Shadowking, Tony112, Trunks-super-sayan, Typlo, wibise, yoyo 76, Zen

[ Voir toute la liste ]


Le record du nombre d'utilisateurs en ligne est de 1264 le Mar 26 Fév - 16:26

PNG transparent sous IE

Poster un nouveau sujet   Répondre au sujet

Voir le sujet précédent Voir le sujet suivant Aller en bas

Astuce PNG transparent sous IE

Message par revaz le Ven 21 Oct - 13:58

Internet Explorer ne sait pas afficher la transparence sur les images au format PNG (firefox n'a aucun probleme pour la transparence).

Pour avoir de la transparence sur les png avec IE il faut mettre le petit script que voila :

tout d'abord ouvrez votre bloc note, et copiez ceci :

// Correctly handle PNG transparency in Win IE 5.5 or higher.
// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004

function correctPNG()
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgStyle = "display:inline-block;" + img.style.cssText
if (img.align == "left") imgStyle = "float:left;" + imgStyle
if (img.align == "right") imgStyle = "float:right;" + imgStyle
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
window.attachEvent("onload", correctPNG);


Enregistre le fichier avec ce nom pngfix.js , après vous devrez héberger ce fichier sur le net.

pour un forumactif il suffit de mettre ceci dans "description du site"

<!--[if gte IE 5.5000]> <script type=text/javascript src=url du fichier pngfix.js></script><![endif]-->


Dernière édition par le Sam 22 Oct - 3:05, édité 1 fois

revaz
+ Hyperactif +

Nombre de messages: 4540
Points: 1851
Date d'inscription: 28/10/2004
Niveau d'alerte: Aucun avertissement

Voir le profil de l'utilisateur http://www.revaz-creation.net/forum

Revenir en haut Aller en bas

Astuce Re: PNG transparent sous IE

Message par larme d' le Ven 21 Oct - 15:37

png sans transparence:




png avec transparence:




gif transparent:



Wink

larme d'
Invité


Revenir en haut Aller en bas

Astuce Re: PNG transparent sous IE

Message par revaz le Mer 9 Nov - 14:35

le script marche très bien.
mais voila interdit le hotlink, donc à toi de trouver un hébergeur acceptant le hotlink sur un fichier .JS

revaz
+ Hyperactif +

Nombre de messages: 4540
Points: 1851
Date d'inscription: 28/10/2004
Niveau d'alerte: Aucun avertissement

Voir le profil de l'utilisateur http://www.revaz-creation.net/forum

Revenir en haut Aller en bas

Voir le sujet précédent Voir le sujet suivant Revenir en haut


Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum