<!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>Document</title>
<style>
div
{
position:relative;
top: 100px;
left: 50%;
width: 100px;
height: 100px;
background-color: pink;
transform: rotate(-45deg);
animation:myfirst 1s linear infinite;
-webkit-animation:myfirst 1s linear infinite;
}
div:before {
content: "";
position:absolute;
top: -50px;
left: 0;
width: 100px;
height: 100px;
border-radius: 50%;
background-color: pink;
animation:myfirst 1s linear infinite;
-webkit-animation:myfirst 1s linear infinite;
}
div:after{
content: "";
position: absolute;
top: 0px;
left: 50px;
width: 100px;
height: 100px;
background-color: pink;
border-radius: 50%;
animation:myfirst 1s linear infinite;
-webkit-animation:myfirst 1s linear infinite;
}
@keyframes myfirst
{
0% {background:pink;}
25% {background:LightPink;}
50% {background:HotPink;}
75% {background:DeepPink;}
100% {background:red;}
}
@-webkit-keyframes myfirst
{
0% {background:pink;}
25% {background:LightPink;}
50% {background:HotPink;}
75% {background:DeepPink;}
100% {background:red;}
}
</style>
</head>
<body>
<div></div>
</body>
</html>