forked from easysIT/doit_HTML-CSS-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscale.html
More file actions
47 lines (47 loc) · 965 Bytes
/
scale.html
File metadata and controls
47 lines (47 loc) · 965 Bytes
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
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>Transform:scale</title>
<style>
#container{
width: 600px;
margin: 20px auto;
}
.origin {
width: 100px;
height: 100px;
border: 1px solid black;
float: left;
margin: 40px;
}
.origin > div {
width: 100px;
height: 100px;
background-color: orange;
}
#scalex:hover{
transform: scaleX(2); /* x축으로(가로) 2배 확대 */
}
#scaley:hover{
transform: scaleY(1.5); /* y축으로(세로) 2배 확대 */
}
#scale:hover{
transform: scale(0.7); /* x, y축으로(가로, 세로) 0.7배 확대 */
}
</style>
</head>
<body>
<div id="container">
<div class="origin">
<div id="scalex"></div>
</div>
<div class="origin">
<div id="scaley"></div>
</div>
<div class="origin">
<div id="scale"></div>
</div>
</div>
</body>
</html>