Skip to content

Instantly share code, notes, and snippets.

@mgara
Created August 4, 2023 14:10
Show Gist options
  • Save mgara/d9b9a8ceaf433b282c1bf84b90f5ea51 to your computer and use it in GitHub Desktop.
Save mgara/d9b9a8ceaf433b282c1bf84b90f5ea51 to your computer and use it in GitHub Desktop.
Google sports, live animation for scoring
<!DOCTYPE html>
<html>
<head>
<style>
.ball {
width: 150px;
height: 50px;
position: relative;
background-color: green;
animation: mymove 2s infinite;
}
.container{
height: 50px;
width: 250px;
overflow: hidden;
}
@keyframes mymove {
0% {top: 0px; left: -150px;}
50% {top: 0px; left: 250px;}
100% {top: 0px; left: -150px;}
}
</style>
</head>
<body>
<div class="container">
<div class="ball"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment