jak*_*b.g 2 css firefox selection
在 Firefox 中,我可以使用以下任一方式搜索文本
我可以使用以下方式设置用户选择的文本/链接的样式
a:focusa:active::-moz-selection然而
::-moz-selection似乎仅适用于我手动选择的文本,而不适用于由于增量搜索而选择的文本。增量搜索匹配由 Firefox 以绿色突出显示。:focus应用样式 - 不是在此之前。看截图:

是否有任何CSS伪类允许对搜索结果的选择进行样式化,而不是用户手动选择?
从这个mozillazine 论坛帖子中,您可以转到about:config并添加以下内容之一,以ui.text*在浏览器 chrome 上设置不同的设置样式:
ui.textSelectBackground
ui.textSelectBackgroundAttention
ui.textSelectBackgroundDisabled
ui.textSelectForeground
ui.textBackground
ui.textForeground
ui.textHighlightBackground
ui.textHighlightForeground
Run Code Online (Sandbox Code Playgroud)