TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

DD_belatedPNG: Medicine for your IE6/PNG headache

29 点作者 jeff18超过 15 年前

6 条评论

adriand超过 15 年前
This library, and the jQuery Supersleight plugin (there's also a non-jQuery version) are probably the best IE6 PNG "fixers".<p>However, in my experience you would be better off designing for this issue from the outset and avoiding the use of these libraries if you care about your layouts looking good in IE6. For simple situations, these can work fine, however you'll run into issues for anything beyond the basics. For example, in this library:<p>&#62; "Fixed" &#60;IMG/&#62; elements must take on visibility:hidden;, and thus become unclickable. I see no workaround other than using clear pixel GIF replacements, and that is code that I am not going to write.<p>There go your buttons.<p>I've also encountered issues where sometimes, replaced images take on a different height and get stretched, but this behaviour is unpredictable.<p>Your best bet for dealing with transparent PNGs in IE6 is either to stop caring about IE6 and leaving IE6 users with the opaque backgrounds around the images, or switching to transparent GIFs. A good designer can produce transparent GIFs that are just as crisp as PNGs, and then you don't need to rely on hacks any more.
评论 #1016459 未加载
评论 #1015950 未加载
pohl超过 15 年前
<p><pre><code> &#60;!--[if IE 6]&#62; </code></pre> GWT has a wonderful, automatic mechanism for this workaround built into its ClientBundle (nee ImageBundle) facility. One especially great thing about it is that the compiler properly omits it for all browser permutations except for IE, so that FireFox or WebKit-based browsers never need to evaluate the above conditional expression...because the code just isn't there if it's not needed.
评论 #1016130 未加载
GvS超过 15 年前
IE 6 market share is slowly decreasing, but it's still around 10%: <a href="http://www.w3schools.com/browsers/browsers_stats.asp" rel="nofollow">http://www.w3schools.com/browsers/browsers_stats.asp</a>
atambo超过 15 年前
How do people handle including this javascript within an IE conditional statement in rails? Is there a way to handle it with rails helpers or do people just add it to their views manually?
cemregr超过 15 年前
Why don't you just use 8-bit alpha-PNG's?<p>Works in all browsers, degrades gracefully on IE6 (semitransparency becomes fully transparent), smaller file sizes as a bonus.
Zarathu超过 15 年前
While this is very cool, people have been using this for years.
评论 #1015897 未加载