Creating Transitions in CSS

 <!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>CSS Transition</title>

</head>

<style>

    body{

        background-color: black;

    }

     #Box{

         display: flex;

         height: 200px;

         width: 200px;

         background-color: rgb(63, 25, 201);

         justify-content: center;

         align-content: center;

         align-items: center;

         /* transition-property: background-color;

         transition-duration: 3s;

         transition-timing-function: ease-in;

         transition-timing-function: ease-out;

         transition-timing-function: ease-in-out;

         transition-delay: 2s; */


         /* transition shorthand property in one line  */

         /* transition: background-color 1s ease-in-out 2s; */

         

         transition: all 1s ease-in-out .01s;


     }

     #Box:hover{

          background-color: rgb(65, 61, 61);

          height: 250px;

          width: 250px;

          border-radius: 100px;

          font-size: 26px;

     }

</style>

<body>

    <h3>This is CSS Transition Tutorial</h3>

    <div class="container">

        <div id="Box">

         This is my Box

        </div>

    </div>

</body>

</html>

Comments

Popular posts from this blog

Transform Property In CSS

More on CSS Selectors