学习记录
容器
在picture中的source中通过设置media、orientation、srcset。
支持加载webp就加载该格式,如果不支持就不加载。
srcset中包含的元素比较多。
<img width="500" srcset="
images/2000.png 2000w,
images/1500.png 1500w"
sizes="
(max-width:500px) 500px,
(max-width:1000px) 1000px"
src="images/500.png"
/>
学习记录。
更多【学习-HTML5学习系列之响应式图像】相关视频教程:www.yxfzedu.com