3
Ich möchte display: flex;
für die Zentrierung verwenden und auch einen ...
Überlauf haben, wenn Text überläuft. Es scheint, dass sobald ich das display: flex
einführe, die Ellipse nicht mehr funktioniert. Irgendwelche Vorschläge, wie man diese zwei kombiniert? JSFiddle: https://jsfiddle.net/silverwind/sw78h02b/1/Kombinieren Text-Überlauf: Ellipse mit Display: flex
.target {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
background: red;
margin: 2rem;
display: flex; /* remove this to get ellipsis to show */
}
<div class="target">
Text here is very very long that it will overflow the width of the containing element. Adding another sentence to make sure it will overflow.
</div>