Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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.
我不相信您可以将 box-shadow 添加到::selection {}.
::selection {}
它接受background-color:color和text-shadow。
background-color
color
text-shadow
例如:
::selection { background-color: black; color: white; text-shadow: 0 0 8px red; }