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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

            
              <div class="intro-wrapper">
  <div class="intro-logo-wrapper">
    <div class="intro-logo" style="background:transparent url('http://verhoevenwout.be/wp-content/uploads/2017/07/logo-big.png') center top no-repeat;"></div>
    <h3>Curabitur aliquet quam id dui posuere blandit.</h3>
  </div>
  <div class="intro-grid-overlay"></div>
  <div class="intro-grid">
    <a class="grid-image-link" href="#"><div class="grid-img" style="background:transparent url('http://verhoevenwout.be/wp-content/uploads/2017/07/1.jpeg') center top no-repeat; background-size:cover;"><div class="grid-image-overlay"></div></div></a>
    <a class="grid-image-link" href="#"><div class="grid-img" style="background:transparent url('http://verhoevenwout.be/wp-content/uploads/2017/07/2.jpeg') center top no-repeat; background-size:cover;"><div class="grid-image-overlay"></div></div></a>
    <a class="grid-image-link" href="#"><div class="grid-img" style="background:transparent url('http://verhoevenwout.be/wp-content/uploads/2017/07/3.jpeg') center top no-repeat; background-size:cover;"><div class="grid-image-overlay"></div></div></a>
    <a class="grid-image-link" href="#"><div class="grid-img" style="background:transparent url('http://verhoevenwout.be/wp-content/uploads/2017/07/4.jpeg') center top no-repeat; background-size:cover;"><div class="grid-image-overlay"></div></div></a>
    <a class="grid-image-link" href="#"><div class="grid-img" style="background:transparent url('http://verhoevenwout.be/wp-content/uploads/2017/07/5.jpeg') center top no-repeat; background-size:cover;"><div class="grid-image-overlay"></div></div></a>
    <a class="grid-image-link" href="#"><div class="grid-img" style="background:transparent url('http://verhoevenwout.be/wp-content/uploads/2017/07/6.jpeg') center top no-repeat; background-size:cover;"><div class="grid-image-overlay"></div></div></a>
    <a class="grid-image-link" href="#"><div class="grid-img" style="background:transparent url('http://verhoevenwout.be/wp-content/uploads/2017/07/7.jpeg') center top no-repeat; background-size:cover;"><div class="grid-image-overlay"></div></div></a>
    <a class="grid-image-link" href="#"><div class="grid-img" style="background:transparent url('http://verhoevenwout.be/wp-content/uploads/2017/07/8.jpeg') center top no-repeat; background-size:cover;"><div class="grid-image-overlay"></div></div></a>
    <a class="grid-image-link" href="#"><div class="grid-img" style="background:transparent url('http://verhoevenwout.be/wp-content/uploads/2017/07/9.jpeg') center top no-repeat; background-size:cover;"><div class="grid-image-overlay"></div></div></a>
    <a class="grid-image-link" href="#"><div class="grid-img" style="background:transparent url('http://verhoevenwout.be/wp-content/uploads/2017/07/10.jpeg') center top no-repeat; background-size:cover;"><div class="grid-image-overlay"></div></div></a>
  </div>

  <div class="overlay-content-container opacity0 no-pointer-events">
    <span class="go-back-button">Go back</span>
    <button class="btn draw-border">Donate</button>
    <h3>William Davison</h3>
    <p>Curabitur aliquet quam id dui posuere blandit. Proin eget tortor risus. Curabitur aliquet quam id dui posuere blandit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel.</p>
  </div>
</div>
            
          
!

CSS

            
              


/* JS ANIMATION CLASSES */

.expand-full-screen{
  position: absolute;
  width: 100vw!important;
  height: 100vh!important;
  top: 0!important;
  left: 0!important;
  z-index: 999;
}
.active-grid-image-overlay{
  opacity: .3!important;
}
.opacity0{opacity: 0;}
.z-index-10{z-index: 10;}

/* HEADER */
html, body{
  margin: 0;
  overflow-x: hidden;

  text-transform: uppercase;
  font-family: 'Nunito', sans-serif;
  text-align: center;
  color: #FFFFFF;
}
header{
  display: none;
}
/* INTRO WRAPPER */

