<div class="middle">
  <span class="container">
    <div class="text" data-text="Effect">Effect</div>
  </span>
</div>
body{
  margin: 0;
  padding: 0;
  font-family: "montserrat",sans-serif;
}
.middle{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
}

.container{
  position: relative;
  display: inline-block;
  padding: 0 40px;
  cursor: pointer;
}

.text{
  font-size: 100px;
  text-transform: uppercase;
  font-weight: 900;
  position: relative;
  color: #34495e;
}
.text::before{
  content: attr(data-text);
  position: absolute;
  color: #fff;
  width: 0;
  overflow: hidden;
  transition: 0.6s;
}
.container::before{
  content: "";
  width: 0%;
  height: 100%;
  position: absolute;
  background: #2980b9;
  right: 0;
  top: 0;
  transition: 0.6s;
}
.container:hover .text::before,
.container:hover::before{
  width: 100%;
}
/*
* https://www.darkcode.info/2018/12/amazing-effect-on-hover-using-only-html.html
*/
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.