-
Notifications
You must be signed in to change notification settings - Fork 0
/
exercise-4-solution.html
63 lines (58 loc) · 1.56 KB
/
exercise-4-solution.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Exercise 4</title>
<style>
#square {
width: 300px;
height: 300px;
border: 1px solid black;
margin: 100px auto;
background-image: conic-gradient(#26547C 135deg, #EF476F 135deg, #EF476F 225deg, #FFD166 225deg);
position: relative;
perspective: 300px;
}
.first,
.second,
.third {
position: absolute;
font-family: sans-serif;
top: 33%;
left: 0;
right: 50%;
margin: auto;
width: max-content;
height: max-content;
font-size: 2em;
color: #26547C;
font-weight: bold;
transform-origin: right center;
transform: rotateY(60deg) scale(1.5, 1);
}
.second {
right: 0;
left: 50%;
color: #FFD166;
transform-origin: left;
transform: rotateY(-60deg) scale(1.5, 1);
}
.third {
right: 0;
bottom: 0;
top: 50%;
color: white;
transform-origin: bottom;
transform: rotateX(-50deg) scale(1, 3) translateY(20px);
}
</style>
</head>
<body>
<div id="square">
<div class="first">Code</div>
<div class="second">and</div>
<div class="third">Coffee</div>
</div>
</body>
</html>