css - Set dot color of `text-overflow: ellipsis` -


I have div with a certain threshold, which contains div Part of the text with text inside is in a span for color. All the necessary styles for text overflow in the text div are finally (alleepicis) with dots, but the dots are not getting the color of span because their Definition is on div

  & lt; Div class = "container" & gt; & Lt; Div class = "text" & gt; Corporate & lt; Span class = "color" & gt; Android Dolar ST Amat, Consetter & lt; / Span & gt; & Lt; / Div & gt; & Lt ;! - Tasks - & gt; & Lt; Div & gt; Corporate & lt; Span class = "text color" & gt; Ipsum dolor sit amet, consetetur & lt; / Span & gt; & Lt; / Div & gt; & Lt ;! - does not work - & gt; & Lt; / Div & gt;  

Is there any clean CSS method to solve this problem? I text-overflow: alipesis; , because the other solutions of text trinkle are somewhat dirty in my opinion.

If I understand your problem properly, then it will work for you:

If the oval is taking the color of the div, then make the div color which you want the elipesis, and to set the initial text black. Use the color .

HTML:

  & lt; Div class = "container" & gt; & Lt; Div class = "text" & gt; & Lt; Span class = "color" & gt; Lorem & lt; / Span & gt; Android Developers Asset, Constantur & lt; / Div & gt; & Lt ;! - works - & gt; & Lt; / Div & gt;  

CSS:

  .text {// Current styles color: # B22227C; } .color {color: black; }  

Comments