Skip to content

Commit

Permalink
Added Ball Animation (#2420)
Browse files Browse the repository at this point in the history
* Create index.html

* Add files via upload

* Update include.js
  • Loading branch information
vikasverma67 committed Nov 1, 2023
1 parent 81db056 commit d0beca4
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Art/vikasverma67/Animation1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="styles.css">
<title>lets play ball </title>
</head>
<body>
<div class="ball ball1"></div>
<div class="ball ball2"></div>
</body>
</html>
Binary file added Art/vikasverma67/Animation1/lets play ball.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions Art/vikasverma67/Animation1/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
body {
background-color:black;
background-size: cover;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
overflow: hidden;
}

.ball {
width: 50px;
height: 50px;
background-color:white;
border-radius: 50%;
position: absolute;
animation: bounce 3s infinite;
}

.ball1 {
animation-delay: 0s;
}

.ball2 {
animation-delay: 1s;
}

@keyframes bounce {
0% {
transform: translate(0, 0);
}
25% {
transform: translate(100%, -100%);
}
50% {
transform: translate(200%, 0);
}
75% {
transform: translate(100%, 100%);
}
100% {
transform: translate(0, 0);
}
}
7 changes: 7 additions & 0 deletions include.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
let cards = [
{
artName: 'Balls Animation',
pageLink: './Art/vikasverma67/Animation1/index.html',
imageLink: './Art/vikasverma67/Animation1/lets play ball.gif',
author: 'vikasverma67',
githubLink: 'https://github.com/vikasverma67'
},
{
artName: 'Earth',
pageLink: './Art/stormworm9/EarthAnimation/Earth.html',
Expand Down

0 comments on commit d0beca4

Please sign in to comment.