【发布时间】:2015-04-30 19:26:51
【问题描述】:
我试图了解 srcset 宽度值的工作原理,但我的基本示例让我失望。
鉴于下面的代码,我希望在视口大于 600 像素时显示大图像。但是,它实际上在 784px 处发生变化。我不确定这是为什么。
<!-- image changes to large variant at 784px instead of the expected 1024px -->
<img
src="small.jpg"
srcset="small.jpg 600w,
large.jpg 1024w"
alt="A test image">
【问题讨论】:
标签: html image responsive-design srcset