Unable to animate transform: scale and box-shadow simultaneously - html

I need to animate the circle's box-shadow and scale it down to 1 from 1.6x during the same transition period of box-shadow.
The issue I'm facing is the animation of scale is happening after the animation of box-shadow is done.
body {
background-color: #333;
}
.ripple {
width: 20px;
margin: 50px auto;
height: 20px;
background: #ccc;
border-radius: 50%;
animation: rippleeff 2s ease infinite;
}
#keyframes rippleeff {
0% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
transform: scale(1.4);
}
70% {
-moz-box-shadow: 0 0 0 20px rgba(204, 169, 44, 0);
box-shadow: 0 0 0 20px rgba(204, 169, 44, 0);
transform: scale(1.6);
}
100% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
transform: scale(1);
}
}
<div class="ripple">
</div>
Fiddle

When your transform: scale(1.6), your box-shadow become transparent and after that when you going to scale(1) your box-shadow is animating but you can't see it because it's transparent...so change box-shadow color
Also changed scale value in the code...
body {
background-color: #333;
}
.ripple {
width: 20px;
margin: 50px auto;
height: 20px;
background: #ccc;
border-radius: 50%;
animation: rippleeff 2s linear infinite;
}
#keyframes rippleeff {
0% {
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
transform: scale(1);
}
50% {
box-shadow: 0 0 0 20px rgba(204, 169, 44, 0);
transform: scale(1.6);
}
100% {
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
transform: scale(1);
}
}
<div class="ripple">
</div>

Related

Create a constant pulse animation

I'm trying to create a sun with a pulsing animation. However, I'm having trouble with the intervals of the pulse. Two pulses should always be moving with the transition. Also the sun shouldn't be standing without a pulse.
.pulse {
margin: 100px;
display: block;
width: 85px;
height: 85px;
border-radius: 50%;
background: #cca92c;
cursor: pointer;
box-shadow: 0 0 0 rgba(204, 169, 44, 0.4);
animation: pulse 2s infinite;
position: relative;
}
.pulse::before {
content: '';
box-shadow: 0 0 0 rgba(204, 169, 44, 0.4);
animation: pulse2 2.5s infinite;
border-radius: 50%;
width: 85px;
height: 85px;
border-radius: 50%;
display: block;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
.pulse:hover {
animation: none;
}
#-webkit-keyframes pulse {
0% {
-webkit-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
}
70% {
-webkit-box-shadow: 0 0 0 10px rgba(204, 169, 44, 0);
}
100% {
-webkit-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
}
}
#keyframes pulse {
0% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
}
70% {
-moz-box-shadow: 0 0 0 10px rgba(204, 169, 44, 0);
box-shadow: 0 0 0 40px rgba(204, 169, 44, 0);
}
100% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
}
}
#-webkit-keyframes pulse2 {
0% {
-webkit-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
}
70% {
-webkit-box-shadow: 0 0 0 10px rgba(204, 169, 44, 0);
}
100% {
-webkit-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
}
}
#keyframes pulse2 {
0% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
}
70% {
-moz-box-shadow: 0 0 0 10px rgba(204, 169, 44, 0);
box-shadow: 0 0 0 60px rgba(204, 169, 44, 0);
}
100% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
}
}
<div class="nb-infosys-sun">
<span class="pulse"></span>
</div>
This is what I got after adding animation-delay:
.pulse::before {
content: '';
box-shadow: 0 0 0 rgba(204, 169, 44, 0.4);
animation: pulse2 1s infinite;
animation-delay: 0.5s;
border-radius: 50%;
width: 85px;
height: 85px;
border-radius: 50%;
display: block;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
Here is the JSFiddle demo
You can add some animation delay to adjust timing of both pulse as below snippet
.pulse {
margin: 100px;
display: block;
width: 85px;
height: 85px;
border-radius: 50%;
background: #cca92c;
cursor: pointer;
box-shadow: 0 0 0 rgba(204, 169, 44, 0.4);
animation: pulse 2s linear infinite both;
position: relative;
}
.pulse::before {
content: '';
box-shadow: 0 0 0 rgba(204, 169, 44, 0.4);
animation: pulse2 2s linear 1s infinite both;
border-radius: 50%;
width: 85px;
height: 85px;
border-radius: 50%;
display: block;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
}
.pulse:hover {
animation: none;
}
#-webkit-keyframes pulse {
0% {
-webkit-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
}
70% {
-webkit-box-shadow: 0 0 0 10px rgba(204, 169, 44, 0);
}
100% {
-webkit-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
}
}
#keyframes pulse {
0% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
}
70% {
-moz-box-shadow: 0 0 0 10px rgba(204, 169, 44, 0);
box-shadow: 0 0 0 40px rgba(204, 169, 44, 0);
}
100% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
}
}
#-webkit-keyframes pulse2 {
0% {
-webkit-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
}
70% {
-webkit-box-shadow: 0 0 0 10px rgba(204, 169, 44, 0);
}
100% {
-webkit-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
}
}
#keyframes pulse2 {
0% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
}
70% {
-moz-box-shadow: 0 0 0 10px rgba(204, 169, 44, 0);
box-shadow: 0 0 0 60px rgba(204, 169, 44, 0);
}
100% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
}
}
<div class="nb-infosys-sun">
<span class="pulse"></span>
</div>
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Pulse Animation CSS</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="center">
<div class="pulse">code_snail</div>
</div>
</body>
</html>
style.css
body {
margin: 0;
padding: 0;
background: #262626;
}
.center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.pulse {
width: 150px;
height: 150px;
background: rgb(255, 0, 64);
border-radius: 50%;
color: #fff;
font-size: 20px;
text-align: center;
line-height: 150px;
font-family: Verdana, Geneva, Tahoma, sans-serif;
animation: animate 2s linear infinite;
}
#keyframes animate {
0% {
box-shadow: 0 0 0 0 rgba(255, 0, 64, 0.7), 0 0 0 0 rgba(255, 0, 64, 0.7);
}
40% {
box-shadow: 0 0 0 50px rgba(255, 0, 64, 0), 0 0 0 0 rgba(255, 0, 64, 0.7);
}
80% {
box-shadow: 0 0 0 50px rgba(255, 0, 64, 0), 0 0 0 30px rgba(255, 0, 64, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(255, 0, 64, 0), 0 0 0 30px rgba(255, 0, 64, 0);
}
}
Output
codesnail.com

