gpt4 book ai didi

javascript - 在 firefox 调整大小时加载适当大小的图像

转载 作者:太空宇宙 更新时间:2023-11-04 11:45:30 25 4
gpt4 key购买 nike

我找到了这个 example使用标签来使用响应功能。它在 Chrome 中运行良好,但在 Firefox 中无法正常运行。 Firefox 根据当前 Firefox 窗口宽度下载图像。是否可以在没有任何 js 的情况下根据窗口大小动态下载图像?

最佳答案

有关于 srcset 属性的错误报告

https://bugzilla.mozilla.org/show_bug.cgi?id=870021

目前可在 Chrome 的开发 channel 和 Firefox 34+ 中使用。在这两种情况下,您都需要启用它。在 Firefox 中,转到 about:config 并搜索“dom.image.picture.enabled”。在 Chrome 中,您需要转到 chrome://flags/#enable-experimental-web-platform-features,启用该功能并重新启动。

Reference Site

关于javascript - 在 firefox 调整大小时加载适当大小的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31024748/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com