-
Notifications
You must be signed in to change notification settings - Fork 0
/
27_transform.html
39 lines (35 loc) · 1.09 KB
/
27_transform.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
35
36
37
38
39
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Transform</title>
<style>
/* transform property applies a 2D or 3D transformation to an element. This property allows you to
rotate, scale, move, skew, etc., elements */
body {
display: flex;
align-items: center;
justify-content: center;
background: #4f4f4f;
color: #f4f4f4;
height: 100vh;
}
.box {
width: 300px;
height: 300px;
background: #f4f4f4;
/* defines a transformation that rotates an element around a fixed point on the 2D plane, without deforming it. */
transform: rotate(25deg);
/* skews an element on the 2D plane */
transform: skew(25deg);
/* t resizes an element on the 2D plane. Because the amount of scaling is defined by a vector, it can resize the horizontal and vertical dimensions at different scales */
transform: scale(1);
}
</style>
</head>
<body>
<div class="box">
</div>
</body>
</html>