我试图让srcset工作,所以我可以在不同的屏幕上加载多个图像,但它在控制台中给出了以下错误:
"解析' srcset'属性值,因为它的' w'描述符无效。"
这就是我尝试使用srcset的方式:
<img src="images/promo/promo-categories/1a/01-promo-category-option-1a-xl.jpg" srcset="images/promo/promo-categories/1a/01-promo-category-option-1a-xl.jpg 1601w, images/promo/promo-categories/1a/02-promo-category-option-1a-large.jpg 1442w, images/promo/promo-categories/1a/03-promo-category-option-1a-medium.jpg 1280w, images/promo/promo-categories/1a/04-promo-category-option-1a-ms.jpg 1164w, images/promo/promo-categories/1a/05-promo-category-option-1a-small.jpg 948w, images/promo/promo-categories/1a/06-promo-category-option-1a-xs.jpg 814w, images/promo/promo-categories/1a/07-promo-category-option-1a-xxs.jpg 768w, images/promo/promo-categories/1a/08-promo-category-option-1a-mob-wide.jpg 480w, images/promo/promo-categories/1a/09-promo-category-option-1a-mob-small.jpg 320w, images/promo/promo-categories/1a/10-promo-category-option-1a-mob-xs.jpg 0w" alt="Volledig assortiment" title="Volledig assortiment" />