CREATE CSS AND JAVA SCRIPT ANIMATION @Dr Tech |HTML| CSS | JAVA SCRIPT |...

Html source code

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

<title>animation 2</title>

<link rel="stylesheet" type="text/css" href="animation2.css">

</head>

<body>

<div class="perant">

<div class="box2"><div>

</div class="box3"></div>

</div>


</body>

</html>

CSS SOURCE CODE

.perant

{

width: 100%;

height: 150px;

box-shadow: 4px 4px 4px 4px rgba(0, 0, 0, 1.0);

}

.box2

{

width: 150px;

height: 150px;

box-shadow: 4px 4px 4px -4px rgba(0, 0, 0, 0.5);

border-radius: 60%;

background-color: hotpink;

margin-right: auto;

margin-left: auto;

animation: bounce 1s 4;

}

.box3

{

width: 150px;

height: 150px;

box-shadow: 4px 4px 4px -4px rgba(0, 0, 0, 0.5);

border-radius: 60%;

background-color: hotpink;

margin-right: auto;

margin-left: auto;

margin-top: 150px;

animation: bouncea 1s 4;

}

@keyframes bounce {

0%{

transform: translate(500px);

transform: translateX(500px);

}


}


@keyframes bouncea {

0%{

transform: translate(-500px);

transform: translateX(-600px);

}}

Post a Comment

1 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.