//获取 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)");
原文地址:https://www.cnblogs.com/q1104460935/p/9678401.html
时间: 2024-10-09 21:27:36