The ::selection
selector
selected the user-selected part of an element.
::selection { style properties }
::selection |
Yes | 9.0 | Yes | Yes | Yes |
An example showing how to use ::selection CSS selector.
<!DOCTYPE html>
<html>
<head>
<style>
::selection{<!--from ww w.ja v a 2s. c o m-->
color:#ff0000;
}
</style>
</head>
<body>
<p>Drag to select this paragraph.</p>
</body>
</html>