Phill
Phill

Reputation: 153

CSS3 animation, stay put

I'm using the following animation:

.wheel1anim {
    -webkit-animation-name: wheel1go;
    -webkit-animation-timing-function: ease-in-out;
    -webkit-animation-iteration-count: 1;
    -webkit-animation-direction: normal;
    -webkit-animation-delay: 0;
    -webkit-animation-play-state: running;
    -webkit-animation-duration: 1s;
}

@-webkit-keyframes wheel1go {
    0% {
    }
    100% {
        -webkit-transform: translate(200px, 150px);
    }
}

The animation works fine, but once the animation is finished, the element moves from the place it was animated to, to its default position

Is there a way to make it stay in place?

Upvotes: 1

Views: 255

Answers (1)

Tom
Tom

Reputation: 794

You can add one line in .wheel1anim:

-webkit-animation-fill-mode:both;

Upvotes: 2

Related Questions