#slider{
  list-style-type: none;
  position: relative;
  overflow: hidden;
  margin: 0px auto;
}
#slider li{
  width: 100%;
  text-align: center;
  position: absolute;
  right: -100%;
}

#slider li:nth-child(1){
  background-color: #c0392b;
  right: 0px;
}
#slider li:nth-child(2){
  background-color: #e67e22;
}
#slider li:nth-child(3){
  background-color: #27ae60;
}
#slider li:nth-child(4){
  background-color: #2980b9;
}
#slider li:nth-child(5){
  background-color: #8e44ad;
}
#slider li:nth-child(6){
  background-color: #f1c40f;
}

#slider li img{
  width: 80%;
}

#slider li div{
  position: absolute;
  bottom: 0px;
  left: 50%;
  display: inline-block;
  transform: translate(-50%);
  padding: 10px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  font-weight: bold;
}
#slider li:nth-child(1) div{
  background-color: rgba(192, 57, 43, 1.0);
  color: #fff;
}
#slider li:nth-child(2) div{
  background-color: rgba(211, 84, 0, 1.0);
  color: #fff;
}
#slider li:nth-child(3) div{
  background-color: rgba(39, 174, 96, 1.0);
  color: #fff;
}
#slider li:nth-child(4) div{
  background-color: rgba(41, 128, 185, 1.0);
  color: #fff;
}
#slider li:nth-child(5) div{
  background-color: rgba(142, 68, 173, 1.0);
  color: #fff;
}
#slider li:nth-child(6) div{
  background-color: rgba(241, 196, 15, 1.0);
  color: #fff;
}
@media screen and (max-width:600px) {
  #slider li img{
    width: 100%;
  }
}

@media screen and (max-width:400px) {
  #slider li div{
    position: absolute;
    bottom: 0px;
    left: 50%;
    display: inline-block;
    transform: translate(-50%);
    padding: 5px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    font-weight: normal;
    font-size: 12px;
  }
}
