IE6 的渐变不起作用

发布于 2024-12-05 12:27:39 字数 366 浏览 1 评论 0原文

我的网页上有几个 div 使用 IE css 过滤器为背景创建渐变效果。

该页面主要在 IE6 中查看(不幸的是,我没有其他选择),并且在我的开发计算机上显示良好。我还尝试使用 IETester 查看页面,该页面在 IE 5.5 到 IE 8 中也能正常显示。

但是,在“实时”计算机上查看页面时,渐变根本不显示。 “实时”计算机上的浏览器是带有 sp3 的 IE 6。我检查了 div,它们都有“hasLayout”,所以这不是问题。

IE 中是否有任何设置会阻止过滤器工作,或者有人可以提出过滤器不显示的任何其他原因。我不明白为什么它们在一个版本的 IE 6 中工作而在另一个版本中不起作用。

不幸的是,我无法链接到任何示例。

谢谢

I have several divs on a webpage that use the IE css filter to create a gradient effect for the background.

The page is viewed primarily in IE6 (I have no other choice unfortunatly) and displays fine on my development machine. I have also tried viewing the page using IETester and the page also displays fine in IE 5.5 to IE 8.

However, when viewing the page on the "live" machine, the gradients don't show up at all. The browser on the "live" machine is IE 6 with sp3. I have checked the div's and they all have "hasLayout" so that isn't the problem.

Are there any settings within IE that would stop filters working or could anybody suggest any other reasons why they would not be showing up. I can't work out why they work in one version of IE 6 but not another.

Unfortunatly I can't link to any examples.

Thanks

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

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

发布评论

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

评论(1

最美的太阳 2024-12-12 12:27:39

IE 的 filter 功能并未内置于浏览器中;他们正在使用外部库(DLL)。这就是“progid”部分的全部内容,也解释了为什么其中一些如此笨重。

如果客户端计算机上未安装这些 DLL,则过滤器 样式将不起作用。如果它在某些 IE6 机器上工作,但在其他机器上不工作,那么这几乎肯定是您遇到的问题。

理论上,您应该可以通过安装缺失的 DLL 来解决问题。

然而,你面临的问题是,如果客户端还没有从 IE6 升级他们的浏览器,那么他们肯定不会想让你在他们的机器上摆弄安装未知的(对他们来说)图书馆。无论如何,您都必须为每台机器执行此操作。

最重要的是,实际上这不会是一个选择。最好的选择是放弃尝试让 IE6 做一些花哨的事情,而重新使用背景图像作为渐变。写起来并不愉快,但是当 IE6 是标准浏览器时,每个人都这样做是有原因的。

The filter features of IE are not built into the browser; they are using external libraries (DLLs). This is what the 'progid' part is all about, and also explains why some of them are so clunky.

If those DLLs are not installed on the client machine, then the filter styles won't work. If it works in some IE6 machines but not others, then this is almost certainly the problem you're encountering.

Theoretically it should be possible for you to fix the problem by installing the missing DLLs.

However, the problem for you is that if the client is anal enough not to have upgraded their browser from IE6 yet, then it's pretty certain that they're not going to want to have you fiddling around on their machines installing unknown (to them) libraries. In any case, you would have to do it for every individual machine.

The bottom line is that realistically this is not going to be an option. Your best bet is to give up trying to make IE6 do fancy stuff, and go back to using background images for your gradients. It's not pleasant to write, but there is a reason why everyone used to do it that way when IE6 was the standard browser.

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