获取元素的属性进行设置样式,但是获取到的是一个集合不能直接设置会报错找不到,需要进行数组的方式取值,直接上代码
let rotate=document.getElementsByClassName('curImg');
console.log(rotate)
~~rotate.style.height=rotate.height*1.1+'px'~~
改:rotateImg[0].style.height=rotateImg[0].height*1.1+'px';