::selection
Written by Kevin Gimbel on 14.10.2012, 🍿 1 min. read
Using ::selection
for fancy selection colors.
::selection {background:#279; color:#fff;}
::-moz-selection {background:#279; color:#fff;}
::-webkit-selection {background:#279; color:#fff;}
Try to select this text, the background will be #279 the color will be #fff.
Also try to select this text. The color will be pink, the background will be black.
This post was imported from my old Tumblr blog I used in 2012.