-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathCSSAnimationCard.css
More file actions
209 lines (208 loc) · 3.82 KB
/
CSSAnimationCard.css
File metadata and controls
209 lines (208 loc) · 3.82 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
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
@import url('https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,900');
*
{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body
{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #333;
}
.card
{
position: relative;
width: 350px;
height: 190px;
background: #333;
transition: 0.5s;
}
.card:hover
{
height: 450px;
}
.card .lines
{
position: absolute;
inset: 0;
background: #000;
overflow: hidden;
}
.card .lines::before
{
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 600px;
height: 120px;
background: linear-gradient(transparent, #45f3ff, #45f3ff, #45f3ff,transparent);
animation: animate 4s linear infinite;
}
@keyframes animate
{
0%
{
transform: translate(-50%, -50%) rotate(0deg);
}
100%
{
transform: translate(-50%, -50%) rotate(360deg);
}
}
.card .lines::after
{
content: '';
position: absolute;
inset: 3px;
background: #333;
}
.card .imgBx
{
position: absolute;
top: -50px;
left: 50%;
transform: translate(-50%);
width: 150px;
height: 150px;
background: #000;
transition: 0.5s;
z-index: 10;
overflow: hidden;
}
.card:hover .imgBx
{
width: 250px;
height: 250px;
}
.card .imgBx::before
{
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 500px;
height: 150px;
transform: translate(-50%, -50%);
background: linear-gradient(transparent, #ff3c7b, #ff3c7b, #ff3c7b,transparent);
animation: animate2 6s linear infinite;
}
@keyframes animate2
{
0%
{
transform: translate(-50%, -50%) rotate(360deg);
}
100%
{
transform: translate(-50%, -50%) rotate(0deg);
}
}
.card .imgBx::after
{
content: '';
position: absolute;
inset: 3px;
background: #292929;
}
.card .imgBx img
{
position: absolute;
top: 10px;
left: 10px;
z-index: 1;
width: calc(100% - 20px);
height: calc(100% - 20px);
filter: grayscale(1);
}
.card .imgBx img:hover
{
transition: 2s;
filter: grayscale(0);
}
.card .content
{
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: flex-end;
overflow: hidden;
}
.card .content .details
{
padding: 40px;
text-align: center;
width: 100%;
transition: 0.5s;
transform: translateY(145px);
}
.card:hover .content .details
{
transform: translateY(0px);
}
.card .content .details h2
{
font-size: 1.25em;
color: #45f3ff;
line-height: 1.2em;
}
.card .content .details h2 span
{
font-size: 0.75em;
font-weight: 500;
color: #fff;
}
.card .content .details .data
{
display: flex;
justify-content: space-between;
margin: 20px 0;
}
.card .content .details .data h3
{
font-size: 1em;
color: #45f3ff;
line-height: 1.2em;
font-weight: 600;
}
.card .content .details .data h3 span
{
font-size: 0.85em;
font-weight: 400;
color: #fff;
}
.card .content .details .actionBtn
{
display: flex;
justify-content: space-between;
gap: 20px;
}
.card .content .details .actionBtn button
{
padding: 10px 30px;
border: none;
outline: none;
border-radius: 5px;
font-size: 1em;
font-weight: 500;
background: #45f3ff;
color: #222;
cursor: pointer;
opacity: 0.9;
}
.card .content .details .actionBtn button:nth-child(2)
{
background: #fff;
}
.card .content .details .actionBtn button:hover
{
opacity: 1;
}