未来的格式很可能会如下所示,来适配不同的屏幕分辨率。
1 2 3 4 5 6 |
< picture >
< source media = "(min-width: 45em)" srcset = "large-1.jpg 1x, large-2.jpg 2x" >
< source media = "(min-width: 18em)" srcset = "med-1.jpg 1x, med-2.jpg 2x" >
< source srcset = "small-1.jpg 1x, small-2.jpg 2x" >
< img src = "small-1.jpg" alt = "" >
</ picture >
|