container.children[i].style.animationIterationCount = aliveCount;
<!DOCTYPE html>
<html>
<head>
<title>生命游戏</title>
<style>
body {
background-color: #333;
font-family: Arial, sans-serif;
}
#container {
position: relative;
width: 600px;
height: 400px;
border: 1px solid black;
.cell {
position: absolute;
width: 50px;
height: 50px;
border: 1px solid gray;
font-size: 24px;