Remove a class property with a media query - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Media

Description

Remove a class property with a media query

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">
.tab {<!--   w w  w  . j ava2  s . c o m-->
   display:block;
}

@media screen and (min-width: 600px) {
   .tab {
      display:none;
   }
   
   .tab.selected {
      display:inline-block;
   }

}
</style> 
 </head> 
 <body> 
  <div class="tab selected">
    Lor 
  </div> 
  <div class="tab">
    Lor 
  </div> 
  <div class="tab">
    Lor 
  </div> 
  <div class="tab">
    Lor 
  </div> 
  <div class="tab">
    Lor 
  </div>  
 </body>
</html>

Related Tutorials