When html2canvas intercepts an element

when html2canvas intercepts an element,

cannot be intercepted when the background-size value of the element background is contain.

/ / the style of div I set, where the value of backgroundSize is contain

const noDataStyle = {

width: "100%",
height: "calc(100% - 2.2rem)",
backgroundImage: `url(${require("../../../images/noData.png")})`,
backgroundRepeat: "no-repeat",
backgroundPosition: "center",
backgroundSize: "contain"

};
< div style= {noDataStyle} > < / div >

in this case, canvas, can be generated but canvas is empty

/ / if background is changed to img, for example:
css:
.noDataStyle {

width: 100%;
height: calc(100% - 2.2rem);

}
.noDataStyle > img {

width: 100%;
height: 100%;
object-fit: contain;

}
html:
< div className= "noDataStyle"} >

<img src={`${require("../../../images/noData.png")}`}/>

< / div >

in this case, canvas, can be generated and the picture is in canvas, but the object-fit:contain of the picture is invalid

Feb.10,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea0455-47881.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea0455-47881.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?