section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh; /* allows vertical align */
}

section div {
    width: 350px; /* allows horizontal align */
}

div.slides {
    width: 350px;
    height: 475px;
    position: relative; /* allows the position absolute of its content */
}

div.slides img {
    position: absolute; /* absolute but within the frame of the containing div */
    top: 0;
    left: 0;

    transition: transform 0.5s;
}

div.slides img:first-child{
    z-index: 1;
}


/******* to remove the scrollbars *********/

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* Firefox */
* {
  scrollbar-width: none;
}