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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

              
                <header></header>
<section class="speakers">
  <div class="tab">Talks by</div>
  <div class="speaker box1">
    <div class="front">
      <h2 class="h6">First Lastname</h2>
      <p class="view small">view bio</p>
      <img src="https://placeimg.com/625/350/animals">
    </div>
    <div class="back">
      <h3>Backside Headline</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa molestias temporibus, similique voluptatum repellat qui exercitationem, esse doloribus explicabo nihil facere, eaque dolor, inventore magni et. Deleniti cum atque odit.</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Libero commodi quasi, iusto sit, quo et! Asperiores adipisci libero omnis tempore reiciendis dignissimos, eius iusto quae architecto exercitationem iure aut placeat. Lorem ipsum dolor sit
        amet, consectetur adipisicing elit. Ullam architecto in, nemo reprehenderit ratione autem dolore maiores illum quidem harum laborum dignissimos cum culpa fugiat quas modi doloremque beatae unde.</p>
      <a class="close" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><line x1="1" y1="1" x2="39" y2="39"></line><line x1="1" y1="39" x2="39" y2="1"></line></svg></a>
    </div>
  </div>
  <div class="speaker box2">
    <div class="front">
      <h2 class="h6">First Lastname</h2>
      <p class="view small">view bio</p>
      <img src="https://placeimg.com/625/350/arch">
    </div>
    <div class="back">
      <h3>Backside Headline</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugiat corporis enim veritatis dolores delectus iure facilis ratione quasi consequatur autem, tempore harum eveniet ducimus? Praesentium laudantium, animi illum reprehenderit placeat!</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quis commodi quaerat iusto cum tempora, aliquam natus officia obcaecati magni quod eligendi, neque, vel, minima voluptatibus distinctio error qui laudantium reprehenderit.</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nostrum, molestias dicta earum adipisci repellendus suscipit ea, veniam sed quidem ullam doloremque dolores error, rem officiis ipsum eveniet nulla, iure accusantium!</p>
      <a class="close" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><line x1="1" y1="1" x2="39" y2="39"></line><line x1="1" y1="39" x2="39" y2="1"></line></svg></a>
    </div>
  </div>
  <div class="speaker">
    <div class="front">
      <h2 class="h6">First Lastname</h2>
      <p class="view small">view bio</p>
      <img src="https://placeimg.com/625/350/nature">
    </div>
    <div class="back">
      <h3>Backside Headline</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Delectus a quo id, magni ad corrupti neque necessitatibus doloremque asperiores suscipit rerum minima ullam, ipsum quidem modi atque quod. Repellat, sed.</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sequi neque ullam nisi blanditiis deserunt beatae necessitatibus tempora doloremque et repudiandae porro perspiciatis voluptatibus, maiores animi ipsa, fuga culpa nemo debitis. Lorem ipsum
        dolor sit amet, consectetur adipisicing elit. Ipsum optio tempora quis architecto quaerat nobis voluptate, modi doloribus quia quasi, saepe dignissimos cupiditate illo quibusdam! Quas nulla quia eum veritatis? Lorem ipsum dolor sit amet, consectetur
        adipisicing elit. Voluptate minus quam eum iste eaque, aut cumque est maiores minima deleniti doloribus excepturi, ratione, dignissimos quasi mollitia eligendi, illo magnam amet.</p>
      <a class="close" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><line x1="1" y1="1" x2="39" y2="39"></line><line x1="1" y1="39" x2="39" y2="1"></line></svg></a>
    </div>
  </div>
  <div class="speaker">
    <div class="front">
      <h2 class="h6">First Lastname</h2>
      <p class="view small">view bio</p>
      <img src="https://placeimg.com/625/350/people">
    </div>
    <div class="back">
      <h3>Backside Headline</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis assumenda quaerat, vitae modi, nesciunt temporibus error alias! Impedit eos libero quo nam sint nobis aperiam, maxime est, ullam labore blanditiis?</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sint, ad dolorum tempora excepturi laboriosam ex minus vel fugit velit quibusdam repellendus accusamus, eaque dolore nisi, voluptatum doloribus nemo aliquid voluptatem.</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est dolor nulla autem tempore labore ducimus, voluptatum obcaecati, voluptas earum maxime possimus. Doloribus nulla, porro quo nam repellendus omnis optio eveniet.</p>
      <a class="close" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><line x1="1" y1="1" x2="39" y2="39"></line><line x1="1" y1="39" x2="39" y2="1"></line></svg></a>
    </div>
  </div>
  <div class="speaker">
    <div class="front">
      <h2 class="h6">First Lastname</h2>
      <p class="view small">view bio</p>
      <img src="https://placeimg.com/625/350/tech">
    </div>
    <div class="back">
      <h3>Backside Headline</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Placeat ut eveniet esse saepe, cumque id ullam eius suscipit repellat mollitia illo doloribus aspernatur inventore, voluptatum ratione cupiditate voluptatibus, at iusto!</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro sequi consectetur quam odio debitis! Sequi pariatur repudiandae velit tenetur, illo unde nam obcaecati modi corporis, eum autem harum labore delectus?</p>
      <a class="close" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><line x1="1" y1="1" x2="39" y2="39"></line><line x1="1" y1="39" x2="39" y2="1"></line></svg></a>
    </div>
  </div>
  <div class="speaker">
    <div class="front">
      <h2 class="h6">First Lastname</h2>
      <p class="view small">view bio</p>
      <img src="https://placeimg.com/625/350/nature">
    </div>
    <div class="back">
      <h3>Backside Headline</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Delectus a quo id, magni ad corrupti neque necessitatibus doloremque asperiores suscipit rerum minima ullam, ipsum quidem modi atque quod. Repellat, sed.</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sequi neque ullam nisi blanditiis deserunt beatae necessitatibus tempora doloremque et repudiandae porro perspiciatis voluptatibus, maiores animi ipsa, fuga culpa nemo debitis. Lorem ipsum
        dolor sit amet, consectetur adipisicing elit. Laboriosam sunt saepe consequuntur, dolore est labore blanditiis officia, ab possimus assumenda odio fuga tenetur, delectus ullam corrupti nulla explicabo inventore commodi!Lorem ipsum dolor sit amet,
        consectetur adipisicing elit. Deleniti atque culpa nobis esse consequuntur architecto, fugit dolor odit nihil saepe maxime officia aliquam a consectetur suscipit ea doloribus adipisci tenetur.</p>
      <a class="close" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><line x1="1" y1="1" x2="39" y2="39"></line><line x1="1" y1="39" x2="39" y2="1"></line></svg></a>
    </div>
  </div>
  <div class="speaker">
    <div class="front">
      <h2 class="h6">First Lastname</h2>
      <p class="view small">view bio</p>
      <img src="https://placeimg.com/625/350/animals">
    </div>
    <div class="back">
      <h3>Backside Headline</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa totam dicta ex odio commodi accusamus atque aspernatur iste necessitatibus sit rerum cum beatae quas harum consectetur, animi perferendis id, sapiente.</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloremque, magnam eligendi aliquid porro, suscipit libero exercitationem maiores natus corporis iusto quam mollitia molestias deserunt est. Maxime iste ad aliquid, laboriosam.</p>
      <a class="close" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><line x1="1" y1="1" x2="39" y2="39"></line><line x1="1" y1="39" x2="39" y2="1"></line></svg></a>
    </div>
  </div>
  <div class="speaker">
    <div class="front">
      <h2 class="h6">First Lastname</h2>
      <p class="view small">view bio</p>
      <img src="https://placeimg.com/625/350/tech/nature">
    </div>
    <div class="back">
      <h3>Backside Headline</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa totam dicta ex odio commodi accusamus atque aspernatur iste necessitatibus sit rerum cum beatae quas harum consectetur, animi perferendis id, sapiente.</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloremque, magnam eligendi aliquid porro, suscipit libero exercitationem maiores natus corporis iusto quam mollitia molestias deserunt est. Maxime iste ad aliquid, laboriosam. Lorem ipsum
        dolor sit amet, consectetur adipisicing elit. Et voluptate, suscipit? Ex sint animi, voluptatibus placeat, reprehenderit, fugit, ullam necessitatibus eos nam atque magnam autem eius beatae molestias. Nam, nemo.</p>
      <a class="close" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><line x1="1" y1="1" x2="39" y2="39"></line><line x1="1" y1="39" x2="39" y2="1"></line></svg></a>
    </div>
  </div>
  <div class="speaker">
    <div class="front">
      <h2 class="h6">First Lastname</h2>
      <p class="view small">view bio</p>
      <img src="https://placeimg.com/625/350/people">
    </div>
    <div class="back">
      <h3>Backside Headline</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Corporis assumenda quaerat, vitae modi, nesciunt temporibus error alias! Impedit eos libero quo nam sint nobis aperiam, maxime est, ullam labore blanditiis? Lorem ipsum dolor sit amet, consectetur
        adipisicing elit. Aspernatur hic, in sequi error autem asperiores voluptatum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consequatur veritatis voluptate ut, quas saepe pariatur maxime ipsa quam corporis, itaque tempora distinctio,
        mollitia facilis possimus! Voluptatem facere perspiciatis magnam assumenda. A voluptatum blanditiis, fuga nesciunt corrupti enim sed odit, quam, aut libero quo doloribus.</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sint, ad dolorum tempora excepturi laboriosam ex minus vel fugit velit quibusdam repellendus accusamus, eaque dolore nisi, voluptatum doloribus nemo aliquid voluptatem.</p>
      <a class="close" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><line x1="1" y1="1" x2="39" y2="39"></line><line x1="1" y1="39" x2="39" y2="1"></line></svg></a>
    </div>
  </div>
  <div class="speaker">
    <div class="front">
      <h2 class="h6">First Lastname</h2>
      <p class="view small">view bio</p>
      <img src="https://placeimg.com/625/350/arch">
    </div>
    <div class="back">
      <h3>Backside Headline</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa molestias temporibus, similique voluptatum repellat qui exercitationem, esse doloribus explicabo nihil facere, eaque dolor, inventore magni et. Deleniti cum atque odit.</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Libero commodi quasi, iusto sit, quo et! Asperiores adipisci libero omnis tempore reiciendis dignissimos, eius iusto quae architecto exercitationem iure aut placeat.</p>
      <a class="close" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><line x1="1" y1="1" x2="39" y2="39"></line><line x1="1" y1="39" x2="39" y2="1"></line></svg></a>
    </div>
  </div>
  <div class="speaker">
    <div class="front">
      <h2 class="h6">First Lastname</h2>
      <p class="view small">view bio</p>
      <img src="https://placeimg.com/625/350/animals">
    </div>
    <div class="back">
      <h3>Backside Headline</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa totam dicta ex odio commodi accusamus atque aspernatur iste necessitatibus sit rerum cum beatae quas harum consectetur, animi perferendis id, sapiente. Lorem ipsum dolor sit amet, consectetur
        adipisicing elit. Cumque perspiciatis, fugiat dolorem consequuntur, non fugit eum vero, veritatis aliquid repellendus rem eligendi quidem, quae! Dicta magnam repellat iure sapiente reprehenderit.</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloremque, magnam eligendi aliquid porro, suscipit libero exercitationem maiores natus corporis iusto quam mollitia molestias deserunt est. Maxime iste ad aliquid, laboriosam.</p>
      <a class="close" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><line x1="1" y1="1" x2="39" y2="39"></line><line x1="1" y1="39" x2="39" y2="1"></line></svg></a>
    </div>
  </div>
  <div class="speaker">
    <div class="front">
      <h2 class="h6">First Lastname</h2>
      <p class="view small">view bio</p>
      <img src="https://placeimg.com/625/350/nature">
    </div>
    <div class="back">
      <h3>Backside Headline</h3>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Delectus a quo id, magni ad corrupti neque necessitatibus doloremque asperiores suscipit rerum minima ullam, ipsum quidem modi atque quod. Repellat, sed. Lorem ipsum dolor sit amet, consectetur
        adipisicing elit. Nobis, soluta, facilis? Totam possimus, iste illo, quasi atque distinctio ipsam numquam voluptate ipsum porro fuga optio voluptates nostrum! Illum, veritatis quis.</p>
      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sequi neque ullam nisi blanditiis deserunt beatae necessitatibus tempora doloremque et repudiandae porro perspiciatis voluptatibus, maiores animi ipsa, fuga culpa nemo debitis. Lorem ipsum
        dolor sit amet, consectetur adipisicing elit. Culpa excepturi dolore neque et saepe pariatur architecto dignissimos labore quidem officia, unde, incidunt ipsa blanditiis reiciendis facilis minima ut voluptatibus rem.</p>
      <a class="close" href="#"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><line x1="1" y1="1" x2="39" y2="39"></line><line x1="1" y1="39" x2="39" y2="1"></line></svg></a>
    </div>
  </div>
