4 ms·
OT: How did they change the color of highlighted text? I've never seen that effect before! Edit: Found it in case someone else was interested: /* Mozilla
by iamjustlooking 16y ago
OT: How did they change the color of highlighted text? I've never seen that effect before!
Edit:
Found it in case someone else was interested:
/* Mozilla based browsers */
::-moz-selection{background-color:#e12000;color:#fff;}
/* Works in Safari */
::selection{background-color:#e12000;color:#fff;}
- wahnfrieden 16y agoKeep in mind that many users highlight text as they read, so don't use some color that makes your text more unreadable.
- sudont 16y agoRight. And also keep in mind that Firefox will change the selection color based on the inherent background color of the element being selected. So, if you've got a black background of a super-parent element, and an light-colored image background for the parent or the element, your text will highlight white, ensuring that selected text is unreadable in certain situations. Either the posted hack or setting a background color fixes it.
- wahnfrieden 16y agoSeems like a much better solution would be to set a light-colored background color to the element which has the background image.