Saturday, 19 March 2022

TUT36 (Keyframes and Animations)

 <!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Keyframes and Animations</title>
</head>
<style>
 .container{
     background-color: yellow;
 }
 .box{
     background-color: green;
     width: 250px;
     height: 250px;
     position: relative;
     animation-name: Zoya2;
     animation-duration: 8s;
     animation-iteration-count: 1;
    /* animation-fill-mode: forwards; */
    /* animation-timing-function: ease-in ease-in-out; */
    /* animation-delay: 3s; */
     /* animation-direction: reverse; */

     /* These properties can be set using this shorthand */
     /* animation: animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-fill-mode */
     animation: zoya 5s ease-in 1s 12 backwards;

    }@keyframes Zoya2{
     0%{
        top: 0px;
        left: 0px;
    }
    25%{
        top: 250px;
        left: 0px;
       
     }
     75%{
        top: 250px;
        left: 250px;
     }
     100%{
        top: 0px;
        left: 250px;
     }
     }
 }

    }@keyframes Zoya1{
     From{
         width: 200px;}
         To{
             width:1400px
         }
     }
 }

</style>
<body>
    <div class="container">
     <div class="box">
      This is a Box
    </div>
    </div>
</body>
</html>



No comments:

Post a Comment

TUT 44 (CSS GRID - 3)

  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < met...