CSS Selector ::selection
Description
The ::selection
selector
selected the user-selected part of an element.
Example
<!DOCTYPE html>
<html>
<head>
<style>
::selection{<!-- w w w. j av a2 s. com-->
color:#ff0000;
}
</style>
</head>
<body>
<p>Drag to select this paragraph.</p>
</body>
</html>
The code above generates the following result.