码迷,mamicode.com
首页 > Web开发 > 详细

css3 transform matrix矩阵的使用

时间:2014-08-27 14:42:07      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:style   color   os   使用   strong   for   问题   div   sp   

 
Transform 执行顺序问题 — 后写先执行
matrix(a,b,c,d,e,f) 矩阵函数
•通过矩阵实现缩放
x轴缩放 a=x*a    c=x*c     e=x*e;
y轴缩放 b=y*b   d=y*d     f=y*f;
 
•通过矩阵实现位移
x轴位移: e=e+x
y轴位移: f=f+y
 
•通过矩阵实现倾斜
x轴倾斜: c=Math.tan(xDeg/180*Math.PI)
y轴倾斜: b=Math.tan(yDeg/180*Math.PI)
 
matrix(a,b,c,d,e,f) 矩阵函数
通过矩阵实现旋转
a=Math.cos(deg/180*Math.PI);
b=Math.sin(deg/180*Math.PI);
c=-Math.sin(deg/180*Math.PI);
d=Math.cos(deg/180*Math.PI);
 
变换兼容IE9以下IE版本只能通过矩阵来实现
filter: progid:DXImageTransform.Microsoft.Matrix( M11= 1, M12= 0, M21= 0 , M22=1,SizingMethod=‘auto expand‘);
IE下的矩阵没有E和F两个参数 M11==a; M12==c; M21==b; M22==d
 

css3 transform matrix矩阵的使用

标签:style   color   os   使用   strong   for   问题   div   sp   

原文地址:http://www.cnblogs.com/wxydigua/p/3939334.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!