-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
94 lines (82 loc) · 1.52 KB
/
style.css
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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: linear-gradient(135deg, #ff9a9e, #fad0c4);
font-family: 'Arial', sans-serif;
overflow: hidden;
}
.container {
perspective: 1000px;
}
.envelope {
position: relative;
width: 300px;
height: 200px;
cursor: pointer;
transform-style: preserve-3d;
transition: transform 0.5s ease-in-out;
}
.flap {
position: absolute;
width: 0;
height: 0;
border-left: 150px solid transparent;
border-right: 150px solid transparent;
border-bottom: 100px solid #ff6f61;
transform-origin: top;
transition: transform 0.5s ease-in-out;
}
.body {
position: absolute;
bottom: 0;
width: 300px;
height: 100px;
background: #ff6f61;
}
.message {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #fff;
opacity: 0;
transition: opacity 0.5s ease-in-out;
}
.message h1 {
font-size: 24px;
margin-bottom: 10px;
}
.message p {
font-size: 18px;
}
.envelope.open .flap {
transform: rotateX(180deg);
}
.envelope.open .message {
opacity: 1;
}
/* Background Animation */
@keyframes moveBackground {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
body {
background: linear-gradient(-45deg, #ff9a9e, #fad0c4, #fbc2eb, #a6c1ee);
background-size: 400% 400%;
animation: moveBackground 10s ease infinite;
}