<style>
div {
overflow: hidden;
}
p {
animation: marquee 2s linear infinite;
}
@keyframes marquee {
from {transform: translateX(-100%); }
to {transform: translateX(100%); }
}
</style>
<div style="width: 50px">
<p>Hi</p>
</div>