September 24, 2016
Modern Google Loader in Pure CSS

Hi, friends in this tutorial I show you modern google loader in pure CSS. Modern google loader animating through four colors. Using keyframes the animation works. So based on first-child & nth-child we creating animation. The transform is used to changing position and div tags are useful to show the four colors, Using this we going to create the loader.
index.html
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 |
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>Google Loading</title> <!-- Google Fonts --> <link href='https://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'> <style> body{ background-color:#FFF; } h1{ font-family:'Montserrat', sans-serif; font-size: 4em; text-align:center; letter-spacing: -10px; font-weight: lighter; } h1 span:first-child{ color:#4285f4; } h1 span:nth-child(2){ color: #db4437; } h1 span:nth-child(3){ color:#f4b400; } h1 span:nth-child(4){ color:#4285f4; } h1 span:nth-child(5){ color:#0f9d58; } h1 span:nth-child(6){ color: #db4437; -ms-transform: rotate(-20deg); -webkit-transform:rotate(-20deg); transform:rotate(-20deg); display: inline-block; } .loading{ display: block; width: 122px; margin: 100px auto; } div{ height: 20px; width:20px; position:absolute; border-radius:50%; background: #000; display: inline-block; } div:first-child{ animation: move 1s ease-in-out infinite alternate; background: #4285f4; margin-left: 0; } div:nth-child(2){ animation: move 1s ease-in-out -0.25s infinite alternate; margin-left: 35px; background:#db4437; } div:nth-child(3){ animation: move 1s ease-in-out -0.5s infinite alternate; margin-left: 70px; background:#f4b400; } div:nth-child(4){ animation: move 1s ease-in-out -0.75s infinite alternate; margin-left: 105px; background:#0f9d58; } @-moz-keyframes move{ 0%{ transform: translateY(-10px); } 100%{ transform: translateY(5px); } } @-webkit-keyframes move{ 0%{ transform: translateY(-10px); } 100%{ transform: translateY(5px); } } @-o-keyframes move{ 0%{ transform: translateY(-10px); } 100%{ transform: translateY(5px); } } @keyframes move{ 0%{ transform: translateY(-10px); } 100%{ transform: translateY(5px); } } </style> </head> <body> <h1> <span>G</span> <span>o</span> <span>o</span> <span>g</span> <span>l</span> <span>e</span> </h1> <span class="loading"> <div></div> <div></div> <div></div> <div></div> </span> </body> </html> |
Download
Mraj
Creative Designer & Developer specialist by the spirit and a loving blogger by thoughts. If you have any questions let me drop an email with the article name to the following email id: [email protected]