html5 高清屏幕图片处理

1. srcset

语法:在元素上添加srcset属性。srcset的值是一个用逗号分隔的列表。列表中的每个项包含一张图片的路径并且按倍数(例如,1x,2x,3x...)提供多张分辨率的图片

参考:https://github.com/YIXUNFE/blog/issues/25

2. media query

@media only screen and (-Webkit-min-device-pixel-ratio: 1.5),
only screen and (-moz-min-device-pixel-ratio: 1.5),
only screen and (-o-min-device-pixel-ratio: 3/2),
only screen and (min-device-pixel-ratio: 1.5){

}

3. image-set

参考:http://www.jianshu.com/p/67ce3e7dd157

原文地址:https://www.cnblogs.com/lmh2072005/p/6024521.html