背景跟随鼠标轻微位移

function coinMove(e){//添加事件: onmousemove="coinMove()"
var e=e||event;
//console.log(e.clientX);
$('.mycoin').css('transform','translate('+e.clientX/1000+'%,0.'+e.clientY+'%) ');
}

posted @ 2019-12-16 15:10  A-zero  阅读(256)  评论(0编辑  收藏  举报