<div id="slider">
  <div class="slides">
    <div class="slider">
      <div class="legend"></div>
      <div class="content">
        <div class="content-txt">
          <h2>Lorem ipsum dolor</h2>
          <p>Nam ultrices pellentesque facilisis. In semper tellus mollis nisl pulvinar vitae vulputate lorem consequat. Fusce odio tortor, pretium sit amet auctor ut, ultrices vel nibh.</p>
        </div>
       </div>
      <div class="image"> <img src="//www.w3cplus.com/sites/default/files/blogs/2019/1906/s1.jpg"> </div>
    </div>
    <div class="slider">
      <div class="legend"></div>
      <div class="content">
        <div class="content-txt">
          <h2>Lorem ipsum dolor</h2>
          <p>Nam ultrices pellentesque facilisis. In semper tellus mollis nisl pulvinar vitae vulputate lorem consequat. Fusce odio tortor, pretium sit amet auctor ut, ultrices vel nibh.</p>
        </div>
      </div>
      <div class="image"> <img src="//www.w3cplus.com/sites/default/files/blogs/2019/1906/s2.jpg"> </div>
     </div>
    
    <div class="slider">
      <div class="legend"></div>
      <div class="content">
        <div class="content-txt">
          <h2>Lorem ipsum dolor</h2>
          <p>Nam ultrices pellentesque facilisis. In semper tellus mollis nisl pulvinar vitae vulputate lorem consequat. Fusce odio tortor, pretium sit amet auctor ut, ultrices vel nibh.</p>
        </div>
      </div>
      <div class="image"> <img src="//www.w3cplus.com/sites/default/files/blogs/2019/1906/s3.jpg"> </div>
    </div>
    <div class="slider">
      <div class="legend"></div>
      <div class="content">
        <div class="content-txt">
          <h2>Lorem ipsum dolor</h2>
          <p>Nam ultrices pellentesque facilisis. In semper tellus mollis nisl pulvinar vitae vulputate lorem consequat. Fusce odio tortor, pretium sit amet auctor ut, ultrices vel nibh.</p>
        </div>
      </div>
      <div class="image"> <img src="//www.w3cplus.com/sites/default/files/blogs/2019/1906/s4.jpg"> </div>
    </div>
</div>
<div class="switch">
  <ul>
    <li>
    <div class="on"></div>
    </li>
    <li></li>
    <li></li>
    <li></li>
  </ul>
</div>
</div>
*{
  margin:0;
  padding:0;
  box-sizing: border-box;
}

body{
  width: 100vw;
  height: 100vh;
}

/* Slider */
#slider{
  width:100vw;
  height:100vh;
  position:relative;
  overflow:hidden;
}

@keyframes load{
  from{left:-100%;}
  to{left:0;}
}

.slides{
  width:400%;
  height:100%;
  position:relative;
  animation:slide 30s infinite;
}

.slider{
  width:25%;
  height:100%;
  float:left;
  position:relative;
  z-index:1;
  overflow:hidden;
}
.slider img{
  width:100%;
  height:100%;
  object-fit: cover;
  object-position: center;
}
.image{
  width:100vw;
  height:100vh;
}


/* Legend */
.legend{
  border:500px solid transparent;
  border-left:800px solid rgba(52, 73, 94, .7);
  border-bottom:0;
  position:absolute;
  bottom:0;
}

/* Contents */
.content{
  width:100%;
  height:100%;
  position:absolute;
  overflow:hidden;
}
.content-txt{
  width:400px;
  height:150px;
  float:left;
  position:relative;
  top:30vh;
  animation:content-s 7.5s infinite;
}
.content-txt h2{
  font-family:Arial;
  text-transform:uppercase;
  font-size:24px;
  color:#fff;
  text-align:left;
  margin-left:30px;
  padding-bottom:10px;
}
.content-txt p{
  font-family:arial;
  font-weight:normal;
  font-size:14px;
  font-style:italic;
  color:#fff;
  text-align:left;
  margin-left:30px;
}

/* Switch */
.switch{
  width:120px;
  height:10px;
  position:absolute;
  bottom:50px;
  z-index:99;
  left:30px;
}
.switch > ul{
  list-style:none;
}
.switch > ul > li{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#333;
  float:left;
  margin-right:5px;
  cursor:pointer;
}
.switch ul{
  overflow:hidden;
}
.on{
  width:100%;
  height:100%;
  border-radius:50%;
  background:#f39c12;
  position:relative;
  animation:on 30s infinite;
}

@keyframes slide{
  0%,100%{
    margin-left:0%;
  }
  21%{
    margin-left:0%;
  }
  25%{
    margin-left:-100%;
  }
  46%{
    margin-left:-100%;
  }
  50%{
    margin-left:-200%;
  }
  71%{
    margin-left:-200%;
  }
  75%{
    margin-left:-300%;
  }
  96%{
    margin-left:-300%;
  }
}

@keyframes content-s{
  0%{left:-420px;}
  10%{left:20px;}
  15%{left:0px;}
  30%{left:0px;}
  40%{left:0px;}
  50%{left:0px;}
  60%{left:0px;}
  70%{left:0;}
  80%{left:-420px;}
  90%{left:-420px;}
  100%{left:-420px;}
}

@keyframes on{
  0%,100%{
    margin-left:0%;
  }
  21%{
    margin-left:0%;
  }
  25%{
    margin-left:15px;
  }
  46%{
    margin-left:15px;
  }
  50%{
    margin-left:30px;
  }
  71%{
    margin-left:30px;
  }
  75%{
    margin-left:45px;
  }
  96%{
    margin-left:45px;
  }
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.