HTML CSS examples for CSS Widget:Hover Link
CSS3 Transition on Hyperlink Hover
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #main {<!-- w w w .j a va 2 s.co m--> -webkit-transition:opacity 0.4s; -moz-transition:opacity 0.4s; -ms-transition:opacity 0.4s; -o-transition:opacity 0.4s; transition:opacity 0.4s; height:401px; width:401px; background:red } #main:not(:hover) { opacity:0.4; } a:hover + #main { opacity:0.6; } </style> </head> <body> <a href="#">Lorem ipsum dolor sit ame</a> <div id="main"> </div> </body> </html>