.c-ontainer { position: relative; height: 200px; width: 300px; background-color: black; color: white; font-size: 24px; line-height: 200px; text-align: center; } .line { position: absolute; height: 1px; width: 100%; background-color: white; animation: move 2s linear infinite; animation-timing-function: cubic-bezier(0.1, 0.4, 0.5, 0.1); } @keyframes move { from { top: 200px; } to { top: 0px; } } /*--???布局--*/