html, body { /* overflow-x: hidden; */ width: 100%; line-height: 1; } header, main { line-height: 0; } video { width: 100%; } .logo { position: absolute; } .stone, .card, .vip { position: absolute; /*动画名称*/ animation-duration: 1s; /*设置秒数*/ animation-timing-function: linear; /*速度曲线*/ animation-iteration-count: infinite; /*播放次数*/ animation-direction: alternate; /*逆向播放*/ animation-play-state: running; /*正在运行*/ } @keyframes beat-stone { 0% { top: 148%; } 100% { top: 151%; } } @keyframes beat-card { 0% { top: 130%; } 100% { top: 133%; } } @keyframes beat-vip { 0% { top: 156%; } 100% { top: 159%; } } .stone { left: 50%; top: 148%; transform: translatex(-180%); animation-name: beat-stone; } .card { left: 50%; top: 130%; transform: translatex(-50%); animation-name: beat-card; } .vip { right: 50%; top: 156%; transform: translatex(180%); animation-name: beat-vip; }