<div id="box"></div>
#box {
  transition: 1s;
  width: 100%;
  height: 250px;
  background-color: red;
}
#box:hover {
  width: 50px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.