I'm trying to append img to div tag (not img tag), however when I try this not works.
srcs[1] = "data:image/png;base64, iVBORw0KGgoAAAA..."
<div style={{ background: `url(${srcs[1]})center/cover no-repeat` }} />
Any ideas?
我会评估者使用div.background,而不是决定将img.src与object-fit: scale-down;
一起使用object-fit: scale-down;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.