Skip to content

Commit 6dec463

Browse files
added glare hover animation (#3280)
* added Glare-Hover-Animation * added Glare-Hover Animation
1 parent 272fade commit 6dec463

3 files changed

Lines changed: 84 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Glare Hover</title>
7+
<link rel="stylesheet" href="styles.css">
8+
</head>
9+
<body>
10+
<div class="glare-container">
11+
<div class="glare-card">
12+
<div class="shine"></div>
13+
</div>
14+
</div>
15+
</body>
16+
</html>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"artName": "Glare Hover",
3+
"githubHandle": "rajatrsrivastav"
4+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
box-sizing: border-box;
5+
}
6+
7+
body {
8+
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
9+
height: 100vh;
10+
display: flex;
11+
justify-content: center;
12+
align-items: center;
13+
overflow: hidden;
14+
}
15+
16+
.glare-container {
17+
perspective: 1000px;
18+
}
19+
20+
.glare-card {
21+
position: relative;
22+
width: 300px;
23+
height: 400px;
24+
background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
25+
border-radius: 20px;
26+
overflow: hidden;
27+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
28+
animation: cardFloat 6s ease-in-out infinite;
29+
}
30+
31+
.shine {
32+
position: absolute;
33+
top: -50%;
34+
left: -50%;
35+
width: 200%;
36+
height: 200%;
37+
background: linear-gradient(
38+
45deg,
39+
transparent 30%,
40+
rgba(255, 255, 255, 0.1) 40%,
41+
rgba(255, 255, 255, 0.6) 50%,
42+
rgba(255, 255, 255, 0.1) 60%,
43+
transparent 70%
44+
);
45+
animation: glareMove 3s linear infinite;
46+
}
47+
48+
@keyframes cardFloat {
49+
0%, 100% {
50+
transform: translateY(0) rotateY(-5deg) rotateX(5deg);
51+
}
52+
50% {
53+
transform: translateY(-20px) rotateY(5deg) rotateX(-5deg);
54+
}
55+
}
56+
57+
@keyframes glareMove {
58+
0% {
59+
transform: translateX(-100%) translateY(-100%) rotate(45deg);
60+
}
61+
100% {
62+
transform: translateX(100%) translateY(100%) rotate(45deg);
63+
}
64+
}

0 commit comments

Comments
 (0)