Especifidad en CSS

In this example below you will see how to do a Especifidad en CSS with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by Rambay, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright Rambay ©
  • HTML
  • CSS
  • JavaScript
        <section class="container">
  <div class="box"></div>
  <div class="box azul"></div>
  <div class="box azul"></div>
  <div class="box azul"></div>
  <div class="box azul"></div>
</section>

    

/*Downloaded from https://www.codeseek.co/Rambay/especifidad-en-css-LdEmRq */
        
body {
  background-color: darkcyan;
  font-family: arial;
}

.container{
  display: grid;
  grid-template-columns: 400px 400px 100px 250px;
}

.box {
  width: 100%;
  margin: 0 1em;
  height: 300px;
  background-color: red;
}

.box.azul {
  background-color: blue;
}

    

/*Downloaded from https://www.codeseek.co/Rambay/especifidad-en-css-LdEmRq */
        
    

Comments