Edit in JSFiddle

<div>
  <a href="#"><span>Hover me to see the animated rectangle</span></a>
</div>
body {
  font-family: Calibri;
  font-size: 20px;
  padding: 10px;
  background-color:LightGrey;
}

a {
  color: #e74c3c;
  font-weight: 500;
  -webkit-transition: -webkit-transform 0.2s;
  transition: transform 0.2s;
  display: inline-block;
  text-decoration: none;
  position: relative;
}

a::before {
  position: absolute;
  top: 0;
  left: -10px;
  z-index: -1;
  box-sizing: content-box;
  padding: 0 10px;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  background-color: #fff;
  content: '';
  opacity: 0;
  -webkit-transition: -webkit-transform 0.4s, opacity 0.3s;
  transition: transform 0.4s, opacity 0.3s;
  -webkit-transform: scale(0);
  transform: scale(0);
}

a:hover::before
{
  opacity: 1;
  -webkit-transform: scale(1);
  transform: scale(1);
}