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.

            
              input#view(type="checkbox" checked)
.wrap
  input.control#one(type='radio' name="control")
  label.slide(for="one" style="background-image: url(https://unsplash.it/g/1400/1000/?image=1014)")
    .name Rose
    .inner-trigger-wrap
      label.inner-trigger(for="view") zoom 
  input.control#two(type='radio' name="control" )
  label.slide(for="two" style="background-image: url(https://unsplash.it/g/1400/1000/?image=942)")
    .name Caprio
    .inner-trigger-wrap
      label.inner-trigger(for="view") zoom
  input.control#three(type='radio' name="control")
  label.slide(for="three" style="background-image: url(https://unsplash.it/g/1400/1000/?image=874)")
    .name Montague
    .inner-trigger-wrap
      label.inner-trigger(for="view") zoom
  input.control#four(type='radio' name="control")
  label.slide(for="four" style="background-image: url(https://unsplash.it/g/1400/1000/?image=809)")
    .name Diamond
    .inner-trigger-wrap
      label.inner-trigger(for="view") zoom
  input.control#five(type='radio' name="control")
  label.slide(for="five" style="background-image: url(https://unsplash.it/g/1400/1400/?image=22)")
    .name Revenant
    .inner-trigger-wrap
      label.inner-trigger(for="view") zoom
  input.control#six(type='radio' name="control")
  label.slide(for="six" style="background-image: url(https://unsplash.it/g/1400/1000/?image=618)")
    .name Django
    .inner-trigger-wrap
      label.inner-trigger(for="view") zoom




a(href="http://nathan.tokyo" target="_blank").sig NATHAN.TOKYO
            
          
!
            
              $hue: 454270;

$white: hsl($hue, 0%, 100%);
$black: hsl($hue,90%,20%);
$invert: hsl($hue+180,90%,20%);
$grey: hsl($hue,40%,80%);


$time: 800ms;
$ease: cubic-bezier(0.860, 0.000, 0.070, 1.000);;
$ease-out: cubic-bezier(0.215, 0.610, 0.355, 1.000);


$sans: 'Kanit', sans-serif;

body{
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: $white;
  font-family: $sans;
  counter-reset: section;
}


