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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              .ds
 .top
  .inner
 - (1..6).each do |i|
  %div.buttons #{}
 .speaker
 .stick
 .switch
 .home
 .on
            
          
!
            
              
@font-face{
    font-family:Logo;
    font-weight:100;
    src:local(※), url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/383755/Pretendo.woff) format('woff');
}


$w: #eee;
$r: #ce0010;
$b: #231f20;
$t: rgba(255,255,255,0);
$bl: #ef32d9;
$p: #89fffd;

body{
  display:flex;
  width:100%;
  height:100vh;
  justify-content:center;
  align-items:center;
  background:linear-gradient(to bottom, $bl, $p);
  .ds{
    width:60vmin;
    height:50vmin;
    position:relative;
    background:linear-gradient(to bottom, $w, $w 48vmin, darken($w, 5%) 50vmin);
    border-radius:10vmin;
    transform:skewX(-10deg);
    box-shadow:1vmin 1vmin 0 0 darken($w, 5%), 2vmin 1.25vmin 0 0 $r;
    .home{
      position:absolute;
      width:5.5vmin;
      height:2.75vmin;
      bottom:0.25vmin;
      left:calc(50% - 2.5vmin);
      border:0.5vmin solid;
      border-color:darken($w, 10%) darken($w, 10%) darken($w, 5%) darken($w, 5%);
      border-radius:5vmin;
      &:before{
        content:"\f015";
        font-size:3vmin;
        font-family:FontAwesome;
        color:darken($w, 10%);
        position:absolute;
        left:50%;
        top:50%;
        transform:translateX(-50%) translateY(-50%);
      }
    }
    .switch{
      position:absolute;
      right:10vmin;
      bottom:0vmin;
      height:2vmin;
      width:7vmin;
      background:darken($w, 20%);
      &:before{
        content:'';
        position:absolute;
        width:5vmin;
        height:1.75vmin;
        top:0.15vmin;
        background:repeating-linear-gradient(to right, $w, $w 0.4vmin, darken($w, 10%) 0.4vmin, darken($w, 10%) 0.6vmin, $w 0.6vmin);
        left:0.15vmin;
        animation:powerup 10s ease-in-out infinite;
        @keyframes powerup{
          0%{
            transform:translateX(0);
          }
          2%{
            transform:translateX(1.5vmin);
          }
          75%{
            transform:translateX(1.5vmin);
          }
          77%{
            transform:translateX(0);
          }
          100%{
            transform:translateX(0);
          }
        }
      }
    }
    .speaker{
      width:1vmin;
      height:1vmin;
      background:$b;
      position:absolute;
      border-radius:100vmin;
      left:5vmin;
      top:7vmin;
      box-shadow:0 1.5vmin 0 0 $b, 1.5vmin 0 0 $b, 3vmin 0 0 $b, 0vmin 3vmin 0 0 $b, 1.5vmin 3vmin 0 0 $b, 3vmin 1.5vmin 0 0 $b, 1.5vmin 1.5vmin 0 0 $b, 3vmin 3vmin 0 0 $b;
    }
    .on{
      position:absolute;
      width:2.5vmin;
      height:2.5vmin;
      bottom:5vmin;
      right:10vmin;
      border-radius:100vmin;
      box-shadow:0.25vmin 0.25vmin 0 0 darken($w, 10%);
      border:0.1vmin solid darken($w, 5%);
      &:before{
        content:"\f011";
        font-size:2vmin;
        font-family:FontAwesome;
        color:darken($w, 10%);
        position:absolute;
        left:50%;
        top:50%;
        transform:translateX(-50%) translateY(-50%);
      }
      &:after{
        content:'';
        position:absolute;
        width:1vmin;
        height:1vmin;
        border-radius:100vmin;
        background:$b;
        left:5vmin;
        top:calc(50% - 0.5vmin);
        animation:lightup 10s ease-in-out infinite;
        filter:hue-rotate(40deg) brightness(3);
        @keyframes lightup{
          0%{
            background:$b;
            box-shadow:0 0 0 0 $r;
          }
          4%{
            background:$r;
            box-shadow:0 0 0.5vmin 0 $r;
          }
          75%{
            background:$r;
            box-shadow:0 0 0.5vmin 0 $r;
          }
          79%{
            background:$b;
            box-shadow:0 0 0 0 $r;
          }
          100%{
            background:$b;
            box-shadow:0 0 0 0 $r;
          }
        }
      }
    }
    .top{
      position:absolute;
      width:32.5vmin;
      height:20vmin;
      left:calc(50% - 17.5vmin);
      background:$b;
      top:5vmin;
      border:1vmin solid;
      border-color: darken($w, 5%) darken($w, 15%) darken($w, 15%) darken($w, 5%);
      .inner{
        position:absolute;
        left:0.25vmin;
        top:0.25vmin;
        width:32vmin;
        height:19.5vmin;
        background:$w;
        overflow:hidden;
        animation:power 10s ease-in-out infinite;
        @keyframes power{
          0%{
            transform:scaleY(0);
          }
          3%{
            transform:scaleY(1);
          }
          78%{
            transform:scaleY(1);
          }
          80%{
            transform:scaleY(0);
          }
          100%{
            transform:scaleY(0);
          }
        }
        &:before{
          content:'Nintendo';
          left:50%;
          top:50%;
          position:absolute;
          font-family:Logo;
          color:$r;
          font-size:3vmin;
          transform:translateX(-50%) translateY(-50%);
          border:0.5vmin solid $r;
          padding:1vmin 2vmin 0.25vmin 2vmin;
          border-radius:4vmin;
          animation:power2 10s ease-in-out infinite;
          @keyframes power2{
            0%{
              transform:translateX(-50%) translateY(-50%) scaleY(2.5);
            }
            3%{
              transform:translateX(-50%) translateY(-50%) scaleY(1);
            }
            78%{
              transform:translateX(-50%) translateY(-50%) scaleY(1);
            }
            80%{
              transform:translateX(-50%) translateY(-50%) scaleY(2.5);
            }
            100%{
              transform:translateX(-50%) translateY(-50%) scaleY(2.5);
            }
          }
          
        }
      }
      &:after{
        content:'';
        position:absolute;
        width:22.5vmin;
        left:calc(50% - 11.25vmin);
        height:15.5vmin;
        bottom:-20vmin;
        background:$b;
        border:1vmin solid;
        border-color: darken($w, 5%) darken($w, 15%) darken($w, 15%) darken($w, 5%);
      }
      &:before{
        content:'';
        position:absolute;
        left:calc(50% - 1.25vmin);
        width:2.5vmin;
        height:2.5vmin;
        border-radius:100vmin;
        background:$b;
        top:-4.5vmin;
      }
    }
    .buttons{
      position:absolute;
      width:3vmin;
      height:3vmin;
      border-radius:100vmin;
      background:lighten($w, 3%);
      right:5vmin;
      top:15vmin;
      box-shadow:0.25vmin 0.25vmin 0 0 darken($w, 20%);
      &:before{
        content:'X';
        position:absolute;
        left:50%;
        top:50%;
        transform:translateX(-50%) translateY(-50%);
        color:darken($w, 10%);
      }
      &:nth-of-type(2){
        top:20vmin;
        &:before{
          content:'B';
        }
      }
      &:nth-of-type(3){
        top:17.5vmin;
        right:2vmin;
        &:before{
          content:'A';
        }
      }
      &:nth-of-type(4){
        top:17.5vmin;
        right:8vmin;
        &:before{
          content:'Y';
        }
      }
      &:nth-of-type(5), &:nth-of-type(6){
        top:30vmin;
        right:10vmin;
        width:2vmin;
        height:2vmin;
        &:before{
          content:'START';
          font-size:1.25vmin;
          left:5.5vmin;
          line-height:0;
          top:1.25vmin;
        }
        
      }
      &:nth-of-type(6){
        top:33vmin;
        &:before{
          content:'SELECT';
        }
      }
    }
    .stick{
      position:absolute;
      width:5vmin;
      height:5vmin;
      background:darken($w, 15%);
      left:3.5vmin;
      top:17vmin;
      border-radius:100vmin;
      box-shadow:inset -0.5vmin 0.5vmin 1vmin 0 darken($w, 30%), 0.25vmin -0.25vmin 0 0.25vmin darken($w, 10%), -0vmin 0.25vmin 0 0.25vmin darken($w, 30%), 0 0 0.75vmin 2vmin $w, 0.25vmin -0.25vmin 0vmin 2vmin darken($w, 20%);
      &:before{
        content:'';
        position:absolute;
        bottom:-9vmin;
        height:6vmin;
        width:2vmin;
        left:50%;
        transform:translateX(-50%);
        background:linear-gradient(to bottom, $t, $t 2vmin, darken($w, 5%) 2vmin, darken($w, 5%) 4vmin, $t 4vmin, $t 5.5vmin, darken($w, 15%) 5.5vmin), linear-gradient(to right, darken($w, 5%), darken($w, 5%) 1.5vmin, darken($w, 15%) 1.5vmin);
      }
      &:after{
        content:'';
        position:absolute;
        height:2vmin;
        width:6vmin;
        bottom:-7vmin;
        left:50%;
        transform:translateX(-50%);
        background:linear-gradient(to right, $t, $t 2vmin, darken($w, 5%) 2vmin, darken($w, 5%) 3.5vmin, $t 4vmin, $t 5.5vmin, darken($w, 15%) 5.5vmin), linear-gradient(to bottom, darken($w, 5%), darken($w, 5%) 1.5vmin, darken($w, 15%) 1.5vmin);
      }
    }
  }
  
}
            
          
!
999px
Loading ..................

Console