CSS3 Loading Animation

Size
5,219 Kb
Views
52,624

How do I make an css3 loading animation?

What is a css3 loading animation? How do you make a css3 loading animation? This script and codes were developed by Rıza Selçuk Saydam on 02 August 2022, Tuesday.

CSS3 Loading Animation Previews

CSS3 Loading Animation - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS3 Loading Animation</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ /*------------------------------------*\ $VARIABLES
\*------------------------------------*/
/*------------------------------------*\ $Box
\*------------------------------------*/
*, *:after, *:before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; padding: 0; margin: 0;
}
/*------------------------------------*\ $MIXINS
\*------------------------------------*/
/*------------------------------------*\ $REST
\*------------------------------------*/
body { background-color: #ede9df; font-size: 14px;
}
ul.loading { position: absolute; left: 50%; top: 50%; height: 300px; width: 400px; margin-left: -200px; margin-top: -150px; text-align: center;
}
ul.loading li { width: 2em; height: 2em; display: inline-block; border-radius: 100%; list-style: none; position: relative; margin: 10em -0.27em 0 0; -webkit-box-reflect: below 3em -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(25%, rgba(255, 255, 255, 0.025)), color-stop(75%, rgba(255, 255, 255, 0.025)), to(transparent));
}
ul li:nth-child(7n+1) { background: #385c78; background: -moz-linear-gradient(left, #385c78 0%, #315774 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #385c78), color-stop(100%, #315774)); background: -webkit-linear-gradient(left, #385c78 0%, #315774 100%); background: -o-linear-gradient(left, #385c78 0%, #315774 100%); background: -ms-linear-gradient(left, #385c78 0%, #315774 100%); background: linear-gradient(to right, #385c78 0%, #315774 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
ul li:nth-child(7n+2) { background: #315774; background: -moz-linear-gradient(left, #315774 0%, #4a5369 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #315774), color-stop(100%, #4a5369)); background: -webkit-linear-gradient(left, #315774 0%, #4a5369 100%); background: -o-linear-gradient(left, #315774 0%, #4a5369 100%); background: -ms-linear-gradient(left, #315774 0%, #4a5369 100%); background: linear-gradient(to right, #315774 0%, #4a5369 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
ul li:nth-child(7n+3) { background: #4a5369; background: -moz-linear-gradient(left, #4a5369 0%, #6b4d59 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #4a5369), color-stop(100%, #6b4d59)); background: -webkit-linear-gradient(left, #4a5369 0%, #6b4d59 100%); background: -o-linear-gradient(left, #4a5369 0%, #6b4d59 100%); background: -ms-linear-gradient(left, #4a5369 0%, #6b4d59 100%); background: linear-gradient(to right, #4a5369 0%, #6b4d59 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
ul li:nth-child(7n+4) { background: #6b4d59; background: -moz-linear-gradient(left, #6b4d59 0%, #9c4543 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #6b4d59), color-stop(100%, #9c4543)); background: -webkit-linear-gradient(left, #6b4d59 0%, #9c4543 100%); background: -o-linear-gradient(left, #6b4d59 0%, #9c4543 100%); background: -ms-linear-gradient(left, #6b4d59 0%, #9c4543 100%); background: linear-gradient(to right, #6b4d59 0%, #9c4543 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
ul li:nth-child(7n+5) { background: #9c4543; background: -moz-linear-gradient(left, #9c4543 0%, #bb4034 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #9c4543), color-stop(100%, #bb4034)); background: -webkit-linear-gradient(left, #9c4543 0%, #bb4034 100%); background: -o-linear-gradient(left, #9c4543 0%, #bb4034 100%); background: -ms-linear-gradient(left, #9c4543 0%, #bb4034 100%); background: linear-gradient(to right, #9c4543 0%, #bb4034 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
ul li:nth-child(7n+6) { background: #bb4034; background: -moz-linear-gradient(left, #bb4034 0%, #da3b26 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #bb4034), color-stop(100%, #da3b26)); background: -webkit-linear-gradient(left, #bb4034 0%, #da3b26 100%); background: -o-linear-gradient(left, #bb4034 0%, #da3b26 100%); background: -ms-linear-gradient(left, #bb4034 0%, #da3b26 100%); background: linear-gradient(to right, #bb4034 0%, #da3b26 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
ul li:nth-child(7n+7) { background: #da3b26; background: -moz-linear-gradient(left, #da3b26 0%, #da3b26 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #da3b26), color-stop(100%, #da3b26)); background: -webkit-linear-gradient(left, #da3b26 0%, #da3b26 100%); background: -o-linear-gradient(left, #da3b26 0%, #da3b26 100%); background: -ms-linear-gradient(left, #da3b26 0%, #da3b26 100%); background: linear-gradient(to right, #da3b26 0%, #da3b26 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
/*------------------------------------*\ $ANIMATIONS
\*------------------------------------*/
ul li:first-child { -webkit-animation: firstBall 1.2s infinite; -webkit-transition-timing-function: linear;
}
ul li:last-child { -webkit-animation: lastBall 1.2s infinite 0.6s; -webkit-transition-timing-function: linear;
}
@-webkit-keyframes firstBall { 0% { -webkit-transform: translateX(0%) rotate(0); -webkit-transform-origin: 100% 100%; } 23% { -webkit-transform-origin: 25% -75%; -webkit-transform: rotate(180deg) translateX(100%); } 47% { -webkit-transform: translateX(-6%) rotate(0); -webkit-transform-origin: 100% 100%; } 48% { -webkit-transform: translateX(4%); } 49% { -webkit-transform: translateX(-2%); } 50% { -webkit-transform: translateX(0%); } 100% { -webkit-transform: translateX(0%) rotate(0); -webkit-transform-origin: 100% 100%; }
}
@-webkit-keyframes lastBall { 0% { -webkit-transform: translateX(0) rotate(0); -webkit-transform-origin: 100% 100%; } 23% { -webkit-transform-origin: 25% -75%; -webkit-transform: rotate(-180deg) translateX(-100%); } 47% { -webkit-transform: translateX(6%) rotate(0); -webkit-transform-origin: 100% 100%; } 48% { -webkit-transform: translateX(-4%); } 49% { -webkit-transform: translateX(2%); } 50% { -webkit-transform: translateX(0%); } 100% { -webkit-transform: translateX(0%) rotate(0); -webkit-transform-origin: 100% 100%; }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <ul class='loading'> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li> <li></li>
</ul> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

CSS3 Loading Animation - Script Codes CSS Codes

/*------------------------------------*\ $VARIABLES
\*------------------------------------*/
/*------------------------------------*\ $Box
\*------------------------------------*/
*, *:after, *:before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; padding: 0; margin: 0;
}
/*------------------------------------*\ $MIXINS
\*------------------------------------*/
/*------------------------------------*\ $REST
\*------------------------------------*/
body { background-color: #ede9df; font-size: 14px;
}
ul.loading { position: absolute; left: 50%; top: 50%; height: 300px; width: 400px; margin-left: -200px; margin-top: -150px; text-align: center;
}
ul.loading li { width: 2em; height: 2em; display: inline-block; border-radius: 100%; list-style: none; position: relative; margin: 10em -0.27em 0 0; -webkit-box-reflect: below 3em -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(25%, rgba(255, 255, 255, 0.025)), color-stop(75%, rgba(255, 255, 255, 0.025)), to(transparent));
}
ul li:nth-child(7n+1) { background: #385c78; background: -moz-linear-gradient(left, #385c78 0%, #315774 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #385c78), color-stop(100%, #315774)); background: -webkit-linear-gradient(left, #385c78 0%, #315774 100%); background: -o-linear-gradient(left, #385c78 0%, #315774 100%); background: -ms-linear-gradient(left, #385c78 0%, #315774 100%); background: linear-gradient(to right, #385c78 0%, #315774 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
ul li:nth-child(7n+2) { background: #315774; background: -moz-linear-gradient(left, #315774 0%, #4a5369 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #315774), color-stop(100%, #4a5369)); background: -webkit-linear-gradient(left, #315774 0%, #4a5369 100%); background: -o-linear-gradient(left, #315774 0%, #4a5369 100%); background: -ms-linear-gradient(left, #315774 0%, #4a5369 100%); background: linear-gradient(to right, #315774 0%, #4a5369 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
ul li:nth-child(7n+3) { background: #4a5369; background: -moz-linear-gradient(left, #4a5369 0%, #6b4d59 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #4a5369), color-stop(100%, #6b4d59)); background: -webkit-linear-gradient(left, #4a5369 0%, #6b4d59 100%); background: -o-linear-gradient(left, #4a5369 0%, #6b4d59 100%); background: -ms-linear-gradient(left, #4a5369 0%, #6b4d59 100%); background: linear-gradient(to right, #4a5369 0%, #6b4d59 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
ul li:nth-child(7n+4) { background: #6b4d59; background: -moz-linear-gradient(left, #6b4d59 0%, #9c4543 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #6b4d59), color-stop(100%, #9c4543)); background: -webkit-linear-gradient(left, #6b4d59 0%, #9c4543 100%); background: -o-linear-gradient(left, #6b4d59 0%, #9c4543 100%); background: -ms-linear-gradient(left, #6b4d59 0%, #9c4543 100%); background: linear-gradient(to right, #6b4d59 0%, #9c4543 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
ul li:nth-child(7n+5) { background: #9c4543; background: -moz-linear-gradient(left, #9c4543 0%, #bb4034 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #9c4543), color-stop(100%, #bb4034)); background: -webkit-linear-gradient(left, #9c4543 0%, #bb4034 100%); background: -o-linear-gradient(left, #9c4543 0%, #bb4034 100%); background: -ms-linear-gradient(left, #9c4543 0%, #bb4034 100%); background: linear-gradient(to right, #9c4543 0%, #bb4034 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
ul li:nth-child(7n+6) { background: #bb4034; background: -moz-linear-gradient(left, #bb4034 0%, #da3b26 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #bb4034), color-stop(100%, #da3b26)); background: -webkit-linear-gradient(left, #bb4034 0%, #da3b26 100%); background: -o-linear-gradient(left, #bb4034 0%, #da3b26 100%); background: -ms-linear-gradient(left, #bb4034 0%, #da3b26 100%); background: linear-gradient(to right, #bb4034 0%, #da3b26 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
ul li:nth-child(7n+7) { background: #da3b26; background: -moz-linear-gradient(left, #da3b26 0%, #da3b26 100%); background: -webkit-gradient(linear, left top, right top, color-stop(0%, #da3b26), color-stop(100%, #da3b26)); background: -webkit-linear-gradient(left, #da3b26 0%, #da3b26 100%); background: -o-linear-gradient(left, #da3b26 0%, #da3b26 100%); background: -ms-linear-gradient(left, #da3b26 0%, #da3b26 100%); background: linear-gradient(to right, #da3b26 0%, #da3b26 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$firstColor', endColorstr='$secondColor',GradientType=1 );
}
/*------------------------------------*\ $ANIMATIONS
\*------------------------------------*/
ul li:first-child { -webkit-animation: firstBall 1.2s infinite; -webkit-transition-timing-function: linear;
}
ul li:last-child { -webkit-animation: lastBall 1.2s infinite 0.6s; -webkit-transition-timing-function: linear;
}
@-webkit-keyframes firstBall { 0% { -webkit-transform: translateX(0%) rotate(0); -webkit-transform-origin: 100% 100%; } 23% { -webkit-transform-origin: 25% -75%; -webkit-transform: rotate(180deg) translateX(100%); } 47% { -webkit-transform: translateX(-6%) rotate(0); -webkit-transform-origin: 100% 100%; } 48% { -webkit-transform: translateX(4%); } 49% { -webkit-transform: translateX(-2%); } 50% { -webkit-transform: translateX(0%); } 100% { -webkit-transform: translateX(0%) rotate(0); -webkit-transform-origin: 100% 100%; }
}
@-webkit-keyframes lastBall { 0% { -webkit-transform: translateX(0) rotate(0); -webkit-transform-origin: 100% 100%; } 23% { -webkit-transform-origin: 25% -75%; -webkit-transform: rotate(-180deg) translateX(-100%); } 47% { -webkit-transform: translateX(6%) rotate(0); -webkit-transform-origin: 100% 100%; } 48% { -webkit-transform: translateX(-4%); } 49% { -webkit-transform: translateX(2%); } 50% { -webkit-transform: translateX(0%); } 100% { -webkit-transform: translateX(0%) rotate(0); -webkit-transform-origin: 100% 100%; }
}

CSS3 Loading Animation - Script Codes JS Codes

/***
CSS3 Loading Animation
Design: Jordi Verdu http://drbl.in/gSwF
Front-End: Rıza Selçuk Saydam http:/webmagazin.co
***/
CSS3 Loading Animation - Script Codes
CSS3 Loading Animation - Script Codes
Home Page Home
Developer Rıza Selçuk Saydam
Username rss
Uploaded August 02, 2022
Rating 3.5
Size 5,219 Kb
Views 52,624
Do you need developer help for CSS3 Loading Animation?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Rıza Selçuk Saydam (rss) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!