-1
我使用下面的代码来为不同的屏幕大小使用不同大小的图像集,它在firefox和chrome中运行良好,但在safari中不能运行。有没有解决方法?我的代码:如何根据屏幕尺寸使用不同尺寸的图像集?
<picture>
<img src="static/images/content/roni.jpg"
srcset="static/images/content/roni_mobile.jpg 420w,
static/images/content/roni_landscape.jpg 700w,
static/images/content/roni_tablet.jpg 1056w,
static/images/content/roni.jpg 1937w"/>
</picture>
我想解决方案使用HTML/CSS/JS
是有使用JS任何解决方案?我有4套不同大小的图像。我想用于桌面,平板电脑,移动和移动领域。 – InsightCoders
你的例子不是一个完整的答案。如果我按原样使用它,它不会解决OP的原始问题 –