Bouncing Ball animation using only HTML and CSS.(No JavaScript)


 Bouncing Ball animation using CSS






PROGRAM SOURCE CODE :- 



1) HTML coding :-


<!DOCTYPE html>
<html>
<head>
<title>Bouncing Ball's Animation</title>
<link rel="stylesheet" type="text/css" 
href="Bouncing_Ball.css">
</head>
<body>
<div class="main">
<ul>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
    <li></li>
</ul>
</div>
</body>
</html>



2) CSS coding :-



*{
    margin:0px;
    padding0px;
    box-sizingborder-box;
}
.main{
    width100vw;
    height100vh;
    background-color:black;
    display:grid;
    place-itemscenter;
    positionrelative;
}
 .main ul{
    displayinline-flex;
    border-bottom15px solid #fff;
}
.main ul li{
    list-style-typenone;
    width50px;
    height50px;
    margin:20px 20px 0px 20px;
    border-radius50%;
    animation: bounce 1s linear infinite;
}
@keyframes bounce{
    0%{
        transformtranslateY(0px);
    }
    50%{
        transformtranslateY(-200px);
    }
    100%{
        transformtranslateY(0px);
    }
}
.main ul li:nth-child(1){
    background-colorred;
    animation-delay0s;
}
.main ul li:nth-child(2){
    background-color:yellow;
    animation-delay0.2s;
}
.main ul li:nth-child(3){
    background-color:cyan;
    animation-delay0.4s;
}
.main ul li:nth-child(4){
    background-color:#fff;
    animation-delay0s;
}
.main ul li:nth-child(5){
    background-colormagenta;
    animation-delay0.3s;
}
.main ul li:nth-child(6){
    background-colorblue;
    animation-delay0.1s;
}






OUTPUT :- 






( NOTE : - While executing program you have to replace links of images , audio's  or video's in this program by your links. So take care of it ! )