Select span during hover state - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:hover

Description

Select span during hover state

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">
a {<!--from   w  ww . j av a  2 s .c  o m-->
   background:red;
   float:left;
   color:Chartreuse;
}

a span {
   display:block
}

a:hover span {
   background:url('http://www.java2s.com/style/demo/Google-Chrome.png');
   background:yellow;
}
</style> 
 </head> 
 <body> 
  <a href="#"> <span>Link 1</span> </a>  
 </body>
</html>

Related Tutorials