<div></div>
html,body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
}
div {
  animation-duration: 3s;
  animation-name: slidein;
  animation-iteration-count: infinite;
  min-height: 100px;
  background: purple;
}

@keyframes slidein {
  from {
    margin-left: 100%;
    width: 300%; 
  }

  to {
    margin-left: 0%;
    width: 100%;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.