Pen Settings

HTML

CSS

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.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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.

+ add another resource

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                .room
  .window 
    .outside
  .chair
  .desktop
  .bed
  .clock
  .head
  .body
  .hand
  .leg
  .table
  .description life of a programmer
              
            
!

CSS

              
                body {
  text-align:center;
  margin: 20px;
}
.room {
  position: relative;
  display: inline-block;
  width: 500px;
  height: 360px;
  overflow: hidden;
  margin: 0;
  background: #73627d;
  background-image:
repeating-linear-gradient(120deg, rgba(255,255,255,.1), rgba(255,255,255,.1) 1px, transparent 1px, transparent 60px),
repeating-linear-gradient(60deg, rgba(255,255,255,.1), rgba(255,255,255,.1) 1px, transparent 1px, transparent 60px),
linear-gradient(60deg, rgba(0,0,0,.1) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.1) 75%, rgba(0,0,0,.1)),
linear-gradient(120deg, rgba(0,0,0,.1) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.1) 75%, rgba(0,0,0,.1));
background-size: 20px 25px;
}


.room:before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 280px;
    background: #333;
}

@keyframes light { 
    0%{background:#b18202;}
    45%{background:#b18202;}
    50%{background:#efaf02;}
    95%{background:#efaf02;}
    100%{background:#b18202;}
}

body * {
  border-radius: 7px;
  background: #000;
  position: absolute;
}

.window {
  overflow: hidden;
  height: 100px;
  width: 100px;
  right: 100px;
  top: 80px;
  background:#76c2ff;
  animation: outsidelight 12s linear infinite;
  border: 1vmin solid #000;
  border-radius: 0vmin;
}

@keyframes outsidelight { 
    0%{background:#3F51B5;}
    45%{background:#3F51B5;}
    50%{background:#76c2ff;}
    95%{background:#76c2ff;}
    100%{background:#3F51B5;}
}

.outside {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: transparent;
  animation: sunmoon 12s linear infinite;
  position: absolute;
}

@keyframes sunmoon {
  0% {    
    left: -30px;
    top: -30px;
    box-shadow: inset -1vmin -1vmin #fff;
  }
  50% {   
    left: 120px;
    top: 120px;
    box-shadow: inset 0vmin -1vmin #fff;
  }
  50.001% {  
    left: -30px;
    top: -30px;
    box-shadow: inset 0vmin 0vmin 0vmin 5vmin #fff, 0vmin 0vmin 3vmin #fff; 
  }
  100% {    
    left: 120px;
    top: 120px;
    box-shadow: inset 0vmin 0vmin 0vmin 5vmin #fff, 0vmin 0vmin 3vmin #fff; 
  }
}

.window:after {
  z-index: 1;
  content: '';
  position: absolute;
  width: 5px;
  height: 105px;
  background: #000;
  left: 48px;
  top: 0px;
}

.window:before {
  z-index: 1;
  content: '';
  position: absolute;
  width: 100px;
  height: 5px;
  background: #000;
  left: 0px;
  top: 50px;
}

.hand {
  height: 42px;
  width: 15.5px;
  left: 121px;
  top: 189px;
  border-radius: 10.5px;
  transform: rotate(30deg);
}

.hand:after, .hand:before {
  content: '';
  display: block;
  position: absolute;
  background: #000;
  border-radius: 5px;
  top: 34px;
  right: 0px;
  width: 13px;
  height: 37px;
  transform: rotate(60deg);
  animation: typing 0.1s linear infinite;
  transform-origin: top;
}
.hand:before {
  animation: typing 0.5s linear infinite 0.25s;
}

@keyframes typing {
  50% {
    transform: rotate(80deg);
  }
}

.body {
  height: 79px;
  width: 26px;
  left: 139px;
  top: 181px;
  border-radius: 18px;
  transform: rotate(-19deg);
}

.leg {
  height: 52px;
  width: 18px;
  left: 137px;
  top: 226px;
  border-radius: 10px;
  transform: rotate(67deg);
}

.leg:after, .leg:before {
  content: '';
  display: block;
  position: absolute;
  background: #000;
  border-radius: 5px;
  top: 34px;
  right: -10px;
  width: 15px;
  height: 55px;
  transform: rotate(-35deg);
}

.head {
  height: 30px;
  width: 30px;
  left: 115px;
  top: 155px;
  border-radius: 50%;
}

.head:after, .head:before {
    z-index: 1;
    content: '';
    display: block;
    border-radius: 15px;
    background: #fff;
    width: 2.5px;
    height: 2.5px;
    position: absolute;
    top: 12.5px;
    left: 5px;
    animation: blink 1s linear infinite;
}

@keyframes blink {
  100% {height: 1px;}
}

.head:before {
  left: 10px;
}

.bed:before {
    content: '';
    display: block;
    position: absolute;
    background: #c3bdbd;
    border-radius: 5px;
    top: -21px;
    right: 25px;
    width: 35px;
    height: 20px;
    border-radius: 40px 10px;
}

.bed:after {
    content: '';
    display: block;
    position: absolute;
    background: #2d2320;
    border-radius: 5px;
    top: -25px;
    right: 0px;
    width: 25px;
    height: 50px;
}

.bed {
    width: 265px;
    height: 50px;
    right: 22px;
    top: 255px;
    background: #2d2320;
    box-shadow: inset 50px 105px 0px -85px #e0e0e0;
}

.table {
    width: 90px;
    height: 85px;
    left: 23px;
    top: 227px;
    background: #2d2320;
    box-shadow: inset 89px 57px 0px -68px #7b5d52;
}

.desktop:before {
  position: absolute;
  content: '';
  display: block;
  height: 4px;
  width: 25px;
  left: 54px;
  top: 15px;
  transform: rotate(-80deg);
  background: #000;
  border-radius: 5px;
}

.desktop:after {
  position: absolute;
  content: '';
  display: block;
  height: 3px;
  width: 20px;
  left: 47px;
  top: 10px;
  transform: rotate(35deg);
  background: #000;
  border-radius: 10px;
}

.chair {
  height: 15px;
  width: 50px;
  left: 129px;
  top: 247px;
  border-radius: 10px;
}
@import url('https://fonts.googleapis.com/css?family=Indie+Flower');
.description {
  background: transparent;
  text-align: center;
  width: 100%;
  bottom: 10px;
  font-size: 19px;
  color: #aaa;
  font-family: 'Indie Flower';
}

.chair:before {
  position: absolute;
  content: '';
  display: block;
  height: 6px;
  width: 49px;
  left: 10px;
  top: 33px;
  transform: rotate(80deg);
  background: #000;
  border-radius: 10px;
}

.chair:after {
  position: absolute;
  content: '';
  display: block;
  height: 10px;
  width: 60px;
  left: 20px;
  top: -35px;
  transform: rotate(-70deg);
  background: #000;
  border-radius: 10px;
  box-shadow: -75px -20px 0px -2px #000;
}

.clock {
  background: #fff;
  left: 50px;
  top: 50px;
  border-radius: 50%;
  border: 4px solid;
  width: 35px;
  height: 35px;
  position: relative;
}

.clock:after {
  position: absolute;
  width: 2px;
  height: 16px;
  display: block;
  background: #000;
  content: '';
  animation-duration: 0.3s;
}

.clock:before {
  position: absolute;
  width: 2px;
  height: 16px;
  display: block;
  background: #000;
  content: '';
  animation-duration: 6s;
  animation-delay: 2s;
}

.clock:before, .clock:after {
  transform-origin: bottom center;
  animation-name: dial;
  left: 16px;
  top: 2px;
  border-radius: 10px;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

@keyframes dial {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.desktop {
    display: block;
    height: 7px;
    width: 62px;
    left: 23px;
    top: 183px;
    transform: rotate(80deg);
    background: #000;
    border-radius: 0px 0px 53px 53px;
    border-bottom-left-radius: 53px 17px;
    border-bottom-right-radius: 53px 17px;
    animation: screen 0.1s linear infinite;
}

@keyframes screen {
  0% {
    $val: 0px 0px 0px -1px #fff;
    @for $i from 1 through 100 {
      $val: #{$val}, -0px $i*-0.2px 0px -0.8+$i*0.01px rgba(255,255,255, 0.10 - $i*0.001);
    }
    box-shadow: $val;
  }
  100% {
    $val: 0px 0px 0px -1px #fff;
    @for $i from 1 through 300 {
      $val: #{$val}, -0px $i*-0.3px 0px -0.8+$i*0.001px rgba(255,255,255, 0.09 - $i*0.001);
    }
    box-shadow: $val;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console