Skip to content

Commit 606936f

Browse files
committed
Neumorphism
1 parent d38731c commit 606936f

File tree

2 files changed

+97
-0
lines changed

2 files changed

+97
-0
lines changed

Css Animations/Neumorphism/index.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<html lang="en">
2+
<head>
3+
<meta charset="UTF-8">
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5+
<link rel="stylesheet" href="./style.css">
6+
<title>Neumorphism Animation</title>
7+
</head>
8+
<body>
9+
<div class="loader">
10+
<div style="--i:0"></div>
11+
<div style="--i:1"></div>
12+
<div style="--i:2"></div>
13+
<div style="--i:3"></div>
14+
<div style="--i:4"></div>
15+
</div>
16+
</body>
17+
</html>

Css Animations/Neumorphism/style.css

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
*
2+
{
3+
margin: 0;
4+
padding:0;
5+
box-sizing: border-box;
6+
}
7+
body
8+
{
9+
display: flex;
10+
justify-content:center;
11+
align-items:center;
12+
background-color:#edf1f4;
13+
min-width: 100vh;
14+
}
15+
.loader
16+
{
17+
display: flex;
18+
flex-direction: row;
19+
}
20+
.loader div
21+
{
22+
position: relative;
23+
width: 40px;
24+
height:200px;
25+
margin: 20px;
26+
overflow: hidden;
27+
border-radius: 40px;
28+
background:linear-gradient(top bottom, rgba(0,0,0,0.05,#edf1f4));
29+
border: 2px solid #edf1f4;
30+
box-shadow: 15px 15px 20px rgba(0,0,0,0.1),
31+
.15px -15px 20px #fff,
32+
inset -5px -5px 5px rgba(255, 255, 255,0.5),
33+
inset 5px 5px 5px rgba(0,0,0,0.05);
34+
}
35+
.loader div::before
36+
{
37+
content:'';
38+
position: absolute;
39+
top:0;
40+
left:0;
41+
width:100%;
42+
height:100%;
43+
z-index: 10;
44+
border-radius: 40px;
45+
box-shadow: 15px 15px 20px rgba(0,0,0,0.1),
46+
.15px -15px 20px #fff,
47+
inset -5px -5px 5px rgba(255, 255, 255,0.5),
48+
inset 5px 5px 5px rgba(0,0,0,0.05);
49+
}
50+
.loader div::after
51+
{
52+
content:'';
53+
position: absolute;
54+
top:0;
55+
left:0;
56+
width:36px;
57+
height:36px;
58+
background:#fff;
59+
border-radius: 50%;
60+
box-shadow: inset -5px -5px 5px rgba(0,0,0,0.2),
61+
0 420px 0 400px #2196f3;
62+
animation: animate 2.5s ease-in-out infinite;
63+
animation-delay: calc(-0.5s*var(--i)) ;
64+
}
65+
@keyframes animate
66+
{
67+
0%
68+
{
69+
transform:translateY(160px);
70+
filter: hue-rotate(180deg);
71+
}
72+
50%
73+
{
74+
transform:translateY(0px);
75+
}
76+
100%
77+
{
78+
transform:translateY(160px);
79+
}
80+
}

0 commit comments

Comments
 (0)