Hover effect for underlying elements - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover Effect

Description

Hover effect for underlying elements

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">
img {<!--from   www .j  a v a 2 s  .  co m-->
   width:100px;
   z-index:3;
   border:3px solid Chartreuse;
}

img+img {
   margin-left:-41px;
}

img:hover {
   border:3px solid yellow;
}
</style> 
 </head> 
 <body> 
  <img src="https://www.java2s.com/style/demo/Firefox.png"> 
  <img src="https://www.java2s.com/style/demo/Safari.png"> 
  <img src="https://www.java2s.com/style/demo/Firefox.png"> 
  <img src="https://www.java2s.com/style/demo/Safari.png">  
 </body>
</html>

Related Tutorials