Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
143 lines (138 loc) · 2.7 KB
/
Copy pathstyle.css
File metadata and controls
143 lines (138 loc) · 2.7 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
142
143
:root
{
--primary: #fff;
--bg-color: rgb(5, 53, 61);
--bg-envelope-color: #f5edd1;
--envelope-tab: #ec6eb3;
--envelope-cover: #e6cfa7;
--shadow-color: rgba(0, 0, 0, 0.2);
--txt-color: #444;
--heart-color: rgb(252, 0, 231);
}
body
{
padding: 0;
margin: 0;
box-sizing: border-box;
background-image:linear-gradient(rgba(0,0,0,0.8),rgba(0,0,0,0.8)), url(images/img1.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
display: flex;
align-items: center;
justify-content: center;
}
.container
{
height: 100vh;
display: grid;
place-items: center;
}
.container > .envelope-wrapper
{
background: pink;
box-shadow: 0 0 40px var(--shadow-color);
}
.container > .envelope-wrapper > .envelope
{
position: relative;
width: 300px;
height: 230px;
}
.envelope-wrapper > .envelope::before
{
content: "";
position: absolute;
top: 0;
z-index: 2;
border-top: 130px solid red;
border-right: 150px solid transparent;
border-left: 150px solid transparent;
transform-origin: top;
transition: all 0.5s ease-in-out 0.7s;
}
.envelope-wrapper > .envelope::after
{
content: "";
position: absolute;
z-index: 2;
width: 0;
height: 0;
border-top: 130px solid transparent;
border-left: 150px solid red;
border-right: 150px solid red;
border-bottom: 100px solid red;
}
.envelope > .letter
{
position: absolute;
right: 20%;
bottom: 0;
width: 54%;
height: 80%;
background: var(--primary);
text-align: center;
transition: all 1s ease-in-out;
padding: 20px 10px;
box-shadow: 0 0 5px var(--shadow-color);
border-radius: 30px;
}
.letter > .text
{
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
font-size: 10px;
color: var(--txt-color);
text-align: left;
}
.heart
{
position: absolute;
top: 50%;
left: 50%;
width: 15px;
height: 15px;
background: white;
z-index: 8;
transform: translate(-50%, 20%) rotate(45deg);
transition: transform 0.5s ease-in-out 1s;
box-shadow: 0 0 10px var(--shadow-color);
cursor: pointer;
}
.heart::before,
.heart::after
{
content: "";
position: absolute;
width: 15px;
height: 15px;
background: white;
border-radius: 50%;
}
.heart::before
{
top: -7.5px;
}
.heart::after
{
right: 7.5px;
}
.flap > .envelope:before
{
transform: rotateX(180deg);
z-index: 0;
}
.flap > .envelope .letter
{
bottom: 100px;
transform: scale(1.5);
transition-delay: 1s;
}
.flap > .heart
{
transform: rotate(90deg);
transition-delay: 0.4s;
}
audio{
position: absolute;
margin-top: 400px;
}