\
<! DOCTYPEhtml>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>The CSS3 animation stays on the last frame</title>
<meta name="viewport" content="Width =width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<style type="text/css">
body{margin: 0; }.m-test{width: 100px;height: 100px;animation:test-animation 3s;animation-fill-mode: forwards; }@-webkit-keyframes test-animation {
0% { background-color: rgba(0.0.0.0)}
100% { background-color: rgba(100.100.100.0.5)}}@keyframes test-animation {
0% { background-color: rgba(0.0.0.0)}
100% { background-color: rgba(100.100.100.0.5)}}</style>
</head>
<body>
<div class="m-test"></div>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script>
<script type="text/javascript">
</script>
</body>
</html>
Copy the code
\
\
\
\