Reactjs中带有Material UI的背景图像映射



请大家注意,我有一个带图像的数组,我已经创建了一个映射内容,但我不能将背景图像放在组件的样式中。其他阵列对象正常工作

{DlCards.map((mdlcard) => {
return(
<Grid
item
xs = {mdlcard.grid_xs} 
sm = {mdlcard.grid_sm} 
md = {mdlcard.grid_md}
container
justify = 'space-between'
style   = {{
width:      '25%', 
marginTop:  60,
backgroundImage: {mdlcard.background}

}}>
style   = {{
width:      '25%', 
marginTop:  60,
backgroundImage: {`url(${mdlcard.background})}

}}>

您错过了url

相关内容

  • 没有找到相关文章

最新更新