css牛角,钻了关于CSS3 transform matrix(),transform的矩阵运算的牛角尖了transform:matrix(a,b,c,d,e,f)a , d 是scale的参数   ...

钻了关于CSS3 transform matrix(),transform的矩阵运算的牛角尖了

transform:matrix(a,b,c,d,e,f)

a , d 是scale的参数   scale(sx,sy)可以由matrix(sx,0,0,sy,0,0)运算而来

e , f 是translate的参数  translate(tx,ty)可以由matrix(1,0,0,1,tx,ty)运算而来,

b , c 是skew的参数   skew(θx,θy)可以由matrix(1,tan(θy),tan(θx),1,0,0)运算而来

a, b, c, d 是rotate的参数 rotate(θ)可以有matrix(cosθ,sinθ,-sinθ,cosθ,0,0)运算而来

(一)

translate的x' 和y‘ 分别是新的坐标,scale的的x' 和y‘ 分别是新的width和height

那旋转的矩阵运算得出的x’ = x*cosθ-y*sinθ+0 = x*cosθ-y*sinθ

y’ = x*sinθ+y*cosθ+0 = x*sinθ+y*cosθ

这里的x' 和y' 是什么?

倾斜的矩阵运算得出的x’ = x+y*tan(θx)+0 = x+y*tan(θx)

y’ = x*tan(θy)+y+0 = x*tan(θy)+y

这里的x' 和y' 是什么?

(二)

当transform要同时translate,scale,rotate,skew时,

translate的参数 就是matrix(a,b,c,d,e,f)中的" e , f "

rotate,scale,skew的参数就重叠了,这是如何叠加成matrix(a,b,c,d,e,f)中的” a,b,c,d “的?

同时旋转缩放位移的时候:

transform: rotate(θ) scale(sx,sy) translate(tx, ty)

transform:matrix(a,b,c,d,e,f) 的六个矩阵值是怎么组合出来的?

是不是transform: matrix(cosθ*sx,sinθ,-sinθ,cosθ*sy,tx,ty) ?

同时旋转缩放倾斜位移的时候:

transform: rotate(θ) scale(sx,sy) skew(θx,θy) translate(tx, ty)

transform:matrix(a,b,c,d,e,f) 的六个矩阵值是怎么组合出来的?

是不是transform: matrix(cosθ*sx,sinθ+tan(θy),-sinθ+tan(θx),cosθ*sy,tx,ty) ?

c9eaa1d181c3afefa04c0c8e039594e9.png

扫码下载作业帮

拍照答疑一拍即得

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值