@huangjs888/transform
v1.2.2
Published
Style transform
Downloads
10
Maintainers
Readme
transform
样式变换
安装使用
npm install @huangjs888/transform --save
css3样式:
body{
transform: matrix3d(
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
);
}
使用方法
import Transform from '@huangjs888/transform';
const transform = new Transform({ a: 0, k: 1, x: 0, y: 0 });
const raw = transform.toRaw();
raw.a += 1;
raw.k *= 2;
raw.x += 1;
raw.y += 1;
document.body.style.transform = transform.toString();