transform : scale - 요소 크기변경



html)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" 
          content="width=device-width, height=device-height, 
                     minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0">
    <title>Insert title here</title>
    <style>
    img {
        width: 200px;
        height: 200px;
        
        /* 
        scale : 크기변경
        transform : scale(x,y) x,y축의 크기를 변경한다
        transform : scale3d(x,y,z) x,y,z축의 크기를 변경한다
        transform : scaleX(x) x축의 크기를 변경한다
        transform : scaleY(y) y축의 크기를 변경한다
        transform : scaleZ(z) z축의 크기를 변경한다
         */
        -webkit-transform : scale(2,2);
        -moz-transform : scale(2,2);
        -ms-transform : scale(2,2);
        -o-transform : scale(2,2);
        transform : scale(2,2);
    }
    </style>
</head>
 
<body>
    <img src="images/testimage.jpg" />
</body>
</html>
cs



결과

이미지의 크기가 가로로 2배 세로로 2배 변경된다

+ Recent posts