CSS3 Transition on Hyperlink Hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover Link

Description

CSS3 Transition on Hyperlink Hover

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">
#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>

Related Tutorials