gpt4 book ai didi

html - 使用 AlphaImageLoader 应用 Sprite 图像

转载 作者:行者123 更新时间:2023-11-28 19:05:38 27 4
gpt4 key购买 nike

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

最佳答案

DD_belatedPNG脚本允许 background-position , 使用 VML 而不是 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.

关于html - 使用 AlphaImageLoader 应用 Sprite 图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3652079/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com