Traversing HTML tags Tree with CSS selectors - HTML CSS CSS

HTML CSS examples for CSS:Selector

Description

Traversing HTML tags Tree with CSS selectors

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">
.one:hover + .two {<!--  ww w .ja va 2  s.  c o m-->
   color:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <div> 
   <div class="header"> 
    <div id="navbar"> 
     <ul id="nav"> 
      <li class="one"> <a id="trigger">Lorem i</a> </li> 
      <li class="two"> <a id="target">Lorem </a> </li> 
     </ul> 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials