Using pseudo class selectors to change content - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:class

Description

Using pseudo class selectors to change content

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">
p:hover span {
   display:none
}

p:hover:before {<!-- w w w .j av a 2s .c o  m-->
   content:"Second text here!";
   color:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <p> <span>Lorem ipsum dolo</span> </p>  
 </body>
</html>

Related Tutorials