cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class='support-grid'></div>
<section class='grid-1'>
  <div class='title'>
    <img src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/merry-xmas.svg'>
  </div>
  <div class='day-1'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>1</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-2'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>2</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-3'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>3</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-4'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>4</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-5'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>5</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-6'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>6</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-7'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>7</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-8'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>8</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-9'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>9</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-10'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>10</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-11'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>11</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-12'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>12</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-13'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>13</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-14'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>14</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-15'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>15</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-16'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>16</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-17'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>17</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-18'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>18</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-19'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>19</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-20'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>20</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-21'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>21</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-22'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>22</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-23'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>23</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
  <div class='day-24'>
    <label>
      <input type='checkbox'>
        <div class='door'>
          <div class='front'>24</div>
          <div class='back'></div>
        </div>
      </input>
    </label>
  </div>
</section>
<footer><a href='http://webdesign.tutsplus.com/tutorials/how-to-build-a-festive-advent-calendar-with-css-grid--cms-30070'>
    Envato Tuts+ 2017 ☃️
  </a>
</footer>
            
          
!
            
              body {
  background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/snow-bg.svg) no-repeat top center #82d8cb;
  background-size: cover;
}

/* title graphic */
.title {  
  display: flex;
  align-items: center;
  justify-content: center; 
}

.title img {
  width: 90%;
  height: auto;
}

/* mobile first grid layout */
.grid-1 {
  display: grid;
  width: 96%;
  max-width: 900px;
  margin: 2% auto;
  
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  grid-gap: 25px;
  
  grid-template-areas:    "t        t       t"
                          "d23      d20     d12"
                          "d2       d14     d4"
                          "d5       d22     d16"
                          "d1       d7      d9"
                          "d10      d11     d18"
                          "d13      d3      d15"
                          "d6       d17     d8"
                          "d19      d24     d21";
}

/* media query */
@media only screen and (min-width: 500px) {
  
  .grid-1 {
    grid-template-columns: repeat(6, 1fr);
    grid-template-areas: "t     t     t     d2      d7      d8"
                         "t     t     t     d4      d11     d12"
                         "t     t     t     d19     d9      d13"
                         "d6    d1    d24   d24     d21     d20"
                         "d17   d18   d24   d24     d5      d22"
                         "d3    d23   d16   d14     d10     d15";
  }
  
}


/* individual items */
  .title {
    grid-area: t;
  }
  .day-1 {
  grid-area: d1;
  }
  .day-1 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/child.svg);
  }
  .day-2 {
    grid-area: d2;
  }
  .day-2 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/donut.svg);
  }
  .day-3 {
    grid-area: d3;
  }
  .day-3 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/santa.svg);
  }
  .day-4 {
    grid-area: d4;
  }
  .day-4 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/child-3.svg);
  }
  .day-5 {
    grid-area: d5;
  }
  .day-5 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/book.svg);
  }
  .day-6 {
    grid-area: d6;
  }
  .day-6 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/snowflake.svg);
  }
  .day-7 {
    grid-area: d7;
  }
  .day-7 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/gift.svg);
  }
  .day-8 {
    grid-area: d8;
  }
  .day-8 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/stocking.svg);
  }
  .day-9 {
    grid-area: d9;
  }
  .day-9 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/gift.svg);
  }
  .day-10 {
    grid-area: d10;
  }
  .day-10 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/bird.svg);
  }
  .day-11 {
    grid-area: d11;
  }
  .day-11 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/snowman.svg);
  }
  .day-12 {
    grid-area: d12;
  }
  .day-12 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/child-2.svg);
  }
  .day-13 {
    grid-area: d13;
  }
  .day-13 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/holly.svg);
  }
  .day-14 {
    grid-area: d14;
  }
  .day-14 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/horse.svg);
  }
  .day-15 {
    grid-area: d15;
  }
  .day-15 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/book.svg);
  }
  .day-16 {
    grid-area: d16;
  }
  .day-16 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/bird.svg);
  }
  .day-17 {
    grid-area: d17;
  }
  .day-17 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/stocking.svg);
  }
  .day-18 {
    grid-area: d18;
  }
  .day-18 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/donut.svg);
  }
  .day-19 {
    grid-area: d19;
  }
  .day-19 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/child.svg);
  }
  .day-20 {
    grid-area: d20;
  }
  .day-20 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/holly.svg);
  }
  .day-21 {
    grid-area: d21;
  }
  .day-21 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/snowflake-2.svg);
  }
  .day-22 {
    grid-area: d22;
  }
  .day-22 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/santa.svg);
  }
  .day-23 {
    grid-area: d23;
  }
  .day-23 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/child-2.svg);
  }
  .day-24 {
    grid-area: d24;
  }
  .day-24 .back {
    background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/210284/tree.svg);
  }


/* door styles */

.grid-1 input {
  display: none;
}

label {
  perspective: 1000px;
  transform-style: preserve-3d;
  cursor: pointer;

  display: flex;
  min-height: 100%;
  width: 100%;
  height: 120px;
}

.door {
  width: 100%;
  transform-style: preserve-3d;
  transition: all 300ms;
  border: 2px dashed transparent;
  border-radius: 10px;
}

  .door div {
    position: absolute;
    height: 100%;
    width: 100%;
    backface-visibility: hidden;
    
    border-radius: 6px;

    display: flex;
    align-items: center;
    justify-content: center;
    
    /* typography */
    font-family: 'Kalam', cursive;
    color: #385052;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2);
  }

  .door .back {
      background-size: contain;
      background-position: center center;
      background-repeat: no-repeat;
      background-color: #2e313d;
      transform: rotateY(180deg);
  }

  label:hover .door {
    border-color: #385052;
  }

  :checked + .door {
    transform: rotateY(180deg);
  }


/* footer styles */
footer {
  text-align: center;
  padding: 2em 0;
}  
  footer a {
      color: #2e313d;
  } 
    footer a:hover {
          text-decoration: none;
    }

            
          
!
999px
Loading ..................

Console