Javascript 淡入淡出或交叉淡入淡出背景图像

发布于 2024-09-18 07:48:52 字数 58 浏览 4 评论 0原文

请问可以淡入/交叉淡入淡出背景图像吗?

如果是的话,如何...

谢谢。

Is it possible to fade in / crossfade background images please?

If so, how...

Thank you.

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

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

发布评论

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

评论(4

星星的轨迹 2024-09-25 07:48:52

不。
嵌套一堆对象或使用绝对定位堆叠它们通常是完成任务的唯一方法。

No.
Nesting a bunch of objects, or stacking them with absolute positioning is typically the only way to accomplish the task.

就是爱搞怪 2024-09-25 07:48:52

实现这些类型效果的一个好方法是使用 jQuery。

请看一下:
http://api.jquery.com/fadeOut/
http://api.jquery.com/fadeIn/

这些站点提供了一个很好的示例,说明如何执行每个操作,只需将其应用到您的背景图像即可。

我希望这有帮助。

A great way to do these type of effects is with jQuery.

Please take a look at:
http://api.jquery.com/fadeOut/
http://api.jquery.com/fadeIn/

The sites provide a good example of how to do each, simply apply it to your background images.

I hope this helps.

记忆消瘦 2024-09-25 07:48:52

除非您在具有背景图像集的容器(等)上进行操作,否则不会。您可能需要考虑将“交叉淡入淡出单个元素的背景”更改为“更改多个容器的不透明度,每个容器都有自己的背景图像”——这是一种更现实的 JS 方法。

Not unless you're operating on a container (etc) that has a background image set, no. You may want to consider changing "crossfading the background of a single element" to "changing the opacities of more than one container, each of which having their own background image" - that's a more realistic approach with JS.

衣神在巴黎 2024-09-25 07:48:52

我会冒险猜测并回答“是”。

I'll hazard a guess and go with 'yes'.

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