Drupal Colorbox 模块和 IE

发布于 2024-09-14 07:36:45 字数 291 浏览 4 评论 0原文

我差点把头发都拔掉了!我正在尝试让 Colorbox 在 IE7 中正确显示边框(IE6 也是如此,但我至少会使用 IE7!)。

您可以看到我所看到的 此处。单击图库中的图片或登录链接。无论哪种方式,颜色框都应该正确显示。在 FF 中工作正常,但在 IE 中边框消失。有谁知道是什么原因造成的,更好的是,如何解决它?

谢谢你!

I have about pulled out my hair on this one! I am trying to get Colorbox to display the borders properly in IE7 (IE6 too, but I'll take IE7, at the least!).

You can see what I am seeing here. Click on a picture in the gallery or on the login link. Either way, colorbox is supposed to be appearing correctly. It works fine in FF, but the borders vanish in IE. Does anyone know what is causing this and better yet, how to fix it?

Thank you!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

絕版丫頭 2024-09-21 07:36:45

它确实有效!我已经尝试了一段时间,通过在我的主题文件中进行覆盖,但我从未在 Colorbox 库的文件夹中尝试过它(我讨厌编辑核心,即使这实际上不是“核心”。)

对于未来的读者:

  1. 导航到您的sites/all/libraries/colorbox/[无论您使用什么颜色框预设名称 - 我的是“example1”]/colorbox.css并复制它。
  2. 粘贴并将粘贴的文件保存为 colorbox.css.bak
  3. 现在打开 colorbox.css。
  4. 删除底部如下所示的行:
/*
        The following fixes png-transparency for IE6.  
        It is also necessary for png-transparency in IE7 & IE8 to avoid 'black halos' with the fade transition

        Since this method does not support CSS background-positioning, it is incompatible with CSS sprites.
        Colorbox preloads navigation hover classes to account for this.

        !! Important Note: AlphaImageLoader src paths are relative to the HTML document,
        while regular CSS background images are relative to the CSS document.
*/
.cboxIE #cboxTopLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderTopLeft.png, sizingMethod='scale');}
.cboxIE #cboxTopCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderTopCenter.png, sizingMethod='scale');}
.cboxIE #cboxTopRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderTopRight.png, sizingMethod='scale');}
.cboxIE #cboxBottomLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderBottomLeft.png, sizingMethod='scale');}
.cboxIE #cboxBottomCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderBottomCenter.png, sizingMethod='scale');}
.cboxIE #cboxBottomRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderBottomRight.png, sizingMethod='scale');}
.cboxIE #cboxMiddleLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderMiddleLeft.png, sizingMethod='scale');}
.cboxIE #cboxMiddleRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderMiddleRight.png, sizingMethod='scale');}
  1. 保存 colorbox.css 并完成!

It did work! I have been trying that for a while by making an override in my theme file, but I never tried it in the Colorbox library's folder (I hate editing core, even though this really isn't "core.")

For future readers:

  1. Navigate to your sites/all/libraries/colorbox/[whatever colorbox preset name you use - mine was "example1"]/colorbox.css and copy it.
  2. Paste and save the pasted file as colorbox.css.bak
  3. Now open colorbox.css.
  4. Delete the lines at the bottom that look like this:
/*
        The following fixes png-transparency for IE6.  
        It is also necessary for png-transparency in IE7 & IE8 to avoid 'black halos' with the fade transition

        Since this method does not support CSS background-positioning, it is incompatible with CSS sprites.
        Colorbox preloads navigation hover classes to account for this.

        !! Important Note: AlphaImageLoader src paths are relative to the HTML document,
        while regular CSS background images are relative to the CSS document.
*/
.cboxIE #cboxTopLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderTopLeft.png, sizingMethod='scale');}
.cboxIE #cboxTopCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderTopCenter.png, sizingMethod='scale');}
.cboxIE #cboxTopRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderTopRight.png, sizingMethod='scale');}
.cboxIE #cboxBottomLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderBottomLeft.png, sizingMethod='scale');}
.cboxIE #cboxBottomCenter{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderBottomCenter.png, sizingMethod='scale');}
.cboxIE #cboxBottomRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderBottomRight.png, sizingMethod='scale');}
.cboxIE #cboxMiddleLeft{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderMiddleLeft.png, sizingMethod='scale');}
.cboxIE #cboxMiddleRight{background:transparent; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=images/internet_explorer/borderMiddleRight.png, sizingMethod='scale');}
  1. Save colorbox.css and DONE!
つ低調成傷 2024-09-21 07:36:45

看到 colorbox.css 文件底部所有以“.cboxIE”开头的行了吗?我敢打赌,“filter: progid:DXImageTransform.Microsoft.AlphaImageLoader...;”财产是问题。我之前在 IE7 上遇到过非常类似的问题 - 它具有适当的属性来修复 IE 的透明 PNG 问题,但它仍然损坏。如果你想让它在 IE6 中看起来不错,你必须使用另一个 PNG 修复程序,但在我取出 colorbox.css 底部的所有“.cboxIE”类后,colorbox 没有任何问题。或者,至少是过滤器属性 - “背景:透明;”或许可以留下来。

希望有帮助!

See all those lines starting with ".cboxIE" at the bottom of the colorbox.css file? I'd bet money on the fact that the "filter: progid:DXImageTransform.Microsoft.AlphaImageLoader...;" property is the issue. I had a very similar issue with IE7 before - it has that property in place to fix issues with transparent PNGs for IE, but it's still broken. If you want it to look good in IE6, you'll have to use another PNG fix, but I haven't had any issues with colorbox after I took out all of the ".cboxIE" classes at the bottom of colorbox.css. Or, at least the filter property - the "background: transparent;" can probably stay.

Hope that helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文