Skip to content

Commit 8cfec30

Browse files
committed
fixed loading animation
1 parent 77c906e commit 8cfec30

File tree

2 files changed

+56
-37
lines changed

2 files changed

+56
-37
lines changed

css/main.css

Lines changed: 54 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -53,51 +53,71 @@ a:focus {
5353
}
5454

5555
.js .loading::after {
56-
content: 'Pluto a planet?';
57-
font-size: 1.625em;
56+
content: '';
57+
font-size: .62em;
5858
font-weight: 500;
59-
line-height: 1.5;
59+
line-height: 3.8em;
60+
letter-spacing: .62em;
6061
margin: 0;
6162
padding: 0.5em 0;
62-
letter-spacing: 1.62em;
6363
text-transform: uppercase;
64+
text-align: center;
6465

6566
position: fixed;
6667
z-index: 1001;
6768
top: 50%;
6869
left: 50%;
69-
display: flex;
70-
flex-direction: column;
71-
text-align: center;
72-
align-content: space-around;
73-
width: 62vw;
74-
height: 62vw;
75-
margin: -31vw 0 0 -31vw;
70+
width: 100px;
71+
height: 100px;
72+
margin: -50px 0 0 -50px;
7673
border-radius: 50%;
7774
pointer-events: none;
78-
background: #3F51B5;
79-
/*animation: loaderAnim 4s ease-out infinite alternate forwards;*/
80-
animation-name: loaderAnim;
81-
animation-duration: 3s;
82-
animation-iteration-count: infinite;
83-
animation-direction: alternate;
84-
animation-timing-function: ease-in-out;
85-
animation-fill-mode: both;
75+
animation: loaderAnim 4s ease-in-out infinite normal forwards;
8676
}
8777

8878
@keyframes loaderAnim {
89-
to {
90-
transform: scale3d(0.5,0.5,1);
91-
background-color:#7670bd;
92-
letter-spacing: 1em;
93-
}
94-
/*
95-
0% {background-color:#366bbd; left:25%; top:25%;}
96-
25% {background-color:#3d8fbd; left:75%; top:25%;}
97-
50% {background-color:#6a7dbd; left:75%; top:75%;}
98-
75% {background-color:#585abc; left:25%; top:75%;}
99-
100% {background-color:#7670bd; left:25%; top:25%;}
100-
*/
79+
80+
0% {
81+
border-radius:5% 5% 5% 5%;
82+
transform:rotate(0deg);
83+
background: #3f51b5;
84+
}
85+
12% {
86+
border-radius:50% 5% 5% 5%;
87+
transform:rotate(45deg);
88+
}
89+
25% {
90+
border-radius:50% 50% 5% 5%;
91+
transform:rotate(90deg);
92+
background: #2196f3;
93+
}
94+
37% {
95+
border-radius:50% 50% 50% 5%;
96+
transform:rotate(135deg);
97+
}
98+
50% {
99+
border-radius:50%;
100+
transform:rotate(180deg);
101+
background: #03a9f4;
102+
}
103+
62% {
104+
border-radius:5% 50% 50% 50%;
105+
transform:rotate(225deg);
106+
}
107+
75% {
108+
border-radius: 5% 5% 50% 50%;
109+
transform:rotate(270deg);
110+
background: #2196f3;
111+
}
112+
87% {
113+
border-radius:5% 5% 5% 50%;
114+
transform:rotate(315deg);
115+
}
116+
100% {
117+
border-radius:5% 5% 5% 5%;
118+
transform:rotate(360deg);
119+
background: #3f51b5;
120+
}
101121
}
102122

103123
main {
@@ -119,7 +139,7 @@ main {
119139
}
120140

121141
/* Header */
122-
.codrops-header {
142+
.header {
123143
position: relative;
124144
display: flex;
125145
flex-direction: column;
@@ -128,7 +148,7 @@ main {
128148
padding: 5vw;
129149
}
130150

131-
.codrops-header__title {
151+
.header__title {
132152
font-size: 1.625em;
133153
font-weight: 500;
134154
line-height: 1.5;
@@ -251,7 +271,7 @@ main {
251271
}
252272

253273
@media screen and (max-width: 40em) {
254-
.codrops-header__title {
274+
.header__title {
255275
font-size: 1em;
256276
}
257277
.content--grid {

index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@
5353

5454
<main>
5555
<div class="content content--grid">
56-
<header class="codrops-header">
57-
<h1 class="codrops-header__title">meredith hoo</h1>
58-
<p class="codrops-header__subtitle">i'm really cool</p>
56+
<header class="header">
57+
<h1 class="header__title">meredith hoo</h1>
5958
</header>
6059

6160
<div class="item item--style-1" data-animation-path-duration="800" data-animation-path-easing="easeInOutCubic" data-path-elasticity="300" data-morph-path="M 189,80.37 C 232.6,46.67 352.5,67.06 350.9,124.1 349.5,173.4 311.7,168 312.4,248.1 312.9,301.1 382.5,319.2 368.5,379.1 349.4,460.6 137.7,467.5 117.6,386.3 98.68,309.7 171.5,292.2 183.6,240.1 195.7,188.2 123.8,130.7 189,80.37 Z" data-path-scaleX="0.8" data-path-scaleY="1.1" data-path-translateX="0" data-path-translateY="30" data-path-rotate="5" data-animation-image-duration="800" data-animation-image-easing="easeInOutQuart" data-image-elasticity="300" data-image-scaleX="1.2" data-image-scaleY="1.2" data-image-translateX="-20" data-image-translateY="-45" data-image-rotate="-5" data-animation-deco-duration="1300" data-animation-deco-easing="easeOutQuad" data-deco-elasticity="300" data-deco-scaleX="0.8" data-deco-scaleY="0.9" data-deco-translateX="-5" data-deco-translateY="-5" data-deco-rotate="2">

0 commit comments

Comments
 (0)