Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
292 views
in Technique[技术] by (71.8m points)

Infinite stream text animation CSS

I'd like my animation don't make a blank, when the first letter is overflow to left, I want it come back to right immediatly. How can I do ?

.stream_text {
  position: absolute;
  padding-left: 100%;
  white-space: nowrap;
  font-size: 30px;
  text-transform: uppercase;
  animation: stream 5s linear infinite;
}
 
@keyframes stream {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}
<div class="stream_text">Hello World</div>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Overflow:hidden; 

It will allow it to show and not be blank


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...