have this CSS3 code:
#box1
{
position: relative;
width: 300px;
border: 1px solid black;
box-shadow: -3px 8px 34px #808080;
border-radius: 20px;
box-shadow: -8px 5px 5px #888888;
right: 700px;
top: -200px;
height: 150px;
}
@-webkit-keyframes myfirst {
0% { right:700px; top:-200px;background: yellow;}
50% {background:blue; right:700px; top:200px;}
100% { right:700px; top:-200px; background: yellow}
}
#stam {
font-size: large;
background: green;
width: 100px;
top: 400px;
position: absolute;
}
#stam:hover ~ #box1 { -webkit-animation:myfirst 2s; }
you can see how the code works here: http://jsfiddle.net/FLe4g/2/
my question is: how can I do the animation so when I put the mouse on “stam” div the animation will stop on “50%” ( 50% {background:blue; right:700px; top:200px;}) of the animation, and only when I move the mouse from “stam” div, the animation continue? I’m really prefer that the solution will be with CSS3 and not with js… thank you!
For backward animation i used transition, so when you going forward you use animation frames and when you go backward you use transition: