html:
<img src=image.jpg id='imageid' style="position:absolute; left: 0; top: 0;">
js:
var x=document.getElementById('imageid').offsetTop; x= x + step; document.getElementById('imageid').style.top= x + "px";
getElementById 有效
document.getElementById('imageid')
querySelector 无效:
document.querySelector('img')