On hover change animation with transition

I need to change the animation with a transition effect. That is change first transition to another with a flow. When I tried for the same the animation changes with a fast change as in below snippet. Is there any way to animate the change in animation. I have tried the below code.
body{
background: url('https://i.pinimg.com/originals/0b/76/08/0b760848c89b9e4abd03f74f19419498.jpg');
}
.bubble{
top: 50px;
left: 80px;
height: 100px;
width: 100px;
color: #000;
box-sizing: border-box;
border-radius: 50%;
box-shadow: 0 5px 15px 0px rgba(0,0,0,0.4);
transform: translatey(0px);
cursor: pointer;
position: absolute;
border: 10px solid rgba(255,255,255,0.2);
animation: float 4s ease-in-out infinite;
}
.bubble span {
font-size: 12px;
line-height: 85px;
position: absolute;
bottom: 0;
top: 0;
right: 0;
left: 0;
text-align: center;
border-radius: 50%;
background: red;
}
.bubble:before {
position: absolute;
content: "";
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
border-radius: 50%;
box-shadow: 0 0 rgba(255, 255, 255, 0.1), 0 0 0 8px rgba(255, 255, 255, 0.1),
0 0 0 16px rgba(255, 255, 255, 0.1), 0 0 0 24px rgba(255, 255, 255, 0.1);
z-index: -1;
animation: ripples 1s linear infinite;
animation-play-state: paused;
opacity: 0;
visibility: hidden;
transition: 0.5s;
transform: scale(0.5);
}
.bubble:hover {
transition: all 2s;
animation: tofixed 4s forwards;
box-shadow: none;
border-color: transparent;
}
.bubble:hover:before {
animation-play-state: running;
opacity: 1;
visibility: visible;
transform: scale(1);
}
#keyframes float {
0% { box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6); transform: translatey(0px) scale(0.9); }
50% { box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2); transform: translatey(-20px) scale(1); }
100% { box-shadow: 0 5px 15px 0px rgba(0,0,0,0.6); transform: translatey(0px) scale(0.9); }
}
#keyframes tofixed {
to { transform: translatey(0px) scale(0.9); }
}
#keyframes ripples {
to {
box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1), 0 0 0 16px rgba(255, 255, 255, 0.1),
0 0 0 24px rgba(255, 255, 255, 0.1), 0 0 0 32px rgba(255, 255, 255, 0);
}
}
<div class="bubble">
<span class="bgviolet">ODOSTORE</span>
</div>
In the above snippet you can see the change in animation is instantly when I hover on it.

Chain/sequence animation in CSS [duplicate]

