Code Monkey home page Code Monkey logo

transform's Introduction

Transfrom

matrix() 是矩阵函数,以一个含六值的 matrix(a, b, c, d, e, f) 变换矩阵的形式指定一个 2D 变换,相当于直接应用一个 [a, c, e, b, d, f] 变换矩阵。

注意: matrix(a, b, c, d, e, f)matrix3d(a, b, 0, 0, c, d, 0, 0, 0, 0, 1, 0, e, f, 0, 1) 的一个简写。

  • ef 代表着偏移量 translate,x 和 y 轴
  • ad 代表着缩放比例 scale, x 和 y 轴
  • b 和 c 代表着斜切skew(具体参数和角度关系为, b-->tanθ y轴 c-->tanθ x轴 ,我们具体操作的时候还是要使用小数的)
  • a b c d 中的ad代表缩放(scale),bc代表者斜切(skew); abcd四个参数代表着旋转,这你可能难以理解,请继续往下看。

2D变形

matrix() combine() getCoordinateTransform()

skew skewX skewY scale scaleX scaleY rotate translate translateX translateY

CSS3 2D 转换 transform

3D变形

matrix3d() combine3d() getCoordinateTransform()

scaleZ scale3D rotateX rotateY rotateZ rotate3D translateZ translate3d

CSS3 3D 转换

Target

  • 坐标变换
  • 矩阵变换

Other Resource

transform's People

Contributors

pfan123 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.