-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday79.html
More file actions
141 lines (125 loc) · 3.75 KB
/
day79.html
File metadata and controls
141 lines (125 loc) · 3.75 KB
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
136
137
138
139
140
141
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DAY 79 | CSS CHALLENGE</title>
<style>
*,
*::after,
*::before {
padding: 0;
margin: 0;
box-sizing: border-box;
}
main {
display: grid;
place-items: center;
min-height: 100vh;
background-color: #0fc5ea;
}
.fruit {
position: relative;
width: 100px;
height: 200px;
padding: 0 0 3px;
border: solid #0000;
border-width: 0 5px;
background:
radial-gradient(farthest-side, #e5e4e7 98%, #0000) 100% 22%/10% 5% border-box,
radial-gradient(farthest-side, #e5e4e7 98%, #0000) 0 22%/10% 5% border-box,
linear-gradient(#e5e4e7 0 0) 0 22%/100% 5%,
radial-gradient(farthest-side at bottom, #bdd5d7 98%, #0000) top/100% 25%,
linear-gradient(86deg, #e0e4e4 47%, #0000 51%) left bottom/20% 75%,
linear-gradient(-86deg, #e0e4e4 47%, #0000 51%) right bottom/20% 75%,
radial-gradient(farthest-side, #fff3 98%, #0000) 76% 73%/6% 3%,
radial-gradient(farthest-side, #fff3 98%, #0000) 36% 81%/8% 4%,
radial-gradient(farthest-side, #fff3 98%, #0000) 56% 40%/10% 5%,
radial-gradient(farthest-side, #fff3 98%, #0000) 25% 51%/8% 4%,
radial-gradient(farthest-side, #fff3 98%, #0000) 73% 56%/10% 5%,
radial-gradient(farthest-side, #0003 98%, #0000) 34% 91%/6% 3%,
radial-gradient(farthest-side, #0003 98%, #0000) 66% 85%/6% 3%,
radial-gradient(farthest-side, #0003 98%, #0000) 49% 73%/8% 4%,
radial-gradient(farthest-side, #0003 98%, #0000) 76% 34%/12% 6%,
radial-gradient(farthest-side, #0003 98%, #0000) 27% 64%/8% 4%,
radial-gradient(farthest-side, #0003 98%, #0000) 48% 49%/10% 5%,
radial-gradient(farthest-side, #0003 98%, #0000) 24% 37%/12% 6%,
linear-gradient(90deg, #0000 20%, #fff3) bottom/100% 75%,
linear-gradient(var(--c, currentColor) 0 0)bottom/100% 75% content-box,
linear-gradient(#e0e4e4 0 0)bottom/100% 75%;
background-repeat: no-repeat;
clip-path: polygon(0 -100%, 100% -100%, 100% 26%, 96% 26%, 84% 101%, 200% 101%, 200% 125%, -100% 125%, -100% 101%, 16% 101%, 4% 26%, 0 26%);
animation: fruit-b 5s infinite;
}
.fruit:before {
content: "";
position: absolute;
z-index: -1;
top: -20%;
width: 10px;
background: repeating-linear-gradient(45deg, #fff 0 8px, #f7485d 0 16px);
bottom: 74.5%;
left: calc(50% - 5px);
mix-blend-mode: overlay;
transform-origin: bottom;
transform: rotate(10deg);
}
.fruit:after {
content: "ORANGE\A BLUEBERRY\A BANANAS\A KIWI\A STRAWBERRY";
color: #fff;
text-align: center;
position: absolute;
white-space: pre;
font-size: 30px;
font-weight: bold;
font-family: monospace;
top: 105%;
left: 50%;
line-height: 30px;
animation: fruit-a 5s steps(5) infinite;
}
@keyframes fruit-a {
0% {
transform: translate(-50%, 0);
clip-path: inset(0 0 calc(100% - 30px));
}
100% {
transform: translate(-50%, -100%);
clip-path: inset(100% 0 -30px);
}
}
@keyframes fruit-b {
0%,
20% {
color: #faca44;
--c: #faca44
}
20.1%,
40% {
color: #8f73da;
--c: #8f73da
}
40.1%,
60% {
color: #fbf4a2;
--c: #fbf4a2
}
60.1%,
80% {
color: #96b233;
--c: #96b233
}
80.1%,
100% {
color: #f63758;
--c: #f63758
}
}
</style>
</head>
<body>
<main>
<div class="fruit"></div>
</main>
</body>
</html>