This question already has answers here:
CSS Animations with delay for each child element
(6 answers)
Closed 5 years ago.
i want my buttons chronologically - the second button start animating after first button ends and so on ...
Could somebody help me achieve that effect ?
a {
padding: 6px;
display: block;
width: 50px;
font-size: 17px;
margin: 10px auto;
border: 2px solid;
text-decoration: none;
box-shadow: 0 0 0 rgba(204,169,44, 0.4);
animation: pulse 2s infinite;
}
#keyframes pulse {
0% {
-moz-box-shadow: 0 0 0 0 rgba(204,169,44, 0.4);
box-shadow: 0 0 0 0 rgba(204,169,44, 0.4);
}
70% {
-moz-box-shadow: 0 0 0 10px rgba(255,208,0, 0.2);
box-shadow: 00 0 0 10px rgba(255,208,0, 0.2);
}
100% {
-moz-box-shadow: 0 0 0 0 rgba(204,169,44, 0);
box-shadow: 0 0 0 0 rgba(204,169,44, 0);
}
}
<a class="btn-100" href="#">100</a>
<a class="btn-500" href="#">500</a>
<a class="btn-1250" href="#">1250</a>
As others have suggested, use animation-delay to offset each element's animation.
In order to loop the entire group, multiply the animation duration by the number of elements and change your keyframes accordingly. Below, I've multiplied the animation duration by three and divided the keyframe percentages by three.
If you have a large number of elements or they are added dynamically, you may want to consider using JavaScript, as mentioned here.
a {
padding: 6px;
display: block;
width: 50px;
font-size: 17px;
margin: 10px auto;
border: 2px solid;
text-decoration: none;
box-shadow: 0 0 0 rgba(204, 169, 44, 0.4);
animation: pulse 6s infinite;
}
.btn-100 {
animation-delay: 0s;
}
.btn-500 {
animation-delay: 2s;
}
.btn-1250 {
animation-delay: 4s;
}
#keyframes pulse {
0% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
}
23.333% {
-moz-box-shadow: 0 0 0 10px rgba(255, 208, 0, 0.2);
box-shadow: 00 0 0 10px rgba(255, 208, 0, 0.2);
}
33.333% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
}
}
<a class="btn-100" href="#">100</a>
<a class="btn-500" href="#">500</a>
<a class="btn-1250" href="#">1250</a>
Just add some animation delay:
.btn-500 {
animation-delay: 0.6s;
}
.btn-1250 {
animation-delay: 1.3s;
}
Demonstration:
a {
padding: 6px;
display: block;
width: 50px;
font-size: 17px;
margin: 10px auto;
border: 2px solid;
text-decoration: none;
box-shadow: 0 0 0 rgba(204, 169, 44, 0.4);
animation: pulse 2s infinite;
}
.btn-500 {
animation-delay: 0.6s;
}
.btn-1250 {
animation-delay: 1.3s;
}
#keyframes pulse {
0% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0.4);
}
70% {
-moz-box-shadow: 0 0 0 10px rgba(255, 208, 0, 0.2);
box-shadow: 00 0 0 10px rgba(255, 208, 0, 0.2);
}
100% {
-moz-box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
box-shadow: 0 0 0 0 rgba(204, 169, 44, 0);
}
}
<a class="btn-100" href="#">100</a>
<a class="btn-500" href="#">500</a>
<a class="btn-1250" href="#">1250</a>
View on jsFiddle

Reverse this css motion blur effect to vertical