.intro-wrapper {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.what-can-we-do-wrapper {
  position: absolute;
  bottom: 20px;
  text-align: center;
  width: 100%;
  img {
    width: 20px;
    transition: all .3s;
  }
  a {
    pointer-events: auto;
    &:hover > img {
      transform: translateY(5px);
      transition: all .3s;
    }
  }
}

/*.what-can-we-do-wrapper a:hover{
  opacity: .8;
}*/

/* GRID IMAGE */

.intro-background-wrapper {
  z-index: 0;
}
.intro-logo-wrapper{
  transition: all .6s;
  h3{
    color: #fff;
    font-size: 22px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 30%;
    margin: auto;
    pointer-events: none;
    transition: all .6s;
    z-index: 9999999;
  }
  .intro-logo{
    position: absolute;
    height: 200px;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    margin: auto;
    z-index: 9999999;
    pointer-events: none;
    transition: all .6s;
  }
}
.intro-grid-overlay{
  position: absolute;
  width: 100%;
  height: 100%;
  /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#000000+0,000000+100&0.6+15,0+80 */
  background: -moz-radial-gradient(center, ellipse cover, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.6) 15%, rgba(0,0,0,0) 80%, rgba(0,0,0,0) 100%); /* FF3.6-15 */
  background: -webkit-radial-gradient(center, ellipse cover, rgba(0,0,0,0.6) 0%,rgba(0,0,0,0.6) 15%,rgba(0,0,0,0) 80%,rgba(0,0,0,0) 100%); /* Chrome10-25,Safari5.1-6 */
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%,rgba(0,0,0,0.6) 15%,rgba(0,0,0,0) 80%,rgba(0,0,0,0) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#99000000', endColorstr='#00000000',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
  pointer-events: none;
  z-index: 5;
  -webkit-backface-visibility: hidden;
}
.intro-grid {
  width: 100vw;
}
.grid-image-overlay {
  /*position: absolute;*/
  width: 100%;
  height: 100%;
  /*width: 33.33333333333vw;
  height: 50vh;*/
  background-color: #700066;
  opacity: 0;
  transition: all .3s;
}

.intro-gradient{
  position: absolute;
  top:0;bottom:0;left:0;right:0;margin:auto;
  background: -moz-linear-gradient(0deg, rgba(0, 0, 0, 0.39) 0%, transparent 60%, transparent 84%);
  background: -webkit-gradient(linear, left top, right top, color-stop(0%, black), color-stop(60%, transparent), color-stop(84%, transparent));
  background: -webkit-linear-gradient(0deg, rgba(0, 0, 0, 0.39) 0%, transparent 60%, transparent 84%);
  background: -o-linear-gradient(0deg, rgba(0, 0, 0, 0.39) 0%, transparent 60%, transparent 84%);
  background: -ms-linear-gradient(0deg, rgba(0, 0, 0, 0.39) 0%, transparent 60%, transparent 84%);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.39) 0%, transparent 60%, transparent 84%);
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#000000',GradientType=1 );
  pointer-events: none;
  z-index: 9999;
}

// $elements: 10;
// @for $i from 0 to $elements {
//   .grid-img:nth-child(#{$i}) {
//       left: $i * 20%;
//   }
// }
.intro-grid {
  & .grid-image-link:nth-child(1){& .grid-img{left: 0%}}
  & .grid-image-link:nth-child(2){& .grid-img{left: 20%}}
  & .grid-image-link:nth-child(3){& .grid-img{left: 40%}}
  & .grid-image-link:nth-child(4){& .grid-img{left: 60%}}
  & .grid-image-link:nth-child(5){& .grid-img{left: 80%}}

  & .grid-image-link:nth-child(6){& .grid-img{left: 0%}}
  & .grid-image-link:nth-child(7){& .grid-img{left: 20%}}
  & .grid-image-link:nth-child(8){& .grid-img{left: 40%}}
  & .grid-image-link:nth-child(9){& .grid-img{left: 60%}}
  & .grid-image-link:nth-child(10){& .grid-img{left: 80%}}
  & .grid-image-link:nth-child(n+6){& .grid-img{top: 50%;}}
  .grid-img {
    width: 20vw;
    height: 50vh;
    // float: left;
    transition: all .6s;
    position: absolute;
    &:hover {
      cursor: pointer;
      > .grid-image-overlay {
        opacity: .3;
      }
    }
  }
}

