【CSS3】matrix
来源:互联网 发布:淘宝新店第一天刷几单 编辑:程序博客网 时间:2024/06/07 11:38
matrix使用方法:
transform: matrix(a,b,c,d,e,f);
根据
得到:
x’=ax+cy+e
y’=bx+dy+f
其中,x和y是元素最开始的坐标,x’ 和y’则是通过矩阵变换后得到新的坐标。
需要说明的几点:
1、translate和scale都很好理解,利用公式很容易得到。
2、旋转rotate:比matrix方便多了。
方法以及参数使用如下(假设角度为θ
):
matrix(cosθ,sinθ,-sinθ,cosθ,0,0)
结合矩阵公式,就有:
x' = x*cosθ-y*sinθ+0 = x*cosθ-y*sinθy' = x*sinθ+y*cosθ+0 = x*sinθ+y*cosθ
拉伸也用到了三角函数,不过是tanθ
,而且,其至于b, c
两个参数相关,书写如下(注意y
轴倾斜角度在前):
matrix(1,tan(θy),tan(θx),1,0,0)
套用矩阵公式计算结果为:
x' = x+y*tan(θx)+0 = x+y*tan(θx) y' = x*tan(θy)+y+0 = x*tan(θy)+y
对应于skew(θx + "deg",θy+ "deg")
这种写法。
0 0
- 【CSS3】matrix
- css3 矩阵 matrix
- Css3 transform matrix()的使用
- matrix 2d in CSS3
- CSS3 transform中的Matrix(矩阵)
- css3 transform matrix 深入理解
- 理解CSS3 transform中的Matrix(矩阵)
- Transform Matrix(矩阵变形)-Css3演示
- css3中的transform中的matrix(矩阵)
- 理解CSS3 transform中的Matrix(矩阵)
- 理解CSS3 transform中的Matrix(矩阵)
- 理解CSS3 transform中的Matrix(矩阵)
- 理解CSS3 transform中的Matrix(矩阵)
- 理解CSS3 transform中的Matrix(矩阵)
- 理解CSS3 transform中的Matrix(矩阵)
- 理解CSS3 transform中的Matrix(矩阵)
- 理解CSS3 transform中的Matrix(矩阵)
- 理解CSS3 transform中的Matrix(矩阵)
- Alternating Current
- Android 6.0 fork Zygote时的存储权限管理
- 在release(发布app)中屏蔽NSLog输出语句
- C++学习笔记:虚析构函数
- Android4.4的zygote进程
- 【CSS3】matrix
- Xcode中archive打包的时候,出现you are not allowed to perform this operation.please..问题
- 关于微信SDk的方法(1)
- linux下如何查看文件权限
- 深入浅出ClassLoader测试代码
- activity向另一个activity中的fragment传值
- 学习android前言:爱上编程
- 九度题目1088
- js 小数相加出现很多小数位