animation can ,just:
-webkit-animation-fill-mode: forwards;
but ‘transition’ , can let div 'end' in hover state use 'transition'
.div-box{ position: relative; top:0; left: 0; width: 100px; height: 100px; background: red; transition:all 1s linear ; } .div-box:hover{ transform: translate(100px,0); }
you can kind of emulate behavior need following trick:
.div-box{ position: relative; top:0; left: 0; width: 100px; height: 100px; background: red; transition:all 1s linear 99999s; /* huge delay non-hovered state! */ } .div-box:hover{ transform: translate(100px,0); transition:all 1s linear; /* immediate transition start on hover */ }
Comments
Post a Comment