Reputation: 1
I tried to truncate the string with:
but it's only one side even the direction CSS property. Also tried the transform: translateX(), but it move the whole block without moving the hidden text. Also, I googled something like "static ticker", but that isn't it.
Maybe, I need to use flex/grid rows with 3 columns for each string and truncate the first and last columns?
Screenshot from Figma: https://i.sstatic.net/f7eYf.png
Upvotes: 0
Views: 47
Reputation: 19251
.container {
overflow: hidden;
width: 100px;
display: flex;
justify-content: center;
}
.content {
white-space: nowrap;
text-align: center;
display: inline-block;
}
<div class="container">
<p class="content">
blah blah blah<br>
blah blah blah blah blah blah blah blah
</p>
</div>
Upvotes: 0