CSS Text hightlight没有空格(CSS Text hightlight without space)
嘿,我想知道在突出文本只影响单词时css(或者javascript)是否可能? (没有在空间之间)
例如,在本网站loungelizard.com中可以看到
#somediv::selection{background: #ffb7b7;}到目前为止,这只会改变整个文本选择的颜色
Hey I was wondering if it's possible in css(or maybe javascript) when highlighting the text to affect only the words? (without the in between space)
For example as seen in this website loungelizard.com
#somediv::selection{background: #ffb7b7;}thus far this only change the whole text-selected color
最满意答案
也许是这样的:
p::selection { background-color: transparent; color: red; } div { color: white; background: blue; }<div> <p>Some great text.</p> </div>Maybe something like:
p::selection { background-color: transparent; color: red; } div { color: white; background: blue; }<div> <p>Some great text.</p> </div>
更多推荐
发布评论