수

The matrix() Method

· 2017-08-22 (화) 15:04:17 · 2646

The matrix() Method


이 matrix()방법은 모든 2D 변환 방법을 하나로 결합합니다.


matrix () 메서드는 수학 함수가 포함 된 6 개의 매개 변수를 사용하여 요소를 회전, 크기 조절, 이동 (병합) 및 비뚤어지게 할 수 있습니다.


매개 변수는 다음과 같습니다. matrix (scaleX (), skewY (), skewX (), scaleY (), translateX (), translateY ())


예

div {

    -ms-transform: matrix(1, -0.3, 0, 1, 0, 0); /* IE 9 */

    -webkit-transform: matrix(1, -0.3, 0, 1, 0, 0); /* Safari */

    transform: matrix(1, -0.3, 0, 1, 0, 0);

}


<!DOCTYPE html>

<html>

<head>

<style>

div {

    width: 300px;

    height: 100px;

    background-color: yellow;

    border: 1px solid black;

}


div#myDiv1 {

    -ms-transform: matrix(1, -0.3, 0, 1, 0, 0); /* IE 9 */

    -webkit-transform: matrix(1, -0.3, 0, 1, 0, 0); /* Safari */

    transform: matrix(1, -0.3, 0, 1, 0, 0); /* Standard syntax */

}


div#myDiv2 {

    -ms-transform: matrix(1, 0, 0.5, 1, 150, 0); /* IE 9 */

    -webkit-transform: matrix(1, 0, 0.5, 1, 150, 0); /* Safari */

    transform: matrix(1, 0, 0.5, 1, 150, 0); /* Standard syntax */

}

</style>

</head>

<body>


<p>The matrix() method combines all the 2D transform methods into one.</p>


<div>

This a normal div element.

</div>


<div id="myDiv1">

Using the matrix() method.

</div>


<div id="myDiv2">

Another use of the matrix() method.

</div>


</body>

</html>


|
댓글을 작성하시려면 로그인이 필요합니다.

퍼블리셔팁

1,282건

퍼블리싱과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
CSS 17-08-23 조회 2,110
CSS 17-08-23 조회 2,130
CSS 17-08-22 조회 1,899
CSS 17-08-22 조회 2,208
CSS 17-08-22 조회 2,647
CSS 17-08-20 조회 2,259
CSS 17-08-20 조회 1,561
CSS 17-08-20 조회 1,784
CSS 17-08-18 조회 1,810
CSS 17-08-18 조회 1,929
CSS 17-08-18 조회 2,251
CSS 17-08-17 조회 2,551
CSS 17-08-17 조회 2,212
CSS 17-08-17 조회 2,184
CSS 17-08-16 조회 2,051
CSS 17-08-16 조회 1,834
CSS 17-08-16 조회 1,824
CSS 17-08-15 조회 2,031
CSS 17-08-15 조회 2,092
CSS 17-08-15 조회 1,914
CSS 17-08-11 조회 1,808
CSS 17-08-11 조회 2,456
CSS 17-08-11 조회 2,574
CSS 17-08-10 조회 1,918
CSS 17-08-10 조회 2,435
CSS 17-08-10 조회 2,235
CSS 17-08-09 조회 2,131
CSS 17-08-09 조회 2,565
CSS 17-08-09 조회 2,116
CSS 17-08-07 조회 2,375