I have this code which allows the object to motion blur side to side however I want it to motion blue vertically so it goes from up to down and then back to up. Could you please help me out?
http://jsfiddle.net/db8gr4y6/
#outer {
position: relative;
margin: 10px;
}
#mb {
position: absolute;
left: 0;
font-size: 2em;
font-weight: bold;
padding: 0.2em 1em;
color: #fff;
background-color: #600;
border: 0.2em solid #c00;
border-radius: 8px;
text-shadow: 0 0 5px rgba(255, 255, 255, 0);
box-shadow: 0 0 2px rgba(200, 0, 0, 0);
-webkit-animation: motionblur 4s ease-in-out infinite;
animation: motionblur 4s ease-in-out infinite;
}
#-webkit-keyframes motionblur {
0% {
left: 0;
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
box-shadow: 0 0 0 rgba(200, 0, 0, 0);
}
5% {
left: 0;
-webkit-transform-origin: 0 0;
-webkit-transform: scaleX(0.85);
}
25% {
text-shadow: -5px 0 5px rgba(255, 255, 255, 1);
box-shadow: -15px 0 10px -5px rgba(200, 0, 0, 0.5);
-webkit-transform: scaleX(1.1) skewX(-4deg);
}
50% {
left: 300px;
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
box-shadow: 0 0 0 rgba(200, 0, 0, 0);
-webkit-transform: scaleX(1) skewX(0deg);
}
55% {
left: 300px;
-webkit-transform-origin: 100% 0;
-webkit-transform: scaleX(0.85);
}
75% {
text-shadow: 5px 0 5px rgba(255, 255, 255, 1);
box-shadow: 15px 0 10px -5px rgba(200, 0, 0, 0.5);
-webkit-transform: scaleX(1.1) skewX(4deg);
}
100% {
left: 0px;
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
box-shadow: 0 0 0 rgba(200, 0, 0, 0);
-webkit-transform: scaleX(1) skewX(0deg);
}
}
#keyframes motionblur {
0% {
left: 0;
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
box-shadow: 0 0 0 rgba(200, 0, 0, 0);
}
5% {
left: 0;
transform-origin: 0 0;
transform: scaleX(0.85);
}
25% {
text-shadow: -5px 0 5px rgba(255, 255, 255, 1);
box-shadow: -15px 0 10px -5px rgba(200, 0, 0, 0.5);
transform: scaleX(1.1) skewX(-4deg);
}
50% {
left: 300px;
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
box-shadow: 0 0 0 rgba(200, 0, 0, 0);
transform: scaleX(1) skewX(0deg);
}
55% {
left: 300px;
transform-origin: 100% 0;
transform: scaleX(0.85);
}
75% {
text-shadow: 5px 0 5px rgba(255, 255, 255, 1);
box-shadow: 15px 0 10px -5px rgba(200, 0, 0, 0.5);
transform: scaleX(1.1) skewX(4deg);
}
100% {
left: 0px;
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
box-shadow: 0 0 0 rgba(200, 0, 0, 0);
transform: scaleX(1) skewX(0deg);
}
<div id="outer">
<div id="mb">Motion Blur</div>
</div>
Try this to reverse animation.
Just replace all left attributes into Top
And all transform property of X, ScaleX and SkewX to SkewX SkewY
#outer {
position: relative;
margin: 10px;
}
#mb {
position: absolute;
left: 0;
font-size: 2em;
font-weight: bold;
padding: 0.2em 1em;
color: #fff;
background-color: #600;
border: 0.2em solid #c00;
border-radius: 8px;
text-shadow: 0 0 5px rgba(255, 255, 255, 0);
box-shadow: 0 0 2px rgba(200, 0, 0, 0);
-webkit-animation: motionblur 4s ease-in-out infinite;
animation: motionblur 4s ease-in-out infinite;
}
#-webkit-keyframes motionblur {
0% {
top: 0;
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
box-shadow: 0 0 0 rgba(200, 0, 0, 0);
}
5% {
top: 0;
-webkit-transform-origin: 0 0;
-webkit-transform: scaleY(0.85);
}
25% {
text-shadow: -5px 0 5px rgba(255, 255, 255, 1);
box-shadow: -15px 0 10px -5px rgba(200, 0, 0, 0.5);
-webkit-transform: scaleY(1.1) skewY(-4deg);
}
50% {
top: 300px;
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
box-shadow: 0 0 0 rgba(200, 0, 0, 0);
-webkit-transform: scaleY(1) skewY(0deg);
}
55% {
left: 300px;
-webkit-transform-origin: 100% 0;
-webkit-transform: scaleY(0.85);
}
75% {
text-shadow: 5px 0 5px rgba(255, 255, 255, 1);
box-shadow: 15px 0 10px -5px rgba(200, 0, 0, 0.5);
-webkit-transform: scaleY(1.1) skewY(4deg);
}
100% {
top: 0px;
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
box-shadow: 0 0 0 rgba(200, 0, 0, 0);
-webkit-transform: scaleY(1) skewY(0deg);
}
}
#keyframes motionblur {
0% {
top: 0;
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
box-shadow: 0 0 0 rgba(200, 0, 0, 0);
}
5% {
top: 0;
-webkit-transform-origin: 0 0;
-webkit-transform: scaleY(0.85);
}
25% {
text-shadow: -5px 0 5px rgba(255, 255, 255, 1);
box-shadow: -15px 0 10px -5px rgba(200, 0, 0, 0.5);
-webkit-transform: scaleY(1.1) skewY(-4deg);
}
50% {
top: 300px;
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
box-shadow: 0 0 0 rgba(200, 0, 0, 0);
-webkit-transform: scaleY(1) skewY(0deg);
}
55% {
top: 300px;
-webkit-transform-origin: 100% 0;
-webkit-transform: scaleY(0.85);
}
75% {
text-shadow: 5px 0 5px rgba(255, 255, 255, 1);
box-shadow: 15px 0 10px -5px rgba(200, 0, 0, 0.5);
-webkit-transform: scaleY(1.1) skewY(4deg);
}
100% {
top: 0px;
text-shadow: 0 0 0 rgba(255, 255, 255, 0);
box-shadow: 0 0 0 rgba(200, 0, 0, 0);
-webkit-transform: scaleY(1) skewY(0deg);
}
<div id="outer">
<div id="mb">Motion Blur</div>
</div>

