CSS First Letter Highlight

I understand that with CSS formatting, the first letter of each paragraph is possible through:

p:first-letter { font-size:20px; } 

However, when using this code, it is impossible to select / select these "First letters" from a web browser, is there any way to change this?

Edit - You can select text, but it does not appear visually, how can I change this?

+8
html css pseudo-element
source share
2 answers

This is a bug in Chrome / ium / WebKit: https://code.google.com/p/chromium/issues/detail?id=17528

+5
source share

That's right, it's not visually selected, but in the background. If I select and copy, and then paste it, I will get "Hello", so this may be a problem with different font sizes. font-variant: small-caps works fine (but uses uppercase).

You might want to try Lettering.js or alternatives http://letteringjs.com/ https://github.com/davatron5000/Lettering.js

+1
source share

All Articles