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="window">
  <span class="shutters"></span>
  <span class="shutters"></span>
  
  <div class="bird">
    <div class="body"></div>
    <div class="head">
      <span class="crest"></span>
      <span class="wattle"></span>
    </div>
    <span class="tail"></span>
  </div>
  
  <div class="bird">
    <div class="body"></div>
    <div class="head">
      <span class="crest"></span>
      <span class="wattle"></span>
    </div>
    <span class="tail"></span>
  </div>
  
  <div class="bird">
    <div class="body"></div>
    <div class="head">
      <span class="crest"></span>
      <span class="wattle"></span>
    </div>
    <span class="tail"></span>
  </div>
</div>

<h1>The Third Day of CSS-mas</h1>
<p>Press or hover over to open!</p>
            
          
!
            
              $hen-body:#bc7963;
$hen-wing:#965641;
$hen-crest:#c41313;
$hen-eye:#222;
$hen-beak:#ffff00;
$day-text-light:#a5be3e;
$day-text-dark:#567c15;
@mixin pseudo($width,$height) {
  content:"";
  display:block;
  height:$height;
  width:$width;
}

* {
  box-sizing:border-box;
  position:relative;
}
body {
  background:#333;
  background-image:repeating-linear-gradient(90deg,rgba(#5eb3b3,.8),rgba(#5eb3b3,.8) 5vmin,rgba(#c8e6e6,.8) 5vmin,rgba(#c8e6e6,.8) 10vmin);
  font-size:10px;
  height:100%;
  perspective: 1000; /* Thanks to @davidmogar, this makes the shutters actually look like opening shutters. No complex 3d transforms needed! Everyone loves that. =D */
  width:100%;
}
h1 {
  color:#fff;
  font-family:"Playfair Display";
  font-size:2rem;
  font-style:italic;
  margin:1.25rem auto;
  text-align:center;
  text-shadow:0 0 .5rem #000;
}
p {
  color:#fff;
  font-size:1rem;
  text-align:center;
  text-shadow:0 0 .5rem #000;
}
/* Window
--------------------*/
.window {
  background-color:#354d0d;
  background-image:
    radial-gradient(#485f1e 15%,transparent 18%),
    radial-gradient(#3b560e 15%,transparent 18%);
  background-size:2rem 2rem;
  background-position:0 0,1rem 1rem;
  border:2em solid #362f1f;
  height:25rem;
  margin:1rem auto 0;
  width:25rem;
}
.shutters {
  background:#532900;
  border:1px solid #281400;
  float:left;
  height:100%;
  overflow:hidden;
  transition:transform 800ms;
  width:50%;
  z-index:15;
}
.window:hover .shutters, .window:focus .shutters { /* Work on hover or touch. Cancel when input device is outside the window. */
  transform:rotateY(180deg); /* "Opens" the shutters. */
}
.window:hover .shutters:first-child, .window:focus .shutters:first-child {
  transform: rotateY(-180deg);
}
.shutters:nth-child(1) {
  transform-origin:0%; /* Set the "hinge" on the left-hand side. This is necessary because the default origin is 0,0 or center. */
}
.shutters:nth-child(2) {
  transform-origin:100%; /* Set the "hinge" on the right-hand side. */
}
/* day text
--------------------*/
.shutters:after {
  content:"3";
  color:#fff;
  font-family:"Playfair Display";
  font-size:18rem;
  top:-1rem;
  position:absolute;
}
.shutters:nth-child(1):after {
  color:$day-text-light;
  left:61%;
}
.shutters:nth-child(2):after {
  color:$day-text-dark;
  right:61%;
}
.window:hover .shutters:after, .window:focus .shutters:after {
  visibility:hidden;
  transition:visibility 220ms;
}
.window .shutters:after, .window .shutters:after {
  visibility:visible;
  transition:visibility 400ms 220ms;
}
/* Bird
--------------------*/
.bird {
  height:4.5rem;
  margin:2rem 1rem 0; /* Top margin allows for the head and other elements. I should rewrite this section, but I'm kind of busy today. */
  position:absolute;
  width:8rem;
}
.bird:nth-of-type(1) {
  right:1rem;
  top:1rem;
  transform:scaleX(-1);
}
.bird:nth-of-type(2) {
  left:1rem;
  top:20%;
  transform:rotate(45deg);
}
.bird:nth-of-type(3) {
  bottom:1rem;
  right:5rem;
}
.body {
  background:$hen-body;
  border-radius:0 0 10rem 10rem;
  height:100%;
  margin:auto;
  position:relative;
  width:100%;
}
.body:before {
  background:$hen-wing;
  border-radius:0 0 8rem 8rem;
  content:"";
  display:block;
  height:3rem;
  left:.5rem;
  position:absolute;
  top:.5rem;
  transform-origin:100% 0;
  width:6rem;
  z-index:5;
}
.head {
  background:$hen-body;
  border-radius:2rem 2rem 0 2rem;
  border-radius:100%;
  display:block;
  height:2.5rem;
  position:absolute;
  right:-1.5rem;
  top:-1.5rem;
  width:2.5rem;
  z-index:5;
}
.head:before {
  background:$hen-eye;
  border-radius:50%;
  content:"";
  display:block;
  height:.5rem;
  margin:40% auto 0;
  width:.5rem;
}
.head:after {
  border:.4rem solid transparent;
  border-left:.5rem solid $hen-beak;
  position:absolute;
  right:-.8rem;
  top:.9rem;
  z-index:10;
  @include pseudo(0,0); /* Creates a pseudo element with the parameters of width, height */
}
.tail {
  display:block;
  height:2rem;
  position:absolute;
  top:-2rem;
  width:2rem;
}
.tail:before,.tail:after {
  background:$hen-body;
  border-radius:1rem 1rem 0 0;
  bottom:0;
  display:block;
  content:"";
  height:100%;
  position:absolute;
  width:50%;
}
.tail:after {
  height:70%;
  right:0;
}
.bird:nth-of-type(2) .tail {
  top:0;
  left:-1.5rem;
  transform:scaleX(-1) rotate(90deg);
}
.crest {
  background:$hen-crest;
  border-radius:50%;
  display:block;
  height:1rem;
  margin:0 30%;
  position:absolute;
  top:-.5rem;
  width:1rem;
  z-index:-5;
}
.crest:before,.crest:after {
  border-radius:.7rem;
  content:"";
  display:block;
  height:.7rem;
  position:absolute;
  top:.25rem;
  width:.7rem;
}
.crest:before {
  background:$hen-crest;
  margin:0 -.4rem;
  z-index:-1;
}
.crest:after {
  background:$hen-crest;
  margin:0 .8rem;
}
.wattle {
  background:$hen-crest;
  border-radius:0 1rem 1rem 1rem;
  /* box-shadow:.1rem .2rem 0 #9b0f0f; */
  display:block;
  height:1rem;
  right:-1rem;
  top:1rem;
  width:1rem;
}
            
          
!
999px
Loading ..................

Console