A Pen by John K. Speck on CodePen.
Last active
March 22, 2020 01:53
-
-
Save speckworks/731fbf245527650850de397837559308 to your computer and use it in GitHub Desktop.
Animation with CSS3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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