Skip to content

Commit 6b55796

Browse files
committed
example
1 parent a001649 commit 6b55796

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
8+
<title>Variables with calc</title>
9+
<style>
10+
div {
11+
background-color: blue;
12+
width: 100%;
13+
height: 50px;
14+
15+
--percentage: 30;
16+
width: calc(var(--percentage) * 1%);
17+
/* width: calc(var(--percentage) * 1rem); */
18+
}
19+
</style>
20+
</head>
21+
22+
<body>
23+
<div></div>
24+
</body>
25+
</html>

0 commit comments

Comments
 (0)