var copyDom = document.querySelector('.fenxiang1'); var width = copyDom.offsetWidth;//dom宽 var height = copyDom.offsetHeight;//dom高 console.log(JSON.stringify(copyDom)); console.log(width); console.log(height); var scale = 2;//放大倍数 html2canvas(copyDo