第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

.setAttribute()添加背景圖片為何無法宣示

.setAttribute()添加背景圖片為何無法宣示

揚帆大魚 2018-10-16 13:10:47
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)沒有添加圖片
查看完整描述

1 回答

?
www說

TA貢獻1775條經(jīng)驗 獲得超8個贊

imgObj.setAttribute("background-image","url(imgs/images/7.png)")這么寫有問題啊

imgObj.style.backgroundImage="url(imgs/images/7.png)"


查看完整回答
反對 回復(fù) 2018-11-02
  • 1 回答
  • 0 關(guān)注
  • 1121 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號