level 3
求解答!!!鼠标滑过图片开始播放 gif,鼠标没有移动就是一个静态,这是需要用什么样式啊?!
2022年03月08日 06点03分
1
level 5
不知道,做出来很麻烦,gif也没有暂停的功能。假设可以设置,那你监听鼠标移动,每次进入函数都先清除停止播放的定时器,中间设置播放,最后设置多少毫秒后停止播放的定时器。
2022年03月08日 10点03分
2
做出来了,很简单
2022年03月12日 13点03分
level 3
<figure class="effect-lily">
<a href=" " target="_blank">
< img class="giflist" src="categories_3.jpg" data-src="categories_3.jpg" data-gif="categories_gif7.gif" /></a >
<figcaption>
<h3>66666</h3>
</figcaption>
</figure>
<script>
$(".giflist").hover(function() {
$(this).attr('src', $(this).attr('data-gif'));
}, function() {
$(this).attr('src', $(this).attr('data-src'));
})
</script>
2022年03月29日 10点03分
6
level 1
用土方法应该就是在css文件里加一个hover事件吧,然后鼠标悬停的时候自动替换成gif图
2022年04月11日 12点04分
8