Last active
May 17, 2023 14:20
-
-
Save MedeirosJoel/f3a959957dfd4668b5290de515fc471d to your computer and use it in GitHub Desktop.
Exemplo de animação com bolas no css e html
This file contains hidden or 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>Document</title> | |
</head> | |
<style> | |
#bola_ease { | |
width: 100px; | |
height: 100px; | |
border-radius: 50%; | |
background-color: red; | |
animation: mover 2s ease infinite; | |
} | |
#bola_ease_in { | |
width: 100px; | |
height: 100px; | |
border-radius: 50%; | |
background-color: red; | |
animation: mover 2s ease-in infinite; | |
} | |
#bola_ease_in_out { | |
width: 100px; | |
height: 100px; | |
border-radius: 50%; | |
background-color: red; | |
animation: mover 2s ease-in-out infinite; | |
} | |
#bola_ease_out { | |
width: 100px; | |
height: 100px; | |
border-radius: 50%; | |
background-color: red; | |
animation: mover 2s ease-out infinite; | |
} | |
@keyframes mover { | |
from { | |
transform: translateX(0); | |
} | |
to { | |
transform: translateX(550px); | |
} | |
} | |
</style> | |
<body> | |
<div id="bola_ease"></div> | |
<div id="bola_ease_out"></div> | |
<div id="bola_ease_in_out"></div> | |
<div id="bola_ease_in"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment