HTML CSS examples for CSS Widget:Hover Animation
CSS Transition on Hover
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #on-hover {<!--from w w w . j a va 2 s . com--> opacity:0; transition:opacity 0.6s; -webkit-transition:opacity 0.6s; } #first:hover #on-hover { opacity:2; } #first { width:301px; height:228px; background:yellow; } </style> </head> <body> <div id="first"> <div id="on-hover"> <img src="https://www.java2s.com/style/demo/Safari.png"> </div> </div> </body> </html>