css3动画停在最后一帧方法
-
.class{ width: 200px; height: 100px; top: 100px; font-size: 50px; color: #fff; position: absolute; animation: move 1s; left: 200px; opacity: 1; } @keyframes move{ from{ left: 0px; opacity: 0; } to{ left: 200px; opacity: 1; } }
-
.class{ width: 200px; height: 100px; top: 100px; font-size: 50px; color: #fff; position: absolute; animation: move 1s; animation-fill-mode: forwards; } @keyframes move{ from{ left: 0px; opacity: 0; } to{ left: 200px; opacity: 1; } }