</section>
<footer>footer text in here</footer>
              
            
!

CSS

              
                //Dependancies
@import "bourbon";
@import "neat"; 

// MIXINGS
@mixin base-animation {
    @include transition-property(all);
    @include transition-timing-function(ease-in-out);
    @include transition-duration(0.25s);
}

@mixin nice-easing-animation {
    @include transition-property(all);
    @include transition-timing-function(cubic-bezier(0.4, 0, 0.2, 1));
    @include transition-duration(0.25s);
}

@mixin absolute-vertical-center($height:100%) {
    margin: auto;
    position: absolute;
    top: 0; 
    bottom: 0; 
    height: $height;
}

@mixin absolute-vert-horz-center($height:100%) {
    margin: auto;
    position: absolute;
    top: 0; 
    bottom: 0; 
    left: 0; 
    right: 0;
    height: $height;
}

// Colors
$black: #0A0A0A;
$grey-dark: #222222;
$grey: #58595B;
$grey-border: #e2e2e2;
$grey-light: #E7E7E7;
$blue-dark: #16153E;
$blue: #8BC9EE;
$magenta: #EC008C;
$white-bg: #F5F5F5; 
$white: #FFF;

body {
  -webkit-font-smoothing: antialiased;
  background: $blue-dark;
  padding-top: 50px;
  line-height: 1.3;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1;
}

