Reputation: 78971
Is it possible to change the background color and foreground color (or text color) of the highlighted portion in a HTML page? In another words, customize the hightlighting of our Webpage
Upvotes: 1
Views: 96
Reputation: 382626
If I understand you correctly, you are looking for these styles:
::selection
(General)::-moz-selection
(For Mozilla)::-webkit-selection
(For Webkit)More Info:
Upvotes: 3
Reputation: 51431
Only with CSS3 (modern browsers only, obviously), if you want to use pure CSS.
http://css-tricks.com/overriding-the-default-text-selection-color-with-css/
Upvotes: 2