var imgObj=document.createElement("div");
imgObj.style.backgroundImage="url(imgs/images/7.png)"
console.log(imgObj)
imgObj.setAttribute("style","position:absolute;left:"+left+"px;top:"+top+"px; background-repeat: no-repeat;background-position: center; background-size: cover; height:35px; width:35px;border-radius: 100%;");
$(".scan-gold-pic").append(imgObj);
没有报错;能够创造出节点;但是图片无法宣示;请问问题在哪里
我在调试的时候发现没有添加图片
imgObj.setAttribute("background-image","url(imgs/images/7.png)")这么写有问题啊