Rotate your phone or change to desktop for better experience

Rotate your phone or change to desktop for better experience

10. Program to create a rectangle and animate increase and decrease the size of rectangle.


<!DOCTYPE html>

<html>

<head>

<style>

div {

  width: 100px;

  height: 100px;

  background: red;

  position: relative;

  animation: mymove 5s infinite;

}

 

@keyframes mymove {

  0%  {top: 0px; background: red; width: 100px;}

  100% {top: 200px; background: yellow; width: 300px;}

}

</style>

</head>

<body>

 

<h1>The @keyframes Rule</h1>

 

<div></div>

 

</body>

</html>

 

 

Post a Comment

0 Comments