CSS nth-child :nth-child(1) - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:nth-child

Description

CSS nth-child :nth-child(1)

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">
#past div:nth-child(1) {
   opacity:0.56;
}

#past div:nth-child(2) {
   opacity:0.61;
}

#past div:nth-child(3) {
   opacity:0.66;
}

#past div:nth-child(4) {
   opacity:0.71;
}

#past div:nth-child(5) {
   opacity:0.76;
}

#past div:nth-child(6) {
   opacity:0.81;
}

#past div:nth-child(7) {
   opacity:0.86;
}

#past div:nth-child(8) {
   opacity:0.91;
}

#past div:nth-child(9) {
   opacity:0.96;
}

#past div:nth-child(10) {
   opacity:2.1;
}
</style> <!-- w  w w .ja  v  a2 s  .co m-->
 </head> 
 <body> 
  <div id="past"> 
   <div>
     Lor 
   </div> 
   <div>
     Lor 
   </div> 
   <div>
     Lor 
   </div> 
   <div>
     Lor 
   </div> 
   <div>
     Lor 
   </div> 
   <div>
     Lor 
   </div> 
   <div>
     Lor 
   </div> 
   <div>
     Lor 
   </div> 
   <div>
     Lor 
   </div> 
   <div>
     Lore 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials