小编Zeb*_*osz的帖子

谷歌Chrome版本40 srcset属性问题

我在Chrome 40.0.2214.91中看到与img标签(响应图像)上的srcset属性有很多不一致

在我更新到Chrome v40(我在~39之前)之前,srcset属性工作正常,并会在浏览器调整大小时交换图像.现在,有时,如果我将浏览器设置为所需宽度,则会显示较小版本的图像,然后刷新页面.其他时候它将无法正常工作.

测试jsbin:http://jsbin.com/hulaconake/1/edit?html,output

图像标签我有:

<img srcset="http://placehold.it/300x200 300w, http://placehold.it/500x400 500w">

我也在使用nonPlacehold.it图像在另一个环境中测试它,并使用Picturefill.js http://scottjehl.github.io/picturefill/

我在FF或Safari中都没有任何问题(都使用图片填充).

iOS Chrome也有类似的问题.

我的语法错了吗?有什么事情我不知道吗?

html google-chrome image responsive-design srcset

14
推荐指数
1
解决办法
7431
查看次数

标签 统计

google-chrome ×1

html ×1

image ×1

responsive-design ×1

srcset ×1