.comment-container { position: relative; width: 100%; height: 100%; overflow: hidden; } .comment { position: absolute; white-space: nowrap; animation: commentAnimation 10s linear; } @keyframes commentAnimation { from { transform: translateX(100%); } to { transform: translateX(-100%); } }