2016-03-28 15 views
0

アニメーションの再生が終了した後にDivが再表示されました。元の場所に戻ることをどのようにして停止しますか?アニメーションが停止してもDIVは同じ位置に戻りますか?

#wrapper { 
    background-color: #999; 
    position: fixed; 
    height: 100%; 
    width: 100%; 
} 
#wrapper .section{ 
    position: absolute; 
    top: 0; 
    width: 51%; 
    height: 100%; 
    background: #222222; 
} 
#wrapper .section.section-left{ 
    left:0; 
    animation: move 1.5s 1; 

} 
#wrapper .section.section-right{ 
    right:0; 
    animation: move 1.5s 1; 

} 
@keyframes move{ 
    0% {width: 51%;} 
    100% {width:0%;} 
} 

HTMLコード:

<div id="wrapper"> 
<div class="section section-left"></div> 
<div class="section section-right"></div> 
</div> 
+0

Codepen example

#wrapper .section.section-leftへと#wrapper .section.section-right、リンクの感謝を追加することができます! –

答えて

0

あなたは、animation-fill-mode: forwards;ああ

関連する問題