In this post, we will be creating a website preloader in Html and CSS languages. Website preloader is used when it requires some time to load all the objects on the page. After loading all the components on the page it shows the screen and ends the loading process. In the last post, we developed a Top 13 Neumorphic Design. Let’s start creating a preloader for the website.
Why website Preloader?
Website preloader is used when users want to access the website. Sometimes due to page size or internet connection, all the objects do not load. During object loading, it provides a bad image of the website. For avoiding the negative effect on the user’s mind, we use a preloader on the website. It starts loading until all the components load correctly. After loading it shows the screen of the website to the user. Now our task is to create a loader for our website and we have multiple preloaders which are given below.
Snowball Website Preloader:
As you can see in the image we have a beautiful circular loader for the website. This loader is created using Html and CSS languages. It has certain unique features. The circular motion of this loader is the same as other loaders but the design is unique. This design of the loader makes it unique from others.
Design:
The design has three basic things to understand. They are moving balls, circles, and backgrounds.
If you check the background then it looks like a white background. But actually, this is an image of the snow which is placed as a background image for creating a snow effect.
Then it has a ball that is moving in a circle. This ball can be of different types. You can create a round object and then style it using CSS and make it a white ball with a shadow effect. Otherwise, the second option is to download a white round object image and then import that image into the code. After that rotate that image in the circle. The round object is moving in a circle without breaking. It is due to using 360-degree rotation and an infinite loop of rotation.
Then we have the path of the loader. When the ball rotates in a circular motion then it leaves a path of its motion. That path has a neuromorphic design effect. It is the alternative to the white color and it makes the design really awesome.
Let’s discuss how to develop this type of loader using only Html and CSS.
You might be interested in it:
How to create a Snowball website preloader in Html and CSS?
For creating the snowball pre_loader in Html and CSS we will some steps. These steps will be followed in all the given designs which are given below as well.
- Download a code editor
- Html source code
- CSS source code
- Download source code
In three steps you will be able to complete your project. Otherwise, the fourth step is followed when you don’t want to follow the first three steps.
Html source code
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 |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Snow Preloader - FantacyDesigns </title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="pl"> <div class="pl__outer-ring"></div> <div class="pl__inner-ring"></div> <div class="pl__track-cover"></div> <div class="pl__ball"> <div class="pl__ball-texture"></div> <div class="pl__ball-outer-shadow"></div> <div class="pl__ball-inner-shadow"></div> <div class="pl__ball-side-shadows"></div> </div> </div> <script> </script> </body> </html> |
CSS Source code
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 |
* { border: 0; box-sizing: border-box; margin: 0; padding: 0; } :root { font-size: calc(16px + (20 - 16) * (100vw - 320px) / (1280 - 320)); } body { background-color: hsl(223, 90%, 95%); font: 1em/1.5 sans-serif; height: 100vh; display: grid; place-items: center; } .pl, .pl__ball, .pl__ball-inner-shadow, .pl__ball-side-shadows, .pl__ball-texture, .pl__inner-ring, .pl__outer-ring, .pl__track-cover { border-radius: 50%; } .pl { position: relative; width: 16em; height: 16em; } .pl__ball, .pl__ball-inner-shadow, .pl__ball-outer-shadow, .pl__ball-side-shadows, .pl__ball-texture, .pl__ball-texture:before, .pl__inner-ring, .pl__outer-ring, .pl__track-cover { position: absolute; } .pl__ball, .pl__ball-inner-shadow, .pl__ball-outer-shadow, .pl__ball-texture:before, .pl__track-cover { animation: ball 3s linear infinite; } .pl__ball { top: calc(50% - 1.25em); left: calc(50% - 1.25em); transform: rotate(0) translateY(-6.5em); width: 2.5em; height: 2.5em; } .pl__ball-inner-shadow { animation-name: ballInnerShadow; box-shadow: 0 0.1em 0.2em hsla(0, 0%, 0%, 0.3), 0 0 0.2em hsla(0, 0%, 0%, 0.1) inset, 0 -1em 0.5em hsla(0, 0%, 0%, 0.15) inset; width: 100%; height: 100%; } .pl__ball-outer-shadow { animation-name: ballOuterShadow; background-image: linear-gradient(hsla(0, 0%, 0%, 0.15),hsla(0, 0%, 0%, 0)); border-radius: 0 0 50% 50% / 0 0 100% 100%; filter: blur(2px); top: 50%; left: 0; width: 100%; height: 250%; transform: rotate(20deg); transform-origin: 50% 0; z-index: -2; } .pl__ball-side-shadows { background-color: hsla(0, 0%, 0%, 0.1); filter: blur(2px); width: 100%; height: 100%; transform: scale(0.75,1.1); z-index: -1; } .pl__ball-texture { overflow: hidden; width: 100%; height: 100%; transform: translate3d(0,0,0); } .pl__ball-texture:before { animation-name: ballTexture; animation-duration: 0.25s; background: url(https://assets.codepen.io/416221/snow.jpg) 0 0 / 50% 100%; content: ""; display: block; filter: brightness(1.05); top: 0; right: 0; width: 200%; height: 100%; } .pl__inner-ring { box-shadow: 0 -0.25em 0.5em hsla(0, 0%, 100%, 0.4), 0 0.5em 0.75em hsla(0, 0%, 100%, 0.4) inset, 0 0.5em 0.375em hsla(0, 0%, 0%, 0.15), 0 -0.5em 0.75em hsla(0, 0%, 0%, 0.15) inset; top: 2.375em; left: 2.375em; width: calc(100% - 4.75em); height: calc(100% - 4.75em); } .pl__outer-ring { box-shadow: 0 -0.45em 0.375em hsla(0, 0%, 0%, 0.15), 0 0.5em 0.75em hsla(0, 0%, 0%, 0.15) inset, 0 0.25em 0.5em hsla(0, 0%, 100%, 0.4), 0 -0.5em 0.75em hsla(0, 0%, 100%, 0.4) inset; top: 0.75em; left: 0.75em; width: calc(100% - 1.5em); height: calc(100% - 1.5em); } .pl__track-cover { animation-name: trackCover; background-image: conic-gradient(hsla(223, 90%, 95%, 1) 210deg, hsla(223, 90%, 95%, 0) 270deg); top: 0; left: 0; width: 100%; height: 100%; } /* Animations */ @keyframes ball { from { transform: rotate(0) translateY(-6.5em); } 50% { transform: rotate(180deg) translateY(-6em); } to { transform: rotate(360deg) translateY(-6.5em); } } @keyframes ballInnerShadow { from { transform: rotate(0); } to { transform: rotate(-360deg); } } @keyframes ballOuterShadow { from { transform: rotate(20deg); } to { transform: rotate(-340deg); } } @keyframes ballTexture { from { transform: translateX(0); } to { transform: translateX(50%); } } @keyframes trackCover { from { transform: rotate(0); } to { transform: rotate(360deg); } } |
Download source code
The source code is below.
Download Source CodeClick to DownloadSmiley Website Preloader:
Now you can check in the preloader image that we have a beautiful preloader that is using smiley as an animation. It takes some lines of code to design this effect. After learning about the concept of this design and coding, the result will be ready for you.
Design and development process:
We have used two languages for the structure, design, and animation of this preloader design. In this smiley, we have three objects and a background of it.
By using HTML we have created three objects of this smiley. They are identified with classes and ids.
Then the main part is to add CSS to that objects. The three objects are different from each other. For the first object, we created a round circle with a proper thickness, shape, and color. That is moving in a round circle and splits after covering 180 degrees. When covers below 180 degrees then it remains for some time. After that, the eye shows and their process is below.
Then we created two round balls for eyes. Their animation time is set after completing the round 180 degrees. They are hidden when the circle is moving. After circle rotation, they start showing on the screen, and in this way, it shows an emoji. It creates a smiley emoji effect in Html and CSS. Now, let us see how we created this website preloader in the form of smiley emoji.
How to create a smiley preloader?
The development process is the same as the above preloader but the code will be different for this preloader.
Html source code
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 |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Similey Preloader - FantacyDesigns </title> <link rel="stylesheet" href="style.css"> </head> <body> <svg role="img" aria-label="Mouth and eyes come from 9:00 and rotate clockwise into position, right eye blinks, then all parts rotate and merge into 3:00" class="smiley" viewBox="0 0 128 128" width="128px" height="128px"> <defs> <clipPath id="smiley-eyes"> <circle class="smiley__eye1" cx="64" cy="64" r="8" transform="rotate(-40,64,64) translate(0,-56)" /> <circle class="smiley__eye2" cx="64" cy="64" r="8" transform="rotate(40,64,64) translate(0,-56)" /> </clipPath> <linearGradient id="smiley-grad" x1="0" y1="0" x2="0" y2="1"> <stop offset="0%" stop-color="#000" /> <stop offset="100%" stop-color="#fff" /> </linearGradient> <mask id="smiley-mask"> <rect x="0" y="0" width="128" height="128" fill="url(#smiley-grad)" /> </mask> </defs> <g stroke-linecap="round" stroke-width="12" stroke-dasharray="175.93 351.86"> <g> <rect fill="hsl(193,90%,50%)" width="128" height="64" clip-path="url(#smiley-eyes)" /> <g fill="none" stroke="hsl(193,90%,50%)"> <circle class="smiley__mouth1" cx="64" cy="64" r="56" transform="rotate(180,64,64)" /> <circle class="smiley__mouth2" cx="64" cy="64" r="56" transform="rotate(0,64,64)" /> </g> </g> <g mask="url(#smiley-mask)"> <rect fill="hsl(223,90%,50%)" width="128" height="64" clip-path="url(#smiley-eyes)" /> <g fill="none" stroke="hsl(223,90%,50%)"> <circle class="smiley__mouth1" cx="64" cy="64" r="56" transform="rotate(180,64,64)" /> <circle class="smiley__mouth2" cx="64" cy="64" r="56" transform="rotate(0,64,64)" /> </g> </g> </g> </svg> <script> </script> </body> </html> |
CSS Source code
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 |
* { border: 0; box-sizing: border-box; margin: 0; padding: 0; } :root { --hue: 223; --bg: hsl(var(--hue),90%,90%); --fg: hsl(var(--hue),90%,10%); --trans-dur: 0.3s; font-size: calc(16px + (20 - 16) * (100vw - 320px) / (1280 - 320)); } body { background-image: linear-gradient(to right top, #121f3d, #142547, #142c51, #14335b, #123a66); color: var(--fg); font: 1em/1.5 sans-serif; height: 100vh; display: grid; place-items: center; transition: background-color var(--trans-dur), color var(--trans-dur); } .smiley { width: 9em; height: 9em; } .smiley__eye1, .smiley__eye2, .smiley__mouth1, .smiley__mouth2 { animation: eye1 3s ease-in-out infinite; } .smiley__eye1, .smiley__eye2 { transform-origin: 64px 64px; } .smiley__eye2 { animation-name: eye2; } .smiley__mouth1 { animation-name: mouth1; } .smiley__mouth2 { animation-name: mouth2; visibility: hidden; } /* Dark theme */ @media (prefers-color-scheme: dark) { :root { --bg: hsl(var(--hue),90%,10%); --fg: hsl(var(--hue),90%,90%); } } /* Animations */ @keyframes eye1 { from { transform: rotate(-260deg) translate(0,-56px); } 50%, 60% { animation-timing-function: cubic-bezier(0.17,0,0.58,1); transform: rotate(-40deg) translate(0,-56px) scale(1); } to { transform: rotate(225deg) translate(0,-56px) scale(0.35); } } @keyframes eye2 { from { transform: rotate(-260deg) translate(0,-56px); } 50% { transform: rotate(40deg) translate(0,-56px) rotate(-40deg) scale(1); } 52.5% { transform: rotate(40deg) translate(0,-56px) rotate(-40deg) scale(1,0); } 55%, 70% { animation-timing-function: cubic-bezier(0,0,0.28,1); transform: rotate(40deg) translate(0,-56px) rotate(-40deg) scale(1); } to { transform: rotate(150deg) translate(0,-56px) scale(0.4); } } @keyframes eyeBlink { from, 25%, 75%, to { transform: scaleY(1); } 50% { transform: scaleY(0); } } @keyframes mouth1 { from { animation-timing-function: ease-in; stroke-dasharray: 0 351.86; stroke-dashoffset: 0; } 25% { animation-timing-function: ease-out; stroke-dasharray: 175.93 351.86; stroke-dashoffset: 0; } 50% { animation-timing-function: steps(1,start); stroke-dasharray: 175.93 351.86; stroke-dashoffset: -175.93; visibility: visible; } 75%, to { visibility: hidden; } } @keyframes mouth2 { from { animation-timing-function: steps(1,end); visibility: hidden; } 50% { animation-timing-function: ease-in-out; visibility: visible; stroke-dashoffset: 0; } to { stroke-dashoffset: -351.86; } } |
Download source code
Download Source CodeClick to DownloadPure CSS Circle Website Preloaders:
The preloaders are mentioned in the image and you can check these preloaders as well. These preloaders are different from the above loaders. They are different because these loaders are lightweight and simple.
It’s difficult to mention the development process of all these loaders because we have 6 loaders and they are different from each other. We have taken 6 different <div> and then created their class or ID.
After that, we applied CSS on these <div> elements and started creating a pre-loader for the website. The function of all these is the same but the design is different and you can use anyone on your website. The starting and ending times of the loaders are different and it is according to the animations of the loader.
So, if you want to create this type of loader as well then check the below code. The below code will help you to understand their development and coding as well.
How to create a Pure CSS Circle Loader?
It’s easy to build this type of pre-loaders for the website in Html and CSS. Follow the below code and create these loaders for your website easily.
Html source code
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 |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CSS Circle Loader - FantacyDesigns </title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="wrapper"> <header class="header"> <h1>CSS Circle Loader</h1> <p>by <a href="https://fantacydesigns.com" title="FantacyDesigns" target="_blank"><b>FantacyDesigns(Web)</b></a></p> </header> <ul class="loader-list"> <li> <!-- Loader 1--> <div class="loader-1 center"><span></span></div> </li> <li> <!-- Loader 2 --> <div class="loader-2 center"><span></span></div> </li> <li> <!-- Loader 3 --> <div class="loader-3 center"><span></span></div> </li> <li> <!-- Loader 4 --> <div class="loader-4 center"><span></span></div> </li> <li> <!-- Loader 5 --> <div class="loader-5 center"><span></span></div> </li> <li> <!-- Loader 6 --> <div class="loader-6 center"><span></span></div> </li> </ul> </div> <script> </script> </body> </html> |
CSS Source code
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 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
*, ::after, ::before { -webkit-box-sizing: border-box; box-sizing: border-box; } html { width: 100%; height: 100%; font-size: 62.5%; } body { width: 100%; height: 100%; background-image: linear-gradient(to right top, #3d1229, #380c2a, #32072c, #2a042e, #210030); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } p{ color: aliceblue; } /* Loader 1 */ .loader-1 { height: 32px; width: 32px; -webkit-animation: loader-1-1 4.8s linear infinite; animation: loader-1-1 4.8s linear infinite; } @-webkit-keyframes loader-1-1 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes loader-1-1 { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .loader-1 span { display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 32px; width: 32px; clip: rect(0, 32px, 32px, 16px); -webkit-animation: loader-1-2 1.2s linear infinite; animation: loader-1-2 1.2s linear infinite; } @-webkit-keyframes loader-1-2 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(220deg); } } @keyframes loader-1-2 { 0% { transform: rotate(0deg); } 100% { transform: rotate(220deg); } } .loader-1 span::after { content: ""; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 32px; width: 32px; clip: rect(0, 32px, 32px, 16px); border: 3px solid #FFF; border-radius: 50%; -webkit-animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-1-3 1.2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-1-3 { 0% { -webkit-transform: rotate(-140deg); } 50% { -webkit-transform: rotate(-160deg); } 100% { -webkit-transform: rotate(140deg); } } @keyframes loader-1-3 { 0% { transform: rotate(-140deg); } 50% { transform: rotate(-160deg); } 100% { transform: rotate(140deg); } } /* Loader 2 */ .loader-2 { display: block; height: 32px; width: 32px; -webkit-animation: loader-2-1 3s linear infinite; animation: loader-2-1 3s linear infinite; } @-webkit-keyframes loader-2-1 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes loader-2-1 { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .loader-2 span { display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 32px; width: 32px; clip: rect(16px, 32px, 32px, 0); -webkit-animation: loader-2-2 1.5s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-2-2 1.5s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-2-2 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes loader-2-2 { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .loader-2 span::before { content: ""; display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 32px; width: 32px; border: 3px solid transparent; border-top: 3px solid #FFF; border-radius: 50%; -webkit-animation: loader-2-3 1.5s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-2-3 1.5s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-2-3 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes loader-2-3 { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .loader-2 span::after { content: ""; display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 32px; width: 32px; border: 3px solid rgba(255, 255, 255, .5); border-radius: 50%; } /* Loader 3 */ .loader-3 { display: block; height: 32px; width: 32px; } .loader-3 span { display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 32px; width: 32px; } .loader-3 span::before { content: ""; display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 32px; width: 32px; border: 3px solid #FFF; border-bottom: 3px solid transparent; border-radius: 50%; -webkit-animation: loader-3-1 1.5s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-3-1 1.5s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-3-1 { 0% { -webkit-transform: rotate(0deg); } 40% { -webkit-transform: rotate(180deg); } 60% { -webkit-transform: rotate(180deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes loader-3-1 { 0% { transform: rotate(0deg); } 40% { transform: rotate(180deg); } 60% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } } .loader-3 span::after { content: ""; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; width: 6px; height: 6px; background: #FFF; border-radius: 50%; -webkit-animation: loader-3-2 1.5s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-3-2 1.5s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-3-2 { 0% { -webkit-transform: translate3d(0, -32px, 0) scale(0, 2); opacity: 0; } 50% { -webkit-transform: translate3d(0, 0, 0) scale(1.25, 1.25); opacity: 1; } 100% { -webkit-transform: translate3d(0, 8px, 0) scale(0, 0); opacity: 0; } } @keyframes loader-3-2 { 0% { transform: translate3d(0, -32px, 0) scale(0, 2); opacity: 0; } 50% { transform: translate3d(0, 0, 0) scale(1.25, 1.25); opacity: 1; } 100% { transform: translate3d(0, 8px, 0) scale(0, 0); opacity: 0; } } /* Loader 4 */ .loader-4 { height: 32px; width: 32px; } .loader-4::after { content: ""; display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; width: 12px; height: 12px; top: 0; left: 0; bottom: 0; right: 0; margin: auto; background: #FFF; border-radius: 50%; -webkit-animation: loader-4-1 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-4-1 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-4-1 { 0% { -webkit-transform: scale(0); opacity: 0; } 50% { -webkit-transform: scale(1); opacity: 1; } 100% { -webkit-transform: scale(0); opacity: 0; } } @keyframes loader-4-1 { 0% { transform: scale(0); opacity: 0; } 50% { transform: scale(1); opacity: 1; } 100% { transform: scale(0); opacity: 0; } } .loader-4 span { display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 32px; width: 32px; -webkit-animation: loader-4-2 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-4-2 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-4-2 { 0% { -webkit-transform: rotate(0deg); } 50% { -webkit-transform: rotate(180deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes loader-4-2 { 0% { transform: rotate(0deg); } 50% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } } .loader-4 span::before, .loader-4 span::after { content: ""; display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 12px; width: 12px; background: #FFF; border-radius: 50%; -webkit-animation: loader-4-3 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-4-3 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-4-3 { 0% { -webkit-transform: translate3d(0, 0, 0) scale(1); } 50% { -webkit-transform: translate3d(-16px, 0, 0) scale(.5); } 100% { -webkit-transform: translate3d(0, 0, 0) scale(1); } } @keyframes loader-4-3 { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-16px, 0, 0) scale(.5); } 100% { transform: translate3d(0, 0, 0) scale(1); } } .loader-4 span::after { -webkit-animation: loader-4-4 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-4-4 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-4-4 { 0% { -webkit-transform: translate3d(0, 0, 0) scale(1); } 50% { -webkit-transform: translate3d(16px, 0, 0) scale(.5); } 100% { -webkit-transform: translate3d(0, 0, 0) scale(1); } } @keyframes loader-4-4 { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(16px, 0, 0) scale(.5); } 100% { transform: translate3d(0, 0, 0) scale(1); } } /* Loader 5 */ .loader-5 { height: 32px; width: 32px; -webkit-animation: loader-5-1 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-5-1 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-5-1 { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes loader-5-1 { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .loader-5::before { content: ""; display: block; position: absolute; top: 0; left: 0; bottom: 0; right: auto; margin: auto; width: 8px; height: 8px; background: #FFF; border-radius: 50%; -webkit-animation: loader-5-2 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-5-2 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-5-2 { 0% { -webkit-transform: translate3d(0, 0, 0) scale(1); } 50% { -webkit-transform: translate3d(24px, 0, 0) scale(.5); } 100% { -webkit-transform: translate3d(0, 0, 0) scale(1); } } @keyframes loader-5-2 { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(24px, 0, 0) scale(.5); } 100% { transform: translate3d(0, 0, 0) scale(1); } } .loader-5::after { content: ""; display: block; position: absolute; top: 0; left: auto; bottom: 0; right: 0; margin: auto; width: 8px; height: 8px; background: #FFF; border-radius: 50%; -webkit-animation: loader-5-3 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-5-3 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-5-3 { 0% { -webkit-transform: translate3d(0, 0, 0) scale(1); } 50% { -webkit-transform: translate3d(-24px, 0, 0) scale(.5); } 100% { -webkit-transform: translate3d(0, 0, 0) scale(1); } } @keyframes loader-5-3 { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-24px, 0, 0) scale(.5); } 100% { transform: translate3d(0, 0, 0) scale(1); } } .loader-5 span { display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 32px; width: 32px; } .loader-5 span::before { content: ""; display: block; position: absolute; top: 0; left: 0; bottom: auto; right: 0; margin: auto; width: 8px; height: 8px; background: #FFF; border-radius: 50%; -webkit-animation: loader-5-4 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-5-4 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-5-4 { 0% { -webkit-transform: translate3d(0, 0, 0) scale(1); } 50% { -webkit-transform: translate3d(0, 24px, 0) scale(.5); } 100% { -webkit-transform: translate3d(0, 0, 0) scale(1); } } @keyframes loader-5-4 { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(0, 24px, 0) scale(.5); } 100% { transform: translate3d(0, 0, 0) scale(1); } } .loader-5 span::after { content: ""; display: block; position: absolute; top: auto; left: 0; bottom: 0; right: 0; margin: auto; width: 8px; height: 8px; background: #FFF; border-radius: 50%; -webkit-animation: loader-5-5 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; animation: loader-5-5 2s cubic-bezier(0.770, 0.000, 0.175, 1.000) infinite; } @-webkit-keyframes loader-5-5 { 0% { -webkit-transform: translate3d(0, 0, 0) scale(1); } 50% { -webkit-transform: translate3d(0, -24px, 0) scale(.5); } 100% { -webkit-transform: translate3d(0, 0, 0) scale(1); } } @keyframes loader-5-5 { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(0, -24px, 0) scale(.5); } 100% { transform: translate3d(0, 0, 0) scale(1); } } /* Loader 6 */ .loader-6 { height: 32px; width: 32px; } .loader-6 span { display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 32px; width: 32px; } .loader-6 span::before, .loader-6 span::after { content: ""; display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; height: 32px; width: 32px; border: 2px solid #FFF; border-radius: 50%; opacity: 0; -webkit-animation: loader-6-1 1.5s cubic-bezier(0.075, 0.820, 0.165, 1.000) infinite; animation: loader-6-1 1.5s cubic-bezier(0.075, 0.820, 0.165, 1.000) infinite; } @-webkit-keyframes loader-6-1 { 0% { -webkit-transform: translate3d(0, 0, 0) scale(0); opacity: 1; } 100% { -webkit-transform: translate3d(0, 0, 0) scale(1.5); opacity: 0; } } @keyframes loader-6-1 { 0% { transform: translate3d(0, 0, 0) scale(0); opacity: 1; } 100% { transform: translate3d(0, 0, 0) scale(1.5); opacity: 0; } } .loader-6 span::after { -webkit-animation: loader-6-2 1.5s cubic-bezier(0.075, 0.820, 0.165, 1.000) .25s infinite; animation: loader-6-2 1.5s cubic-bezier(0.075, 0.820, 0.165, 1.000) .25s infinite; } @-webkit-keyframes loader-6-2 { 0% { -webkit-transform: translate3d(0, 0, 0) scale(0); opacity: 1; } 100% { -webkit-transform: translate3d(0, 0, 0) scale(1); opacity: 0; } } @keyframes loader-6-2 { 0% { transform: translate3d(0, 0, 0) scale(0); opacity: 1; } 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0; } } /* Layout */ .center { display: block; position: absolute; top: 0; left: 0; bottom: 0; right: 0; margin: auto; } .wrapper { position: relative; width: 100%; max-width: 1000px; height: 100%; margin: 0 auto; } .wrapper .header { text-align: center; position: absolute; top: 10%; left: 0; bottom: auto; right: 0; margin: auto; letter-spacing: 0.15em; z-index: 1; } .wrapper .header h1 { display: inline-block; height: 1em; color: #FFF; font-size: 4vh; font-family: "Poppins", sans-serif; font-weight: 700; line-height: 1; } .wrapper .header p { margin-top: 10px; color: #FFF; font-size: 1.3rem; font-family: "Poppins", sans-serif; font-weight: 400; letter-spacing: 0.065em; opacity: .5; } .wrapper .header p a { color: #FFF; text-decoration: none; } .loader-list { display: -webkit-flex; display: flex; -webkit-flex-flow: row wrap; flex-flow: row wrap; -webkit-justify-content: center; justify-content: center; -webkit-align-items: center; align-items: center; -webkit-align-content: center; align-content: center; position: relative; width: 100%; height: 100%; clear: both; } .loader-list li { -webkit-flex: 1 1 auto; flex: 1 1 auto; position: relative; display: block; width: calc(100% / 3); height: calc(100vh / 4); } |
Download source code
Download Source CodeClick to DownloadTask:
In the end, I am assigning you some tasks related to the development of these loaders. Take an emoji or icon of emoji. Then place that emoji at the center of the page and it should be responsive across all devices. Rotate that emoji in a circle and the starting and time of the loader to 4 seconds. After that, it should automatically restart again. It will be done with a loop infinite value.