
.parent {
    background-color: blue;
    height: 400px;
    width: 400px;

    position: fixed;
    left: 0;
    top: 0;
}

.child {
    height: 50%;
    width: 50%;
    margin: 0 auto;
    position: relative;

}

.child img.top {
    position:absolute;
    left:0;
    opacity: 1.0;
    animation:
    itop
    5s
    ease-in
    0s
    alternate
    infinite
    none
    running;
}

.child img.bottom {
    position:absolute;
    left:0;
    opacity: 0.0;
    animation:
    ibot
    5s
    ease-in
    0s
    alternate
    infinite
    none
    running;
}

@keyframes itop {
    0% {
        opacity: 1.0;
    }

    100% {
        opacity: 0.0;
    }
}


@keyframes ibot {
    0% {
        opacity: 0.0;
    }

    100% {
        opacity: 1.0;
    }
}

.page-loader{
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: grey;
}

.cube {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.cube-1 {
    background-color: yellow;
    animation: left 1s infinite 0.5s;
}

.cube-2 {
    background-color: red;
}

.cube-3 {
    background-color: green;
}

.cube-4 {
    background-color: blue;
    animation: right 1s infinite;   
}

@keyframes left {
    40% {
        transform: translateX(-60px);
    }
    50% {
        transform: translateX(0);
    }
}

@keyframes right {
    40% {
        transform: translateX(60px);
    }
    50% {
        transform: translateX(0);
    }
}
