Get default selection color?

后端 未结 2 1139
陌清茗
陌清茗 2021-01-07 07:37

I can change the CSS selection color, but how can I get the browser/OS default selection so that I can use it elsewhere?

e.g. on Ubuntu+Chrome text is highl

2条回答
  •  甜味超标
    2021-01-07 07:54

    I think that for what you want is better if you use Javacript combined with CSS.

    You could check this post https://stackoverflow.com/a/11752084/8379001 that shows how to find out the os and applies it to CSS.

提交回复
热议问题