CodePen

HTML

            
              <div class="box gradient-transition"></div>
            
          
!

CSS

            
              .box {
  width: 200px;
  height: 200px;
  overflow: hidden;
}

.gradient-transition {
  background: 
    linear-gradient(
      yellow,
      orange,
      red
    );
  background-size: 100% 200%;
  transition: background-position 0.4s ease;
}
.gradient-transition:hover {
  background-position: 0 100%;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................