Safari 从 .AVIF 回退到 .GIF 使用 <picture> 标签不起作用

问题描述 投票:0回答:0

说明: 我试图在 Chrome 和更新的浏览器上显示 .AVIF 图像,同时在 Safari 等不正确支持 .AVIF 图像的浏览器上显示 .GIF 图像。但是,在 Safari 上,仍然请求 .AVIF 图像,并且在图像应显示的位置显示空白区域。此问题发生在 Safari(PC + 移动设备)上。

代码:

<picture>
  <source type="image/avif" srcset="https://overpadel.nl/wp-content/uploads/browser-test1.avif" />
  <source type="image/gif" srcset="https://overpadel.nl/wp-content/uploads/browser-test1.gif" />
  <img src="https://overpadel.nl/wp-content/uploads/browser-test1.gif" alt="" />
</picture>

问题: 关于如何让 .GIF 图像而不是 .AVIF 图像显示在 Safari 上的任何提示?我错过了什么?

image safari cross-browser mobile-safari image-formats
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.