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);
沒有報錯;能夠創(chuàng)造出節(jié)點;但是圖片無法宣示;請問問題在哪里我在調(diào)試的時候發(fā)現(xiàn)沒有添加圖片
.setAttribute()添加背景圖片為何無法宣示
揚帆大魚
2018-10-16 13:10:47