javascript - js创建节点的残像问题
阿神
阿神 2017-04-11 13:17:30
0
0
485

使用原生js代码创建节点,在刷新页面的时候总会出现残像的问题,不知道如何解决

以下是代码

    var bb = imgGet.parentNode.appendChild(document.createElement("p"));
    bb.style.position = "absolute";
    bb.style.zIndex = "100";
    bb.style.left = "0px";
    bb.style.top = "0px";
    bb.style.width = imgGet.width+"px";
    bb.style.height = imgGet.height+"px";
    bb.style.lineHeight = imgGet.height+"px";
    bb.style.textAlign = "center";

    var ii = bb.appendChild(document.createElement("img"));
    ii.style.width = "20%";
    ii.src="imgsrc";

异常情况:

正常情况:

阿神
阿神

闭关修行中......

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!