I have a button for which I want to slide his background from #000 to #ccc
.
My problem is how to do that slide transition of button background on hover or mouseenter.
It is possible to do this with jQuery?
Very important , I don' want to use background images so all suggestions about images ..skip pls.
This is an annoying fiddle created only with css but is working only from top to bottom and not from left to right how I need. http://jsfiddle.net/xu3ck/166/
<a href="#" class="btn two">Submit Form</a>
.btn {
width: 180px;
text-decoration: none;
height: 40px;
border-radius: 10px;
text-align: center;
color: white;
line-height: 40px;
font-size: 20px;
font-family: arial, sans-serif;
margin: 20px;
float: left;
display: block;
color: white;
box-shadow: rgba(0,0,0,0.3) 1px 1px 3px inset;
}
.two {
background: linear-gradient(#111, #eee);
background-repeat: repeat;
background-size: 100% 200%;
transition: all .5s linear;
}
.two:hover, .two:focus, .two:active {
background-position: 0 -200%;
}
ty.