![]() ![]() Opera may choose to support it, I suppose, but they are not obligated to do so. Using color:#DFDCDC for this will not change the color of the highlighted text. As said in the article above, “background is the only property that works”, so declaring a color is just added typing. What you can do for some extra flair, is change the selection color for different paragraphs or different sections of the page.Īll I did was use different selection color for paragraphs with different classes: p.red::selection. Within the selection selector, color and background are the only properties that work. It’s a nice touch for those using modern browsers, but it just gets ignored in other browsers and it’s not a big deal.īackground: #ffb7b7 /* WebKit/Blink Browsers */īackground: #ffb7b7 /* Gecko Browsers */ Fortunately, this can be thought of as one of those “forward-enhancement” techniques. At the time of this writing, only Safari and Firefox are supporting this, and both in slightly different ways. One of those cool CSS3 declarations that you can use today is ::selection, which overrides your browser-level or system-level text highlight color with a color of your choosing.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |