/* TRANSFORM */
/* transform property */
/* div{
    width: 150px;
    height: 80px;
    background-color: yellow;
}

.a{
    transform: rotate(20deg);
}

.b{
    transform: skewY(20deg);
}

.c{
    transform: scaleY(1.5);
} */

/* transform origin */
/* #div1 {
    position: relative;
    height: 200px;
    width: 200px;
    margin: 100px;
    padding: 10px;
    border: 1px solid black;
}

#div2 {
    padding: 50px;
    position: absolute;
    border: 1px solid black;
    background-color: red;
    transform: rotate(45deg);
    transform-origin: 20% 40%;
} */

/* transform style */
/* #div1 {
    position: relative;
    height: 200px;
    width: 200px;
    margin: 100px;
    padding: 10px;
    border: 1px solid black;
}

#div2 {
    padding: 50px;
    position: absolute;
    border: 1px solid black;
    background-color: red;
    transform: rotateY(60deg);
    transform-style: preserve-3d;
}

#div3 {
    padding: 40px;
    position: absolute;
    border: 1px solid black;
    background-color: yellow;
    transform: rotateY(-60deg);
} */

/* TRANSITION */
/* transition-property, transition-duration, transition-timing-function and transition-delay*/
/* div {
    width: 100px;
    height: 100px;
    background: red;
    transition-property: width;
    transition-duration: 1s;
    transition-timing-function: ease-in;
    transition-delay: 2s;
}

div:hover {
    width: 300px;
} */

/* transition shorthand */
/* div {
    width: 100px;
    height: 100px;
    background-color: red;
    transition: width 5s linear 2s;
}

div:hover {
    width: 300px;
} */

/* ANIMATIONS */
div {
    width: 100px;
    height: 100px;
    position: relative;
    background-color: red;
    animation-name: cswithalam;
    animation-duration: 4s;
    /* animation-delay: -2s; */
    /* animation-iteration-count: 5; */
    animation-iteration-count: infinite;
    animation-direction: reverse;
}

/* @keyframes cswithalam {
    from {
        background-color: red;
    }

    to {
        background-color: yellow;
    }
} */

/* @keyframes cswithalam {
    0% {
            background-color: red;
            width: 150px;
        }
    
        25% {
            background-color: yellow;
            width: 200px;
        }
    
        50% {
            background-color: blue;
            width: 250px;
        }
    
        100% {
            background-color: green;
            width: 300px;
        }
} */

@keyframes cswithalam {
    0% {
        background-color: red;
        left: 0px;
        top: 0px;
    }

    25% {
        background-color: yellow;
        left: 200px;
        top: 0px;
    }

    50% {
        background-color: blue;
        left: 200px;
        top: 200px;
    }

    75% {
        background-color: green;
        left: 0px;
        top: 200px;
    }

    100% {
        background-color: red;
        left: 0px;
        top: 0px;
    }
}