.slide{
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  height: 65vh;
  width: 65vw;
  background: $black;
  transform: translate3d(-150%,-50%,0) scale(0.8);
  transition: transform $time $ease, box-shadow $time $ease;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  background-blend-mode: exclusion;
  box-shadow: 0vw 1vh 2vw rgba($invert, 0);
  &:after{
      font-family: $sans;
      counter-increment: section;
      content: counter(section);
      position: absolute;
      font-size: 50vh;
      font-weight: 600;
      bottom: -15vh;
      left: -5vw;
      color: $black;
      mix-blend-mode: overlay;
      opacity: 0;   
      transform: translatey(15%);
      transition: opacity $time/2 linear, transform $time*10 $ease-out;
  }
  .name{
    position: absolute;
    right: -1vw;
    bottom: 40vh;
    font-size: 15vh;
    font-family: $sans;
    color: white;
    //opacity: 0;
    mix-blend-mode: difference;
    text-transform: uppercase;
    font-weight: 800;
    opacity: 0;
    transform: translatey(-20%);
    transition: opacity $time/2 linear, transform $time*10 $ease-out;
  }
  .inner-trigger-wrap{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
  .inner-trigger{
    position: absolute;
    top: 0;
    left: -5vw;
    height: 150%;
    width: 110%;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    font-size: 28vw;
    text-transform: uppercase;
    font-weight: 800;
    line-height: 20vh;
    background: rgba($invert,0.5);
    color: $white;
    transition: opacity $time $ease, transform $time $ease;
    user-select: none;
    text-decoration: underline;
    transform: translateY(-30%);
    mix-blend-mode: overlay;
  }
}
.control{
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 15px;
  cursor: pointer;
  outline: none;
  transition: background $time $ease;
  position: absolute;
  bottom: 10vh;
  left: 50%;
  transition: opacity $time $ease, border $time $ease, background $time $ease;
  border: 1px solid transparent;
  &:nth-child(1){
    transform: translatex(-242%) rotate(45deg)
  }
  &:nth-child(3){
    transform: translatex(-145%) rotate(45deg);
  }
  &:nth-child(5){
    transform: translatex(-48%) rotate(45deg);
  }
  &:nth-child(7){
    transform: translatex(48%) rotate(45deg);
  }
  &:nth-child(9){
    transform: translatex(145%) rotate(45deg);
  }
  &:nth-child(11){
    transform: translatex(242%) rotate(45deg);
  }
  &:nth-child(4n-3){
    border-left: 1px solid $grey;
    border-top: 1px solid $grey;
    &:checked{
     //border: 1px solid transparent;
      border-right: 1px solid rgba($grey, 0.6);
      border-bottom: 1px solid rgba($grey, 0.6);
    }
  }
  &:nth-child(4n-1){
    border-bottom: 1px solid $grey;
    border-right: 1px solid $grey;
    &:checked{
     // border: 1px solid transparent;
      border-left: 1px solid rgba($grey, 0.6);
      border-top: 1px solid rgba($grey, 0.6);
    }
  }
  &:hover{
    background: rgba($grey, 0.2);
  }

}

.control:checked + .slide{
  transform: translate3d(-50%,-50%,0) scale(1);
  z-index: 2;
  cursor: initial;
  box-shadow: 0vw 1vh 3vh rgba(darken($invert,10%), 0.2);
  &:after, .name{
    opacity: 1;   
    transform: translatey(0%);
    transition-delay: $time;
  }
}
.control:checked + .slide ~ .slide{
  transform: translate3d(50%,-50%,0) scale(0.8);
  z-index: -1;
  cursor: pointer;
}
.control:checked + .slide + .control + .slide{
  transform: translate3d(50%,-50%,0) scale(0.8);
  z-index: 1;
  cursor: pointer;
}


#view{
  position: absolute;
  left: 5vh;
  top: 5vh;
  transform: translatex(-100%) translatey(-100%);
  z-index: 2;
  appearance: none;
  width: 3vh;
  height: 3vh;
  border: 1px solid $grey;
  cursor: pointer;
  outline: none;
  transition: opacity $time $ease;
  &:checked{
    opacity: 0;
    pointer-events: none;
    transition: opacity $time $ease;
    
  }
}
#view:checked ~ .wrap{
  .control{
    opacity: 0;
  }
  .slide{
    z-index: 1;
    &:nth-child(2){
      transform: translate3d(-100%,-90%,0px) scale(0.45);
    }
    &:nth-child(4){
     transform: translate3d(-50%,-80%,0px) scale(0.45);
    }
    &:nth-child(6){
      transform: translate3d(-0%,-90%,0px) scale(0.45);
    }
    &:nth-child(8){
      transform: translate3d(-100%,-10%,0px) scale(0.45);
    }
    &:nth-child(10){
      transform: translate3d(-50%,-20%,0px) scale(0.45);
    }
    &:nth-child(12){
      transform: translate3d(-0%,-10%,0px) scale(0.45);
    }
  }
  .control:checked + .slide{
    z-index: 2;
    .name, &:after{
      opacity: 0;
      opacity: 0;   
      transform: translatey(15%);
    }
    .name{
      transform: translatey(-15%);
    }
    &:nth-child(2){
      transform: translate3d(-100%,-80%,0px) scale(0.5);
    }
    &:nth-child(4){
     transform: translate3d(-50%,-90%,0px) scale(0.5);
    }
    &:nth-child(6){
      transform: translate3d(-0%,-80%,0px) scale(0.5);
    }
    &:nth-child(8){
      transform: translate3d(-100%,-20%,0px) scale(0.5);
    }
    &:nth-child(10){
      transform: translate3d(-50%,-10%,0px) scale(0.5);
    }
    &:nth-child(12){
      transform: translate3d(-0%,-20%,0px) scale(0.50);
    }
  }
  .control:checked + .slide .inner-trigger{
    display: block;
    z-index: 3;
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
    transform: translateY(0%);
  }
}

.instruction{
  position: absolute;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity $time $ease;
}

.sig{
  position: fixed;
  bottom: 8px;
  right: 8px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 100;
  font-family: sans-serif;
  color: rgba(0,0,0,0.4);
  letter-spacing: 2px;
  user-select: none;
}
            
          
!
999px
Loading ..................

Console