I would like to create this hover effect on buttons:
On hover, the background color changes sliding in from the left side. If the mouse leaves the button the original background color is supposed to return but sliding in from the left.
Right now I have this code (both classes apply to the button):
.button_slide {
color: #FFF;
border: 2px solid rgb(216, 2, 134);
border-radius: 0px;
padding: 18px 36px;
display: inline-block;
font-family: "Lucida Console", Monaco, monospace;
font-size: 14px;
letter-spacing: 1px;
cursor: pointer;
box-shadow: inset 0 0 0 0 #D80286;
-webkit-transition: ease-out 0.4s;
-moz-transition: ease-out 0.4s;
transition: ease-out 0.4s;
}
.slide_right:hover {
box-shadow: inset 400px 0 0 0 #D80286;
}
I would like to have the hover background perish from the left side when leaving the button. Right now it perishes from the right side.
Can anybody help me with that?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…