CSS ::after with ::selection - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:after

Description

CSS ::after 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">
::-moz-selection<!--   ww  w . ja  va2  s .com-->
 {
   background:red;
   color:Chartreuse;
}

::selection
 {
   background:red;
   color:yellow;
}

img {
   -o-user-select:none;
   -moz-user-select:none;
   -webkit-user-select:none;
   user-select:none;
}
</style> 
 </head> 
 <body> 
  <div>
    Lorem ipsum dolor sit amet, consectetur adip 
   <img src="https://www.java2s.com/style/demo/Firefox.png">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamc 
  </div>  
 </body>
</html>

Related Tutorials