Change Color of Highlighted Text on your Website Using CSS


/ Published in: CSS
Save to your folder(s)

Found this one interesting!
We have gotten used to the usual blue background when you highlight text on most websites. However, now you have the power as a web designer to change that background and text color to one of your choice. Simply using CSS!


Copy this code and paste it in your HTML
  1. ::-moz-selection {
  2. background: #FF5E99;
  3. color:#fff;
  4. text-shadow: none; }
  5.  
  6. ::selection {
  7. background:#FF5E99;
  8. color:#fff;
  9. text-shadow: none; }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.