请问JS如何实现按钮同时控制两个DIV中图片转动

2025-04-19 01:44:17
推荐回答(1个)
回答1:












function tranImg(trun){
    $('#imgTest').each(function(){
        var me = $(this);
        me.current=!me.current&&me.current!=0?0:me.current;
        me.current = (me.current+trun)%360;
        imgObj.style.transform = 'rotate('+current+'deg)';
        $(this).css("transform");
    });
}

相关问答
最新问答