选择/突出显示具有不同颜色的文本 [英] selecting/highlighting text with a different color
本文介绍了选择/突出显示具有不同颜色的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何更改突出显示/选择文本的颜色?默认为蓝色.
How do I change the colour of highlight/selection of text? The default is blue.
例如,如果您突出显示/选择此站点上的文本,则该文本为蓝色.但是在 css-tricks.com 上,如果文本已突出显示/选中,则为橙色桃子.
For example, if you highlight/select the text on this site, it is blue. But on css-tricks.com if the text is highlight/selected, it is orange peach.
推荐答案
::selection {
background: #ffb7b7; /* Safari */
}
::-moz-selection {
background: #ffb7b7; /* Firefox */
}
如此处所述:
http://css-tricks. com/overrideing-the-default-text-selection-color-with-css/
这篇关于选择/突出显示具有不同颜色的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文