How To Make Loading Effect Using CSS3

Submitted by: 
Language: 
Visitors have accessed this post 1825 times.

Good Day!!!

In this tutorial, we are going to learn How To Make Loading Effect Using CSS3. Mostly loading effect is created through Flash Software, but now with the power of CSS we can make the effect even if we will not use the Flash Software.

For this project, you can change any color you want for the loading effect. CSS is now powerfull in terms of animation for your project because you can customize it easily.

Directions:

For CSS - Design and Effect

  1. .loading_style span {
  2. display: inline-block;
  3. vertical-align: middle;
  4. width: 10px;
  5. height: 10px;
  6. margin: 50px auto;
  7. background:#ff0000;
  8. border-radius: 5px;
  9. -webkit-animation: loading_style 0.9s infinite alternate;
  10. -moz-animation: loading_style 0.9s infinite alternate;
  11. box-shadow:1px 1px 1px #444444;
  12. }
  13.  
  14. .loading_style span:nth-of-type(2) {
  15. background:#ff0000;
  16. -webkit-animation-delay: 0.2s;
  17. -moz-animation-delay: 0.2s;
  18. }
  19.  
  20. .loading_style span:nth-of-type(3) {
  21. background: #ff0000;
  22. -webkit-animation-delay: 0.4s;
  23. -moz-animation-delay: 0.4s;
  24. }
  25.  
  26. .loading_style span:nth-of-type(4) {
  27. background: #ff0000;
  28. -webkit-animation-delay: 0.6s;
  29. -moz-animation-delay: 0.6s;
  30. }
  31.  
  32. .loading_style span:nth-of-type(5) {
  33. background: #ff0000;
  34. -webkit-animation-delay: 0.8s;
  35. -moz-animation-delay: 0.8s;
  36. }
  37.  
  38. @-webkit-keyframes loading_style {
  39. 0% {
  40. width: 10px;
  41. height: 10px;
  42. -webkit-transform: translateZ(0);
  43. }
  44.  
  45. 100% {
  46. width: 24px;
  47. height: 24px;
  48. -webkit-transform: translateZ(-21px);
  49. }
  50. }
  51.  
  52. @-moz-keyframes loading_style {
  53. 0% {
  54. width: 10px;
  55. height: 10px;
  56. -moz-transform: translateZ(0);
  57. }
  58. 100% {
  59. width: 24px;
  60. height: 24px;
  61. -moz-transform: translateZ(-21px);
  62. }
  63. }

For HTML Code

  1. <tr>
  2. <td>
  3. <div class="loading_style">
  4. <span></span>
  5. <span></span>
  6. <span></span>
  7. <span></span>
  8. <span></span>
  9. </div>
  10. </td>
  11. <td width="50">
  12. </td>
  13. <td>
  14. <div class="loading_style2">
  15. <span></span>
  16. <span></span>
  17. <span></span>
  18. <span></span>
  19. <span></span>
  20. </div>
  21. </td>
  22. <td width="50">
  23. </td>
  24. <td>
  25. <div class="loading_style3">
  26. <span></span>
  27. <span></span>
  28. <span></span>
  29. <span></span>
  30. <span></span>
  31. </div>
  32. </td>
  33. </tr>
  34. </table>

For Source Code

  1. <!DOCTYPE html>
  2. <title>CSS3 Loading Animation</title>
  3. <link rel="stylesheet" type="text/css" href="style.css">
  4. <link rel="stylesheet" type="text/css" href="style2.css">
  5. <link rel="stylesheet" type="text/css" href="style3.css">
  6. <link rel="stylesheet" type="text/css" href="style4.css">
  7. <link rel="stylesheet" type="text/css" href="style5.css">
  8. </head>
  9. <tr>
  10. <td>
  11. <div class="loading_style">
  12. <span></span>
  13. <span></span>
  14. <span></span>
  15. <span></span>
  16. <span></span>
  17. </div>
  18. </td>
  19. <td width="50">
  20. </td>
  21. <td>
  22. <div class="loading_style2">
  23. <span></span>
  24. <span></span>
  25. <span></span>
  26. <span></span>
  27. <span></span>
  28. </div>
  29. </td>
  30. <td width="50">
  31. </td>
  32. <td>
  33. <div class="loading_style3">
  34. <span></span>
  35. <span></span>
  36. <span></span>
  37. <span></span>
  38. <span></span>
  39. </div>
  40. </td>
  41. </tr>
  42. </table>
  43. </body>
  44. </html>

So what can you say about this work? Share your thoughts in the comment section below or email me at [email protected]. Practice Coding. Thank you.


Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.