Gradient Background Color: Select

is there a way to add gradient color in CSS :: selection?

if i use something like this:

::selection { background-image: -webkit-linear-gradient(left, #ee4037 0%, #eb297b 100%); } 

he does not work...

+5
source share
1 answer

No.

Per mdn

In the rule, you can use only a small subset of CSS properties using :: selection in your selector: color, background color, cursor, outline, text design, color accent text and text shadow. Note that, in particular, the background image is ignored, like any other property.

+7
source

Source: https://habr.com/ru/post/1236915/


All Articles