.start-kenburns {
  animation: kenburns 20s infinite;
}
@keyframes kenburns {
  0% {
    opacity: 1;
  }

  5% {
    opacity: 1;
  }

  50% {
    transform: scale3d(1.2, 1.2, 1.2) translate3d(25px, -25px, 0px);
    animation-timing-function: ease-in;
    opacity: 1;
  }

  100% {
    transform: scale3d(1, 1, 1) translate3d(-0px, 0px, 0px);
    opacity: 1;
  }
}

/* OVERLAY CONTENT */
.no-pointer-events{
  pointer-events: none;
}
.overlay-content-container{
  position: absolute;
  width: calc(100vw - 100px);
  height: 100vh;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  text-align: center;
  z-index: 999;
  transition: all .3s;
  .go-back-button{
    font-size: 20px;
    position: absolute;
    left: 0;
    top: 20px;
    -webkit-transition: all .3s;
    -o-transition: all .3s;
    transition: all .3s;
    &:hover{
      color: #e7e7e7;
      cursor: pointer;
    }
  }
  h3{
    font-size: 50px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 40%;
    margin: auto;
    transition: all .3s;
  }
  p{
    font-size: 16px;
    position: absolute;
    margin: auto;
    left: 0;
    right: 0;
    bottom: 150px;
    transition: all .3s;
  }
}


/* BUTTON */
@mixin btn-border-drawing($color: #ccc, $hover: black, $width: 2px, $vertical: top, $horizontal: left, $duration: 0.25s) {
  box-shadow: inset 0 0 0 $width $color;
  // color: $color;
  transition: color $duration $duration/3;
  position: relative;
  &::before,
  &::after {
    border: 0 solid transparent;
    box-sizing: border-box;
    content: '';
    pointer-events: none;
    position: absolute;
    width: 0; height: 0;
    #{$vertical}: 0;
    #{$horizontal}: 0;
  }

  &::before {
    $h-side: if($horizontal == 'left', 'right', 'left');
    border-#{$vertical}-width: $width;
    border-#{$h-side}-width: $width;
  }

  &::after {
    $v-side: if($vertical == 'top', 'bottom', 'top');
    border-#{$v-side}-width: $width;
    border-#{$horizontal}-width: $width;
  }

  &:hover {
    // color: $hover;
    color: #fff;
    &::before,
    &::after {
      border-color: $hover;
      transition: border-color 0s, width $duration, height $duration;
      width: 100%;
      height: 100%;
    }
    &::before { transition-delay: 0s, 0s, $duration; }
    &::after { transition-delay: 0s, $duration, 0s; }
  }
}

.draw-border {
  @include btn-border-drawing(#fff, #ff67e6, 2px, bottom, right);
}

//=== Button styling, semi-ignore
.btn {
  position: absolute;
  bottom: 50px;
  left: 0;
  right: 0;
  width: 200px;
  margin: auto;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1.5;
  font-size: 18px;
  padding: 20px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #fff;

  &:focus { outline: 2px dotted #55d7dc; }
}

            
          
!

JS

            
              $('.grid-image-link').click(function(){
  $('.intro-logo').addClass('opacity0');
  $('.intro-logo-wrapper h3').addClass('opacity0');

  $(this).find('.grid-img').addClass('z-index-10');
  $('.overlay-content-container').removeClass('no-pointer-events');
  $(this).find('.grid-img').addClass('expand-full-screen');
  $('.grid-image-overlay').addClass('active-grid-image-overlay');
  setTimeout(function(){
    $('.overlay-content-container').removeClass('opacity0');
  }, 600);
});

$('.overlay-content-container .go-back-button').click(function(){
  resetAnimation();
});

function resetAnimation(){
  $('.intro-logo').removeClass('opacity0');
  $('.intro-logo-wrapper h3').removeClass('opacity0');

  $('.overlay-content-container').addClass('no-pointer-events');
  $('.grid-img').removeClass('expand-full-screen');
  $('.grid-image-overlay').removeClass('active-grid-image-overlay');
  $('.overlay-content-container').addClass('opacity0');
  setTimeout(function(){
    $('.grid-img').removeClass('z-index-10');
  }, 600);
}
            
          
!
999px

Console