Created
February 26, 2017 18:12
-
-
Save ericmustin/3ef1e6ba2c8303f5a503736bd526a5a5 to your computer and use it in GitHub Desktop.
rollingBall
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> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<style type="text/css"> | |
.ball { | |
position: relative; | |
top: 100px; | |
left: -25%; | |
width: 25%; | |
height: 50%; | |
animation: roll-cycle 4s steps(25) infinite; | |
} | |
@keyframes roll-cycle { | |
0% { | |
transform: rotate(0deg); | |
left: 0%; | |
} | |
50% { | |
transform: rotate(360deg); | |
left: 75%; | |
} | |
100% { | |
transform: rotate(0deg); | |
left: 0%; | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<img class="ball" src="https://s10.postimg.org/jnc036l5l/baseball1.png" /> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment