Turn off selection with ::selection - HTML CSS CSS

HTML CSS examples for CSS:Selector

Description

Turn off selection with ::selection

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
::selection {<!-- w  ww  .  j  ava  2s.  c om-->
   color:Chartreuse;
   background:green;
}

::selection {
   color:yellow;
   background:initial;
}
</style> 
 </head> 
 <body> 
  <p>Lore</p>  
 </body>
</html>

Related Tutorials