Using CSS mask-image you can truncate texts with a smooth fade effect.
Ali
Visit on X@alicalimli_dev23K followers
13,705 views
Using CSS mask-image you can truncate texts with a smooth fade effect.
It looks clean and it's a great alternative to text ellipsis.
.text-container {
overflow: hidden;
white-space: nowrap;
-webkit-mask-image: linear-gradient(
to right, black 50%, transparent);
mask-image: linear-gradient(
to right, black 50%, transparent);
}
}
If you found this one useful, follow for more! ❤️
Comments
Comments from the original post on X (Twitter)
No comments yet
