CSS First Letter Highlighting

懵懂的女人 提交于 2019-11-26 17:23:49

问题


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

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

However upon using this code it is impossible to highlight/select these "First Letters" from the web browser, is there a way to amend this?

Edit - It is possible to select the text, however it isn't shown visually, how can I change this?


回答1:


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




回答2:


Right, it is not visually selected but in the background it is. If I select and copy and then paste it, I get "Hello" so this just might be a problem with the different font-sizes. font-variant:small-caps works perfectly (but uses uppercase).

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



来源:https://stackoverflow.com/questions/16592632/css-first-letter-highlighting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!