"~" (tilde/squiggle/twiddle) CSS selector usage - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:id

Description

"~" (tilde/squiggle/twiddle) CSS selector usage

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 + .b {
   background-color:Chartreuse;
}
</style> <!--from  ww w  .ja  va  2  s  . c  o  m-->
 </head> 
 <body> 
  <ul> 
   <li class="a">Lor</li> 
   <li class="b">Lor</li> 
   <li>Lor</li> 
   <li class="b">Lor</li> 
   <li class="a">Lor</li> 
  </ul>  
 </body>
</html>

Related Tutorials