Change the text selection color with CSS3 In WordPress

Change the text selection color with CSS3 In WordPress

Although this little trick CSS3 is not very important to your project or design of your WordPress blog, but it's a fantastic effect that really takes your wordpress theme a little further and makes your blog original and different from other blogs.

Whenever a person selects a text, its color changes into another defined color. For example, on my blog theme, selecting the text, you will notice the blue color theme instead of the default colors.

Currently, most internet browsers support the text section attribute and browsers that do not support it will simply ignore this code so as not to break anything.

How To Change The Text Selection Color ?


Open the style.css file of your WordPress theme and add the following styles:

::-moz-selection {
 background-color: #ff6200;
 color: #fff;
}
::selection {
 background-color: #ff6200;
 color: #fff;
}
You can change the color #ff6200 by any other text selection color to match the color of your wordpress theme.
It's really that simple.
Go ahead and have fun with CSS3 and style of the selected text in your wordpress blog.
Leave a comment for showing us the result that it gives to your blog ;)
Change the text selection color with CSS3 In WordPress Change the text selection color with CSS3 In WordPress Reviewed by Blogging Chimp on May 15, 2015 Rating: 5

No comments:

Powered by Blogger.