gpt4 book ai didi

html - 鼠标光标作为 .Gif 没有动画

转载 作者:行者123 更新时间:2023-11-28 13:00:23 26 4
gpt4 key购买 nike

我正在尝试使用 gif 作为鼠标光标,但光标对我来说根本没有动画效果。我尝试了几种不同的尺寸,但没有成功。

html, body {
height: 100%;
margin: 0;
padding: 0;
cursor: url(White-Sperm.gif), url(Sperm-Cursor.png), auto;
}

引用我正在使用的 gif 的 JS Fiddle 在这里:

http://jsfiddle.net/Fq9RL/

我的设计师说,在 Safari 中,它为他设置了“一点”动画,但停滞且不流畅。对我来说,它在 Safari 中根本没有动画效果,在 Chrome 中对我们俩都不起作用。

有没有人尝试过这种技术?我们已尝试在 gif 中使用更少的帧、更小的延迟、更小的 gif 大小等。非常感谢任何帮助!

最佳答案

这里问了一个类似的问题:

Animated cursor support in web applications?

After doing some more research, I don't think it's possible at the moment. It doesn't seem that any of the browsers support animated cursors as of 2/8/2012 using the CSS cursor property. I suppose it could be done using JavaScript to repeatedly change the value of the cursor property every few frames to make it appear animated, but that may be more trouble than it is worth.

所以答案似乎是目前不可能。

关于html - 鼠标光标作为 .Gif 没有动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21467306/

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