我想在所有浏览器中使用 jxr、webp 和 jp2 格式。
我尝试使用图片标签和图片填充来解决这个问题。
<html>
<head>
<script async=true src="picturefill.min.js"></script>
</head>
<body>
<picture>
<!--[if IE 9]><video style='display: none;'><![endif]-->
<source type="image/webp" srcset="img.webp">
<source type="image/jxr" srcset="img.jxr">
<source type="image/jp2" srcset="img.jp2">
<!--[if IE 9]></video><![endif]-->
<img src="img.jpg" alt="alt description">
</picture>
</body>
</html>
在 Chrome 和 Firefox 中它显示 webp 图像,但在 IE 和 Edge 中它总是显示 jpg 图像。IE支持jxr格式,为什么总是显示JPG图片而不是jxr呢?