-
Notifications
You must be signed in to change notification settings - Fork 0
/
layout.html
228 lines (225 loc) · 4.61 KB
/
layout.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!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>Glassmorphism</title>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400&display=swap"
rel="stylesheet"
/>
</head>
<style>
html,
body {
font-family: "Poppins", sans-serif;
margin: 0;
width: 100%;
/* background: #48426d; */
/* fallback for old browsers */
/* background: -webkit-linear-gradient(
to bottom,
#b8eff3,
#0b4b66
); */
background-image: url(http://bit.ly/2gPLxZ4);
background-repeat: no-repeat;
background-size: cover;
/* Chrome 10-25, Safari 5.1-6 */
/* background: linear-gradient(
to bottom,
#b8eff3,
#0b4b66
); */
/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
h1 {
font-size: 50px;
font-weight: 400;
margin: 10px 0;
text-transform: uppercase;
}
h3 {
font-size: 20px;
font-weight: 300;
}
@media screen and (max-width: 700px) {
h1 {
font-size: 30px;
}
h3 {
font-size: 15px;
}
.glass {
width: 90% !important;
}
.info {
width: 40% !important;
}
.image {
width: 50% !important;
}
button {
padding: 5px !important;
}
}
@keyframes fadeinLeft {
0% {
transform: translateX(-200%);
}
100% {
transform: translateX(0);
}
}
@keyframes fadeinRight {
0% {
transform: translateX(200%);
}
100% {
transform: translateX(0);
}
}
.wrap {
width: 100%;
height: 100%;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}
.glass {
position: relative;
color: #ecf0f1;
border-radius: 4px;
padding: 20px;
background: rgba(139, 243, 144, 0.1);
border: solid 2px rgba(87, 240, 73, 0.3);
background-clip: padding-box;
backdrop-filter: blur(4px);
display: flex;
margin: 10px;
justify-content: space-between;
align-items: center;
width: 40%;
}
.glass:nth-child(even) {
animation: fadeinRight 1s;
}
.glass:nth-child(odd) {
animation: fadeinLeft 1s;
}
button {
position: relative;
display: inline-block;
padding: 10px;
color: #ecf0f1;
border-radius: 2px;
background: rgba(255, 255, 255, 0.3);
border: solid 2px rgba(255, 255, 255, 0.4);
background-clip: padding-box;
backdrop-filter: blur(40px);
}
.info {
width: 50%;
}
.image {
width: 45%;
}
.container {
width: 30rem;
height: 20rem;
box-shadow: 0 0 1rem 0 rgba(0, 0, 0, 0.2);
border-radius: 5px;
background-color: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(10px);
margin: 50px 50px;
}
</style>
<body>
<div class="wrap">
<div class="glass">
<div class="info">
<h1>Mercury</h1>
<h3>Fastest planet</h3>
<button>View More</button>
</div>
<img class="image" src="mercury.png" />
</div>
<div class="glass">
<div class="info">
<h1>Venus</h1>
<h3>Hottest planet</h3>
<div>
<button>View More</button>
</div>
</div>
<img class="image" src="venus.png" />
</div>
<div class="glass">
<div class="info">
<h1>Earth</h1>
<h3>Blue planet</h3>
<div>
<button>View More</button>
</div>
</div>
<img class="image" src="earth.png" />
</div>
<div class="glass">
<div class="info">
<h1>Mars</h1>
<h3>Rocky planet</h3>
<div>
<button>View More</button>
</div>
</div>
<img class="image" src="mars.png" />
</div>
<div class="glass">
<div class="info">
<h1>Jupiter</h1>
<h3>Biggest planet</h3>
<div>
<button>View More</button>
</div>
</div>
<img class="image" src="jupiter.png" />
</div>
<div class="glass">
<div class="info">
<h1>Saturn</h1>
<h3>Ringed planet</h3>
<div>
<button>View More</button>
</div>
</div>
<img class="image" src="saturn.png" />
</div>
<div class="glass">
<div class="info">
<h1>Uranus</h1>
<h3>Ice planet</h3>
<div>
<button>View More</button>
</div>
</div>
<img class="image" src="uranus.png" />
</div>
<div class="glass">
<div class="info">
<h1>Neptune</h1>
<h3>Gassy planet</h3>
<div>
<button>View More</button>
</div>
</div>
<img class="image" src="neptune.png" />
</div>
</div>
<div class="container"></div>
</body>
</html>