How to select text except the first letter?

I know that ::first-letter selects the first letter of the -level block.

How can I select all text except the first letter?

I tried :not(::first-letter) , but didn't select anything.

+6
source share
1 answer

:not can only be applied to simple selectors . Pseudo-elements are not simple selectors , so you cannot invert them.

You can apply non-first letter styles to the entire text and cancel them for the first letter.

For instance:

 p { color: red; text-transform: uppercase; } p::first-letter { color: black; text-transform: none; } 
 <p>red capitals except the first letter.</p> 
+8
source

All Articles