Skip to content

Instantly share code, notes, and snippets.

@montyr75
Created January 6, 2014 13:42
Show Gist options
  • Save montyr75/8283038 to your computer and use it in GitHub Desktop.
Save montyr75/8283038 to your computer and use it in GitHub Desktop.
Change text selection colors in a browser with CSS.
/* Chrome */
::-webkit-selection {
background-color: #FF68B0;
color: #FFF;
}
/* Firefox */
::-moz-selection {
background-color: #FF68B0;
color: #FFF;
}
/* Safari */
::selection {
background-color: #FF68B0;
color: #FFF;
}
/* Opera */
::-o-selection {
background-color: #FF68B0;
color: #FFF;
}
/* IE */
::-ms-selection {
background-color: #FF68B0;
color: #FFF;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment