CSS rotate property in IE

后端 未结 7 1101
深忆病人
深忆病人 2020-11-22 16:02

I want to rotate the DIV to a certain degree. In FF it functions but in IE I am facing a problem.

For example in the following style I can set rotation=1 to 4

<
7条回答
  •  被撕碎了的回忆
    2020-11-22 17:03

    You'll need to do a matrix transform as follows:

    filter: progid:DXImageTransform.Microsoft.Matrix(
      M11 = COS_THETA,
      M12 = -SIN_THETA,
      M21 = SIN_THETA,
      M22 = COS_THETA,
      sizingMethod = 'auto expand'
    );
    -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(
      M11 = COS_THETA,
      M12 = -SIN_THETA,
      M21 = SIN_THETA,
      M22 = COS_THETA,
      SizingMethod = 'auto expand'
    )";
    

    Where COS_THETA and SIN_THETA are the cosine and sine values of the angle (i.e. 0.70710678 for 45°).

提交回复
热议问题