header {
  position: fixed;
  background-color: $black;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  text-align: center;
  z-index: 9999;
}

footer {
  position: fixed;
  text-align: center;
  width: 100%;
  bottom: 0;
  padding: 10px 0;
  background:$black;
  color: $blue;
  font-size: 14px;
  z-index: 9999;
}

section {
  width: 100%;
  position: relative;
}

// Section Tabs
.tab {
    position: absolute;
    top: 20px;
    z-index: 2;
    left: 0;
    text-transform: uppercase;
    /* font-family: $font-bold; */
    color: $white;
    background-color: $black;
    padding: 10px 15px;
    font-size: 0.8em;
    text-align: left;

    &:before {
        content: '//';
        color: $magenta;
        padding-right: 5px;
    }
}

.close {
    @include base-animation;
    @include transform(rotate(0deg));
    @include transform-origin(center center);
    position: absolute;
    cursor: pointer;
    width: 40px;
    height: 40px;
    top: 0;
    right: 0;
    background: $blue;
    z-index: 2001;

    svg {
        position: absolute;
        stroke: #FFF;
        stroke-width: 1px;
        top: 7px;
        left: 7px;
        width: 25px;
    }
}

// view bio styling for speakers and hosts
p.view {
    @include base-animation;
    @include transform(translateY(5px));
    position: absolute;
    text-transform: uppercase;
    width: 100%;
    margin: 0 5px 0 0;
    opacity: 0;
    visibility: hidden;
    bottom: 0;
    z-index: 1;

    &:hover {
        cursor: pointer;
    }

    &:after {
        @include transition-property(all);
        @include transition-timing-function(cubic-bezier(0.4, 0, 0.2, 1));
        @include transition-duration(0.25s);
        @include transition-delay(0.25s);
        font-family: FontAwesome;
        content: "\f178";
        position: relative;
        left: 0;
        z-index: 1;
    }
}

