gpt4 book ai didi

html - 动画 PNG (APNG) 在不受支持的浏览器中回退到 gif?

转载 作者:行者123 更新时间:2023-12-04 10:30:08 28 4
gpt4 key购买 nike

显然,APNG 回落到 unsupported browsers 的第一帧

但是有没有办法让它在不受支持的浏览器中退回到 gif,就像我们为 webP 所做的那样?

<picture>
<source srcset="image.webp" type="image/webp">
<source srcset="image.jpg" type="image/jpeg">
<img src="image.jpg">
</picture>

最佳答案

这行得通! (我认为这只是因为对 <picture> 和动画 png 的支持非常相似( herehere ),但它也适用于“UC Browser for Android”,它显然支持 <picture> 但不支持 APNG ) 🎉

<picture>
<source srcset="image.png" type="image/apng">
<source srcset="image.gif" type="image/gif">
<img src="image.gif">
</picture>

关于html - 动画 PNG (APNG) 在不受支持的浏览器中回退到 gif?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60454494/

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