Skip to content

Instantly share code, notes, and snippets.

@speckworks
Last active March 22, 2020 01:53
Show Gist options
  • Save speckworks/731fbf245527650850de397837559308 to your computer and use it in GitHub Desktop.
Save speckworks/731fbf245527650850de397837559308 to your computer and use it in GitHub Desktop.
Animation with CSS3
<!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>CSS animation</title>
</head>
<body>
<div class="circle">
</div>
<div class="circle">
</div>
</body>
</html>
.circle{
width:100px;
height:100px;
border-radius:50%;
border:groove;
border:10px;
background-color:turquoise;
animation-name: animation;
animation-duration:13s;
animation-repeat:infinite;
animation-delay: 1s;
animation-fill-mode: none;
}
@keyframes animation{
0%{
background-color:red;
border-radius:50%;
}
50%{
background-color:violet;
/* margin-left:600px; */
width:150px;
height:150px;
transform: translate(40px,100px);
transform: scale(.3);
}
100%{
height:300px;
width:300px;
border-radius:50%;
transform: translate(800px,10px)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment