HTML CSS examples for CSS Widget:Hover Image
Hover text and replace with image
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .fancy {<!--from www .ja va2 s . c o m--> display:block; width:456px; height:316px; background:Chartreuse; } .fancy:hover { background:url('https://www.java2s.com/style/demo/Google-Chrome.png') } .fancy:hover .text { display:none; } </style> </head> <body> <a class="fancy"> <span class="text">Lore</span> </a> </body> </html>