1

Is there a way to add a box-shadow to the ::selection pseudo-element?

*::selection {
  box-shadow: 2px 2px black;
}

seems not to be working.

4

1 回答 1

4

我不相信您可以将 box-shadow 添加到::selection {}.

它接受background-colorcolortext-shadow

例如:

::selection {
    background-color: black;
    color: white;
    text-shadow: 0 0 8px red;
} 
于 2012-08-02T15:25:13.500 回答