I so far managed to make it so that on hover the background goes from blue to red, but I want it to loop red over blue, then blue over red, then red over blue etc.
http://jsfiddle.net/rfnslyr/1z14hwo5/
html
<div class="preloader"></div>
css
.preloader {
background: #ff0000;
height: 100px;
width: 100px;
background: linear-gradient(to top, red 50%, blue 50%);
background-size: 100% 200%;
background-position:top;
transition:all 2s ease;
}
.preloader:hover {
background-position:bottom;
}