-
Notifications
You must be signed in to change notification settings - Fork 0
/
scale.html
135 lines (113 loc) · 3.33 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CSS scale函数使用</title>
<style>
body {
color: white;
}
h3 {
color: black;
}
.container .scale>div>div {
display: inline-block;
padding: 30px;
background-color: aqua;
/* color: white; */
}
.container .scale>div>.result {
transform: scale(.8, 2);
background-color: red;
}
.container .scale3d {
margin-top: 80px;
}
.container .scale3d>div>div {
display: inline-block;
padding: 30px;
background-color: aqua;
}
.container .scale3d>div>.result {
transform: perspective(300px) scale3d(2, 0.8, 0.4) translateZ(100px);
transform-origin: left;
background-color: red;
margin-left: 60px;
}
.container .scalex>div>div {
display: inline-block;
padding: 30px;
background-color: aqua;
}
.container .scalex>div>.result {
background-color: red;
transform: scaleX(1.6);
transform-origin:left ;
}
.container .scaley>div>div {
display: inline-block;
padding: 30px;
background-color: aqua;
}
.container .scaley>div>.result {
background-color: red;
transform: scaleY(1.6);
transform-origin:left ;
}
.container .scalez {
padding: 40px 0;
}
.container .scalez>div>div {
display: inline-block;
padding: 30px;
background-color: aqua;
}
.container .scalez>div>.result {
background-color: red;
transform: perspective(400px) scaleZ(2) translateZ(-100px);
transform-origin:left ;
}
</style>
</head>
<body>
<div class="container">
<div class="scale">
<h3>scale函数使用</h3>
<div>
<div class="original ">original container</div>
<div class="result">scale(0.8,2) container</div>
</div>
</div>
<div class="scale3d">
<h3>scale3d函数使用</h3>
<div>
<div class="original "> Original Text</div>
<div class="result">scale3d Text</div>
</div>
</div>
<div class="scalex">
<h3>scalex函数使用</h3>
<div>
<div class="original "> Original Text</div>
<div class="result">scalex Text</div>
</div>
</div>
<div class="scaley">
<h3>scaley函数使用</h3>
<div>
<div class="original "> Original Text</div>
<div class="result">scaley Text</div>
</div>
</div>
<div class="scalez">
<h3>scalez函数使用</h3>
<div>
<div class="original "> Original Text</div>
<div class="result">scalez Text</div>
</div>
</div>
</div>
</body>
</html>