setCenter(dom:HTMLElement,zIndex:number){ dom.style.position = "absolute"; dom.style.zIndex= ""+zIndex; let tgW = dom.clientWidth; let tgH = dom.clientHeight; dom.style.left = (window.innerWidth/2-tgW/2)+"px"; dom.style.top = (window.innerHeight/2-tgH/2)+"px"; }