Code Snippets

Change Text Selection Color With CSS

Comments (1)
  1. tzi says:


    Thanks for sharing your discoveries.

    I can complete it a bit.
    There is only the “-moz-” vendor, others do not exist:

    The folowing lines are good enough:
    /* Mozilla based browsers */
    ::-moz-selection {
    background-color: #FF68B0;
    color: #FFF;
    /* Works in IE, chrome, safari & opera */
    ::selection {
    background-color: #FF68B0;
    color: #FFF;


Leave a Reply

Your email address will not be published. Required fields are marked *