.speaker {
    @include base-animation;
    @include transform-style(preserve-3d);
    @include transform(translatez(0));
    perspective: 1000px;
    overflow: hidden;
    position: relative;
    width: 100%;
  
    &:hover {
        img { @include transform(scale(1.2)); }

         h2 { @include transform(translateY(-15px)); }

         p.view {
            @include transform(translateY(-7px));
            visibility: visible;
            opacity: 1;
           
            &:after { left: 8px;}
        }
    }
  
    .front,
    .back {
      @include backface-visibility(hidden);
      display: block;
      position: absolute;
      z-index: 0;
    }
  
    .front {
      color: $white;
      text-align: center;
      h2 {margin-bottom: 0;}
    }
  
    .back {
      @include transform(rotateY( -180deg) scale(0.5));
      width: 100%;
      height: 100%;
      overflow-y: auto;
      background: $white;
      color: $blue-dark;
      text-align: left;
      padding: 25px;
      visibility: hidden;
    }

    img {
        @include base-animation;
        @include transform(scale(1));
        width: 100%;
        height: auto;
        display: block;
    }

    h2 {
        @include base-animation;
        @include transform(translateY(0));
        -webkit-font-smoothing: subpixel-antialiased;
        position: absolute;
        bottom: 10px;
        width: 100%;
        z-index: 1;
    }
}

