您可以像使用任何图像一样使用webp:
<img src="img.webp" />
但是,由于并非始终受支持(请参见http://caniuse.com/#feat=webp),因此您可以使用它来设置后备广告:
<picture>
<source srcset="img.webp" type="image/webp">
<source srcset="img.jpg" type="image/jpeg">
<img src="img.jpg">
</picture>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句