用HTML无限循环播放Gif图像(Play Gif image in HTML with infinite loop)
我尝试在我的HTML代码中显示一个gif动画图像
<img src="preview.gif" loop=infinite />无论有没有循环标记,它总是只播放一次。
任何帮助,使其不断循环?
I tried displaying a gif animated image inside my HTML code like
<img src="preview.gif" loop=infinite />With or without the loop tag , it always plays once only.
Any help to make it loop continuously?
最满意答案
循环编码到GIF本身,而不是img标签。 在图像编辑器中打开GIF并将模式更改为循环,或使用不同的GIF。 loop属性是无效的,弃用的属性只能在src是视频时使用。
Looping is encoded into the GIF itself, not the img tag. Open the GIF in an image editor and change the mode to loop, or use a different GIF. The loop attribute is an invalid, deprecated attribute only meant to work when the src is a video.
更多推荐
发布评论