设置子节点相对于父节点水平竖直都居中
//父节点设置flex布局
display: flex;
align-items: center;
justify-content: center;
dom.style.display = 'flex' dom.style.alignItems = 'center' dom.style.justifyContent = 'center' let img = document.createElement('img') img.src = trash img.style.width = '50%' // img.style.height = 15 dom.appendChild(img)
// removeChild(dom)