CSS line break character

Ok, I want this: When the <p> tag ends with </p>, I want to add a character to the end of the line. for instance

<p>Something and more!</p> 

Should look like

Something and more! _

If the character _ _ (underscore) is an added character.
Is this possible with CSS?
Is this also possible at the end of the line?

+6
source share
3 answers

Yes maybe

 p:after{ content:"_"; } 
+5
source

If I understand your question correctly, I think the following works at your discretion:

 p:after { content: '_'; } 

JS Fiddle demo .

Which seems compatible even with IE 8 and above .

+4
source

You can use the :after pseudo- :after :

 p:after { content: '_'; } 

Impossible for each line, since CSS is practically unaware of "lines."

+2
source

Source: https://habr.com/ru/post/900557/


All Articles