问题
we're working on a site for some really cool folks, it's here: http://journeyofaction.com
it's a modified version of the 'wave' video-centric theme found on themeforest.
they're uploading all their images as .PNG's. the other day they emailed us saying some of their users aren't seeing any images, only small white boxes with a red 'x' and where the image should be has a large white border.
i checked it out in IE 7 / 8 / 9 on adobe browserlab, and verified that this is so. when we initially tested the site, everything was .jpg's.
i tried a few things from various fixes i found on the interwebs, i switched the doctype to XHTML 1.0 transitional instead of static, re-authored the css that deals with the images not to use shorthand properties,
but alas, the .PNG's are still breaking in IE7/8 , not in 9,
i found this:
http://answers.microsoft.com/en-us/ie/forum/ie8-windows_other/red-x-displayed-for-png-images/a99a5258-ca46-4b22-8338-ea446c40a570
and this:
http://www.winhelponline.com/articles/202/1/PNG-images-are-not-displayed-on-Web-sites-in-Internet-Explorer.html
both of which are mildly disturbing. hope that's not it.
i did notice in the .php theme files, the developer had closed out the image tags properly,
thusly:
echo '<img src="'.get_bloginfo('template_url').'/thumb.php?src='.$postimage.'&w=470&h=260&zc=1&q=95" alt="'.get_the_title().'" />';
but when i check it in the chrome inspector, the tags end in >, not /> no idea what's up.
tyty, stay classy, STACK.
回答1:
I believe it has to do with Quicktime, when it installs it associates PNGs to itself. If Quicktime is installed in your computer and that happens, try this: Right click on a PNG file and select the default program as Internet Explorer. Then refresh the page that has the problem in IE (or if not, close the browser and reopen it and go to the page)
来源:https://stackoverflow.com/questions/6625906/pngs-breaking-in-ie-7-and-8-red-x-white-border