HTML CSS examples for CSS Selector:class
Using pseudo class selectors to change content
<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>