Last active
September 6, 2021 08:47
-
-
Save saidMounaim/11043abe75ae6e4ab665df91397657c3 to your computer and use it in GitHub Desktop.
Creates a bouncing loader animation.
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 http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>loader</title> | |
<style> | |
@keyframes bouncing-loader { | |
to { | |
opacity: 0.1; | |
transform: translate3d(0, -16px, 0); | |
} | |
} | |
.bouncing-loader { | |
display: flex; | |
justify-content: center; | |
} | |
.bouncing-loader > div { | |
width: 16px; | |
height: 16px; | |
margin: 3rem 0.2rem; | |
background: #8385aa; | |
border-radius: 50%; | |
animation: bouncing-loader 0.6s infinite alternate; | |
} | |
.bouncing-loader > div:nth-child(2) { | |
animation-delay: 0.2s; | |
} | |
.bouncing-loader > div:nth-child(3) { | |
animation-delay: 0.4s; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="bouncing-loader"> | |
<div></div> | |
<div></div> | |
<div></div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment