Notes
Notes copied to clipboard
另类定义lazyload的纯色placeholder图的颜色的方法(svg)
这里我们用到了svg
data:image/svg+xml;utf8,<svg fill="${placeholderBackgroundColor}" width="1" height="1" version="1.1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" /></svg>
我们只需要传入placeholderBackgroundColor
就可以得到任意颜色placeholder~