【发布时间】:2020-01-18 17:13:35
【问题描述】:
通过<picture> 标签使用 WebP 图像对于大多数浏览器来说是加快网络速度的好方法。我可以在灯箱内做同样的事情,但只是为了缩略图。
<a href="some_img.jpg" data-lightbox="reference">
<picture>
<source srcset="some_img.webp" type="image/webp">
<img src="some_img.jpg"alt="">
</picture>
</a>
有没有办法使用 WebP 图像,即使是点击时显示的图像(在通过锚点的 href 设置的灯箱中)?
【问题讨论】: