2012-06-14 55 views
1

我用下面的動畫:CSS3動畫,留在原地

.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); 
    } 
} 

動畫工作正常,但一旦動畫完成後,從地方元素移動它被賦予生命,爲它的默認位置

有沒有辦法讓它保持原位?

+0

-webkit-動畫填充模式:前鋒;似乎工作 – Phill

回答

2

可以在.wheel1anim添加一行:

-webkit-animation-fill-mode:both;