//获取 transform 值 var reg=/matrix.((\d+([, ]+)?){6})./g; var str= progressUI.css("transform"); //str = matrix(1, 0, 0, 1, 0, 0) var arr=reg.exec(str); var newarr = arr[1].split(/[, ]+/g); //newarr = ["1", "0", "0", "1", "0", "0"] console.log(newarr);
例设置 translate 值 ;
$(obj).css("transform","translate(30px,0px)");
jquery 设置 transform/translate 获取 transform/translate 的值
原文:https://www.cnblogs.com/q1104460935/p/9678401.html