使用 AlphaImageLoader 应用精灵图像

发布于 2024-09-18 01:47:38 字数 133 浏览 2 评论 0原文

我正在尝试将 AlphaImageLoader 用于 PNG 图像,但我的图像是精灵图像。当我在 CSS 中使用 AlphaImageLoader 时,我没有得到精灵图像的输出。如何将 AlphaImageLoader 用于精灵?我可以将它用于精灵吗?

I am trying to use AlphaImageLoader for a PNG image but my image is a sprite image. I am not getting the output of my sprite image when I use AlphaImageLoader in CSS. How can I use AlphaImageLoader for sprites? Can I use it for sprites?

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

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

发布评论

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

评论(1

苍白女子 2024-09-25 01:47:38

DD_belatedPNG 脚本允许 background-position,而是使用 VML AlphaImageLoader 的。

这是一个 Javascript 库
将 PNG 图像支持夹入 IE6
没有太多大惊小怪。

您可以使用 PNG 作为
元素或作为
CSS 中的 background-image 属性。

如果您尝试后者,您将
发现,与普通用法不同
AlphaImageLoader 的,
背景位置
background-repeat 按预期工作。

作为奖励,“固定”元素将
响应一组常用的
Javascript 风格的作业,以及
作为 a:hover 伪类。

The DD_belatedPNG script allows for background-position, using VML instead of AlphaImageLoader.

This is a Javascript library that
sandwiches PNG image support into IE6
without much fuss.

You can use PNGs as the SRC of an
<IMG/> element or as a
background-image property in CSS.

If you attempt the latter, you will
find that, unlike with vanilla usage
of AlphaImageLoader,
background-position and
background-repeat work as intended.

As a bonus, "fixed" elements will
respond to a commonly used set of
Javascript style assignments, as well
as the a:hover pseudo-class.

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