悬停缩略图时播放

发布于 2024-08-02 09:11:49 字数 70 浏览 2 评论 0原文

我的服务器上有几个视频,每个视频都有三个缩略图,我想要的是,如果我将鼠标放在视频上,它会显示(播放)该视频的所有缩略图 谢谢

i have several videos on my server and three thumbnails for every video what i want is if i put mouse on the video it shows(play) all the thumbnails of that video
thanks

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

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

发布评论

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

评论(1

甚是思念 2024-08-09 09:11:49

您需要每个缩略图都有静态和动画版本。
最简单的解决方案之一是使用:

<div style='width:100p; height:100px; background:url(static_thumb.gif)'></div>

然后对所有此类 div 应用:

$('your divs').hover(
function(){ $(this).html('<img src='+process($(this).css('background-image'))+'>') },
function(){ $(this).empty() }
);

最后您需要指定处理函数,它将把 url(static_thumb.gif) 更改为类似 ani_thumb.gif 的内容。

You need to have static and animated version of each thumbnail.
One of simplest solutions would be to use:

<div style='width:100p; height:100px; background:url(static_thumb.gif)'></div>

and then to all such divs apply:

$('your divs').hover(
function(){ $(this).html('<img src='+process($(this).css('background-image'))+'>') },
function(){ $(this).empty() }
);

and lastly you need to specify the process function, that will change url(static_thumb.gif) into something like ani_thumb.gif.

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