Skip to content

Commit 5287bf9

Browse files
committed
css variables
1 parent 258479e commit 5287bf9

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Variables Examples</title>
8+
<style>
9+
body {
10+
display: grid;
11+
place-items: center;
12+
margin-top: 50px;
13+
gap: 20px;
14+
border: 0;
15+
outline: none;
16+
}
17+
.btn {
18+
background-color: #f14e0d;
19+
width: 130px;
20+
height: 50px;
21+
transform: scale(var(--scale, 1.2)) rotate(var(--rotate, 10deg));
22+
}
23+
.big {
24+
--scale: 2;
25+
}
26+
.tilted {
27+
margin: 40px;
28+
--rotate: 130deg;
29+
}
30+
</style>
31+
</head>
32+
<body>
33+
<button class="btn"></button>
34+
<button class="btn big"></button>
35+
<button class="btn tilted"></button>
36+
<button class="btn big tilted"></button>
37+
</body>
38+
</html>

0 commit comments

Comments
 (0)