使用 fancybox 时部分图像的 PNG/GIF 透明度问题?
我正在使用 fancybox (http://fancybox.net/) 来创建一个使用内联 div 创建的新网站 当点击各种东西时就会弹出,一切都很好。我在弹出窗口的顶部和底部使用一张页眉图像和一张页脚图像(部分透明 PNG),这些图像具有弯曲的角(在角后面有透明度,以便您可以看到背景)。页眉图像包含顶部两个角,并且是框的整个宽度,页脚图像包含底部两个角。这在除 IE7+ 之外的所有浏览器中都非常有效,其中右上角和下两个角的透明度工作正常,但左上角的透明度以深灰色显示(不是您在 IE6 中尝试使用透明度时看到的正常浅灰色,而不是一个 pngfix)。我尝试过各种 png 修复,但它们在 IE7+ 中都没有任何效果(但使其在 IE6 中完美工作)。我还读到,当使用透明 png 作为背景图像并设置不透明度时,IE 上存在问题,但是我看不出这是一个问题,因为其他三个角工作正常。
如果有人能解释这一点,那么我将非常感激,因为我很困惑,不知道还能尝试什么,因为它在 IE6 和所有其他浏览器中工作,并且透明度在图像的右侧工作,但是不是左侧和底部两个角(使用与顶角相同的图像,但只是颠倒)在包括 IE 在内的所有浏览器中都能完美工作。为了让它更令人困惑,我尝试使用 gif 图像来代替,并且发生了完全相同的事情,在 IE7+ 上,透明度在右侧起作用,但在左侧不起作用,并且在其他地方都可以正常工作。我尝试在 fancybox google group 上发帖,但是运气不太好,所以我想看看这里是否有人有任何想法!
非常感谢大家一如既往的帮助,
戴夫
I am using fancybox (http://fancybox.net/) for a new site i'm creating with inline divs
popping up when various things are clicked on and it all works great. I'm using one header image and one footer image (part transparent PNGs) at the top and bottom of my popup which have curved corners (with transparency behind them at the corners so you can see the background). The header image contains the top two corners and is the full width of the box and the footer image contains the bottom two corners. This works great in all browsers apart from IE7+, where the transparency in the top right and bottom 2 corners work fine but the top left corner transparency comes up in dark grey (not the normal light grey you see in IE6 when trying to use transparency without a pngfix). I have tried various png fixes but none of them have any effect in IE7+ (but make it work perfectly in IE6). I also read that there's a problem on IE when using transparent pngs as background images and setting the opacity, however i can't see this is a problem as the other three corners are working fine.
If anyone could shed any light on this then it would be much appreciated as i'm rather confused and don't know what else to try as it works in IE6 and all other browsers and the transparency works on the right side of the image but not the left and the bottom two corners (which use the same image as the top corners but just upside down) work perfectly in all browsers including IE. To make it even more confusing I tried using a gif image instead and exactly the same thing happens, on IE7+ the transparency works on the right side but not on the left and works fine everywhere else.i I tried posting on the fancybox google group but haven't had much luck so thought i'd see if anyone on here had any ideas!
Thanks so much for your help as ever everyone,
Dave
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论