更新时间:2023-09-29 22:15:16
解决方案是使用 srcSet
而不是 srcset
。
The solution is to use srcSet
instead of srcset
.
<img src="/images/logo.png" srcSet="/images/logo-1.5x.png 1.5x, /images/logo-2x.png 2x" />
参考: https://facebook.github.io/react/docs/tags-and-attributes.html c $ c> HTML属性
Reference: https://facebook.github.io/react/docs/tags-and-attributes.html under HTML Attributes