-
Notifications
You must be signed in to change notification settings - Fork 141
/
Copy pathBirthday-card.css
177 lines (152 loc) · 2.84 KB
/
Birthday-card.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
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
body {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
background-color: #073b4c;
}
.birthdayCard {
position: relative;
width: 250px;
height: 350px;
cursor: pointer;
transform-style: preserve-3d;
transform: perspective(2500px);
transition: 1s;
}
.cardFront {
position: relative;
background-color: #fff;
width: 250px;
height: 350px;
overflow: hidden;
transform-origin: left;
box-shadow: inset 100px 20px 100px rgba(0, 0, 0, 0.2),
30px 0 50px rgba(0, 0, 0, 0.4);
transition: 0.6s;
}
.happy {
font-family: Tahoma, sans-serif;
text-align: center;
margin: 30px;
background-image: linear-gradient(120deg, #f6d365 0%, #fda085 100%);
transition: 0.1s;
border-radius: 3px;
}
.balloons {
position: absolute;
}
.balloonOne,
.balloonTwo,
.balloonThree,
.balloonFour {
position: absolute;
width: 85px;
height: 95px;
border-radius: 50%;
}
.balloonOne {
background-color: rgb(239, 71, 111, 0.7);
left: -10px;
top: 50px;
}
.balloonTwo {
background-color: rgb(6, 214, 160, 0.7);
left: 50px;
top: 20px;
}
.balloonThree {
background-color: rgb(255, 209, 102, 0.7);
left: 110px;
top: 50px;
}
.balloonFour {
background-color: rgb(17, 138, 178, 0.7);
left: 170px;
top: 20px;
}
.balloonOne:before,
.balloonTwo:before,
.balloonThree:before,
.balloonFour:before {
content: "";
position: absolute;
width: 1px;
height: 155px;
background-color: #ffd166;
top: 95px;
left: 43px;
}
.balloonOne:after,
.balloonTwo:after,
.balloonThree:after,
.balloonFour:after {
content: "";
position: absolute;
border-right: 7px solid transparent;
border-left: 7px solid transparent;
top: 94px;
left: 37px;
}
.balloonOne:after {
border-bottom: 10px solid #ef476f;
}
.balloonTwo:after {
border-bottom: 10px solid #06d6a0;
}
.balloonThree:after {
border-bottom: 10px solid #ffd166;
}
.balloonFour:after {
border-bottom: 10px solid #118ab2;
}
/* Transition of Inside card */
.cardInside {
position: absolute;
background-color: #fff;
width: 250px;
height: 350px;
z-index: -1;
left: 0;
top: 0;
box-shadow: inset 100px 20px 100px rgba(0, 0, 0, 0.2);
}
p {
font-family: "Brush Script MT", cursive;
margin: 10px;
color: #333;
}
.pDear {
position: absolute;
left: 1.5px;
top: 60px;
}
p.pMain {
margin-top: 45px;
}
.name {
position: absolute;
left: 175px;
top: 310px;
color: #333;
}
.back {
font-family: Tahoma, sans-serif;
color: #333;
text-align: center;
margin: 30px;
outline-color: #333;
outline-style: dotted;
}
/* CSS Transtion Starts From here */
.birthdayCard:hover {
transform: perspective(2500px) rotate(5deg);
box-shadow: inset 100px 20px 100px rgba(0, 0, 0, 0.2),
0 10px 100px rgba(0, 0, 0, 0.5);
}
.birthdayCard:hover .cardFront {
transform: rotateY(-160deg);
}
.birthdayCard:hover .happy {
visibility: hidden;
}