Currently experimenting with creating a sliding effect background using box-shadows. Everything seems to be working smoothly, although the challenge lies in utilizing percentage units which aren't supported by box-shadow, requiring manual configuration in pixels.
HTML:
<button id="play-game">Play Game!</button>
CSS:
#play-game{
width:240px;
height:71px;
font-size:40px;
transition: all ease 0.5s, color 0.5s;
box-shadow: inset 0 0 0 0 rgb(3, 54, 110);
background:rgb(61, 132, 212);
border:none;
}
#play-game:hover{
box-shadow: inset 0 71px 0 0 rgb(3, 54, 110);
color:rgb(222, 222, 222);
}
http://jsfiddle.net/muycgfwg/
Curious if there's an alternative method to ensure the box shadow matches the height of the element. I do have another solution in mind but it's more complex to implement, so I'm open to suggestions. Thanks for any assistance!