css - Stopping a CSS3 Animation on last frame -
i have 4 part css3 animation playing on click - last part of animation meant take off screen.
however, goes original state once has played. know how can stop on last css frame (100%), or else how rid of whole div in once has played.
@keyframes colorchange { 0% { transform: scale(1.0) rotate(0deg); } 50% { transform: rotate(340deg) translate(-300px,0px) } 100% { transform: scale(0.5) rotate(5deg) translate(1140px,-137px); } }
you're looking for:
animation-fill-mode: forwards;
more info on mdn , browser support list on caniuse.
Comments
Post a Comment