Animated submit/progress buttons with pure css3

How can someone achieve the effect shown here using pure css3.
Using this (pure CSS/without javascript):
Animated progress circle in CSS
Using the :target selector
I create an example, Probably still not what you are looking for, but it was the closest I came.
Example (Demo in jsfiddle):
<style>
#-webkit-keyframes rotate {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
#-moz-keyframes rotate {
from {
-moz-transform: rotate(0deg);
}
to {
-moz-transform: rotate(360deg);
}
}
#-o-keyframes rotate {
from {
-o-transform: rotate(0deg);
}
to {
-o-transform: rotate(360deg);
}
}
#keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
#startupload:target {
/*"disable" button*/
background: transparent;
border: none;
}
#startupload:target div.before {
/*Hide If has hash in url address browser*/
display: none;
}
#startupload div.progress-circle-container {
position: relative;
height: 230px;
width: 230px;
margin: 0 auto;
display: none; /*hide If no Hash in address*/
}
#startupload:target div.progress-circle-container {
display: block; /*Show If Hash in address*/
}
#startupload div.progress-circle-container div.progress-circle-outer {
background-color: #faef85;
background-repeat: repeat-x;
background-image: -moz-linear-gradient(0deg, #d66f0f, #faef85);
background-image: -webkit-linear-gradient(0deg, #d66f0f, #faef85);
background-image: -o-linear-gradient(0deg, #d66f0f, #faef85);
background-image: linear-gradient(0deg, #d66f0f, #faef85);
width: 230px;
height: 230px;
position: absolute;
-webkit-animation-play-state: paused;
-moz-animation-play-state: paused;
-o-animation-play-state: paused;
animation-play-state: paused;
-webkit-animation: rotate 2.2s infinite linear;
-moz-animation: rotate 2.2s infinite linear;
-o-animation: rotate 2.2s infinite linear;
animation: rotate 2.2s infinite linear;
-webkit-box-shadow: inset 0 2px 10px #d58513,inset 0 0 20px #b93d00,0 0 15px rgba(216, 140, 23, 0.25);
-moz-box-shadow: inset 0 2px 10px #d58513,inset 0 0 20px #b93d00,0 0 15px rgba(216, 140, 23, 0.25);
box-shadow: inset 0 2px 10px #d58513,inset 0 0 20px #b93d00,0 0 15px rgba(216, 140, 23, 0.25);
-webkit-border-radius: 200px;
-moz-border-radius: 200px;
border-radius: 200px;
}
#startupload:target div.progress-circle-container div.progress-circle-outer.animate {
-webkit-animation-play-state: running;
-moz-animation-play-state: running;
-o-animation-play-state: running;
animation-play-state: running;
}
#startupload div.progress-circle-container div.progress-circle-inner {
height: 170px;
width: 170px;
margin: 0 auto;
position: absolute;
left: 30px;
top: 30px;
-webkit-border-radius: 200px;
-moz-border-radius: 200px;
border-radius: 200px;
background-color: #fff;/*change color background*/
-webkit-box-shadow: inset 0 2px 1px #ffffff,inset 0 -1px 1px rgba(0, 0, 0, 0.08),inset 0 -3px 1px rgba(0, 0, 0, 0.09),0 2px 2px rgba(0, 0, 0, 0.3);
-moz-box-shadow: inset 0 2px 1px #ffffff,inset 0 -1px 1px rgba(0, 0, 0, 0.08),inset 0 -3px 1px rgba(0, 0, 0, 0.09),0 2px 2px rgba(0, 0, 0, 0.3);
box-shadow: inset 0 2px 1px #ffffff,inset 0 -1px 1px rgba(0, 0, 0, 0.08),inset 0 -3px 1px rgba(0, 0, 0, 0.09),0 2px 2px rgba(0, 0, 0, 0.3);
text-align: center;
}
</style>
<form action="#startupload">
<button id="startupload" type="submit">
<div class="before">
Start upload
</div>
<div class="progress-circle-container">
<div class="progress-circle-outer animate">
</div>
<div class="progress-circle-inner"></div>
</div>
</button>
</form>
Perhaps the ultimate goal to achieve the best is something like:
css3 animations frame by frame