@media screen and (min-width: 480px) {
  
  section.speakers {height: 109vw;}

    .speaker {
        float: left;
        display: block;
        width: 50%;
        height: 25%;
    }
  
}

@media screen and (min-width: 768px) {
  
}

@media screen and (min-width: 1024px) {

  section.speakers {height: 27vw;}

    .speaker {
        width: 25%;
        height: 50%;
    }
}

@media screen and (min-width: 1920px) {
  
}
              
            
!

JS

              
                var flippy = {};

flippy.init = function() {
  //flippy variables
  flippy.speakers = $('.speaker');
  flippy.currentAnimation = new TimelineLite();
  // run functions
  flippy.flipCards();
}

flippy.flipCards = function() {

    flippy.speakers.each(function() {
      var thisBox = $(this);
      var cardFront = thisBox.find('.front');
      var cardBack = thisBox.find('.back');

      var width = thisBox.outerWidth();
      var height = thisBox.outerHeight();
      var xPos = ($(window).width() / 2) - (thisBox.offset().left + width / 2);
      var yPos = ($(window).height() / 2) - (thisBox.offset().top + height / 2);

      if ($(window).width() > 480) {
        height = height * 1.5;
        width = width * 1.5;
      }
      var speakerFlipTL = new TimelineMax({paused: true })
      	.to(this, 0.25, {zIndex: 9999, overflow: 'initial',x: xPos, y: yPos,ease: Power3.easeOut }, "sync")
      	.to(cardFront, 0.5, {rotationY: -180, zIndex: 9999,ease: Power3.easeOut }, "sync")
      	.to(cardBack, 0.5, {autoAlpha: 1, rotationY: 0,scale: 1, width: width,height: height, zIndex: 9999,left: "50%", top: "50%",xPercent: -50, yPercent: -50,ease: Power3.easeOut }, "sync")
      	.set(this, {className: "+=flipped"})
				
      //flip card when you click on the 'view' button
      thisBox.on('click touchstart', 'p.view', function(e) {
        //play currentAnimation backwards twice as fast
        flippy.currentAnimation.reverse().timeScale(2);
        //assign new currentAnimaiton and play it at normal speed
        flippy.currentAnimation = speakerFlipTL.play().timeScale(1);  
      });

      //flip card back when you click on the 'close' link
      thisBox.on('click touchstart', 'a.close', function(e) {
        e.preventDefault();
        speakerFlipTL.reverse();
      });

      //flip card back when you press the escape key
      $(document).on('keyup', function(e) {
        if (e.which == 27) {
          speakerFlipTL.reverse();
        }
      });

    }); // end of flippy.speakers.each

  } // end of flippy.flipCards

// DOC READY
$(function() {
  flippy.init();
});
              
            
!
999px

Console