Challenge

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

Thumbnail
This awesome code was written by TaraKreft, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright TaraKreft ©
  • HTML
  • CSS
  • JavaScript
    <div id="container">
  <div class="box_1"></div>
  <div class="box_2"></div>
  <div class="box_5"></div>
  <div class="box_3"></div>
  <div class="box_4"></div>
</div>

/*Downloaded from https://www.codeseek.co/TaraKreft/challenge-BjBYEG */
    //vars
$primary: #ff0000;
$secondary: #ffff00;
$tertiary: #0000ff;
$base_width: 100px;
$base_height: 100px;
$secondary_width: 200px;
$secondary_height: 300px;

@mixin margin($margin) {
  -moz-margin: $margin;
  -webkit-margin: $margin;
  margin: $margin;   
  }

#container{
 
  .box_1 {
    width: $base_width;
    height: $secondary_height;
    float: left;
    background: $primary; 
    @include margin(0px);
  }
  
    .box_3 {
    @extend .box_1;  
    width: $secondary_width;
    height: $base_height;
    float: absolute;
    margin-left: -200px;
    background: green;
  }
  
      .box_4 {
    @extend .box_3;  
    width: $secondary_width;
    height: $base_height;
    float: absolute;
    margin-left: -200px;
    margin-top: 100px;
    background: $secondary;
  }
    .box_2 {
    @extend .box_3;  
    width: $base_width;
    background: $tertiary; 
    float: absolute;
    margin-top: 200px;
    margin-left: 0;
  }
  
      .box_5 {
    @extend .box_3;  
    width: $base_width;
    background: $tertiary; 
    float: absolute;
    margin-top: 200px;
    margin-left: 0;
    background: purple;
  }
}  



/*Downloaded from https://www.codeseek.co/TaraKreft/challenge-BjBYEG */
    

Comments