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 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

              
                <!-- TEXT THAT IS GREYED OUT INDICATED A COMMENT IN THE CODE. PLEASE READ THE COMMENTS AS, IN THIS TEMPLATE, THEY ARE NOTES TO YOU ABOUT HOW TO ALTER THIS /PEOPLE CARD IN A WAY THAT WILL REMAIN COMPATIBLE WITH THE COURSE WEBSITE! -->
<html>
  
<head>
  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.css">
</head>

<!-- Replace Kanye's name *and* the id this this card (currently id='kanyewest') with your own, and include your partner's information and links in the HTML below.  You can change the icons by using Font Awesome icons here: https://fortawesome.github.io/Font-Awesome/ -->
<body id="people">
  <div id='kanyewest' class='person flip-container'>
    <div class='flipper'>
      <div class='front card'>
        <h2>Kanye West</h2>
        <div class='headshot'></div>
        <i class="fa fa-undo flip"></i>
      </div>
      <div class='back card'>
        <ul>
          <li><i class="fa fa-home"></i><a href='http://www.kanyewest.com/'>kanyewest.com</a>
          </li>
          <li><i class="fa fa-github"></i><a href='https://github.com/kanyewest'>kanyewest</a>
          </li>
          <li><i class="fa fa-twitter"></i><a href='https://twitter.com/kanyewest'>@kanyewest</a>
          </li>
          <li><i class="fa fa-envelope"></i><a href='mailto:k@kwest.com'>k@kwest.com</a>
          </li>
          <li><i class="fa fa-youtube"></i><a href='https://www.youtube.com/watch?v=GIfUmGxSgpY&t=8m18s'>KanyeWestVEVO</a>
          </li>
        </ul>
        <i class="fa fa-undo flip"></i>
      </div>
    </div>
  </div>
</body>

</html>
              
            
!

CSS

              
                /* TEXT THAT IS GREYED OUT INDICATED A COMMENT IN THE CODE. PLEASE READ THE COMMENTS AS, IN THIS TEMPLATE, THEY ARE NOTES TO YOU ABOUT HOW TO ALTER THIS /PEOPLE CARD IN A WAY THAT WILL REMAIN COMPATIBLE WITH THE COURSE WEBSITE! */

/* Be sure to replace the '#kanyewest' selector with one referring to your partner's name/ID (e.g. '#yourpartner') and add CSS effects for your card here */

#kanyewest .headshot {
  background-image: url(http://media.cmgdigital.com/shared/img/photos/2014/10/27/2d/9e/kanye-west-smile.jpg);
}



/*********************************
***Don't change below this line*** **********************************/
html {
    font-size: 1.375em;
}
@font-face {
    font-family: 'Latin Modern Roman';
    src: url('https://s3.amazonaws.com/dgmde15githubio/lmroman10-regular-webfont.eot');
    src: url('https://s3.amazonaws.com/dgmde15githubio/lmroman10-regular-webfont.eot?#iefix') format('embedded-opentype'), url('https://s3.amazonaws.com/dgmde15githubio/lmroman10-regular-webfont.woff') format('woff'), url('https://s3.amazonaws.com/dgmde15githubio/lmroman10-regular-webfont.ttf') format('truetype'), url('https://s3.amazonaws.com/dgmde15githubio/lmroman10-regular-webfont.svg#latin_modern_roman10_regular') format('svg');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Latin Modern Roman', Georgia, 'Times New Roman', Times, serif;
    color: #333;
}

.person {
    width: calc((70ex - 2*1em)/3);
    height: calc((70ex - 2*1em)/3);
    margin-right: 1em;
    margin-bottom: 1em;
    float: left;
}
.person:first-child, .person:nth-child(3n+1) {
    margin-left: 0;
}
.person:nth-child(3n) {
    margin-right: 0;
}
#people h2 {
    text-align: center;
    text-transform: lowercase;
    font-family: 'Latin Modern Roman', Georgia, 'Times New Roman', Times, serif;
    font-variant: small-caps;
    line-height: 1em;
    font-size: 1.25em;
    margin-bottom: 0.25em;
    width: 100%;
    margin: 0;
    padding: 0;
}
.front, .back {
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 0 0.5em #000;
    border-radius: 0.5em;
}
.card i.flip {
    position: absolute;
    top: 85%;
}
/**********************/
/* front of the cards */

.front.card {
    background-color: #aaa;
    z-index: 2;
    transform: rotateY(0deg);
}
.person .headshot {
    box-shadow: inset 0 0 0.625em #000;
    width: 6.5em;
    height: 6.5em;
    background-size: cover;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    top: 3.75%;
}
/*********************/
/* back of the cards */

.back.card {
    background-color: #ccc;
    transform: rotateY(180deg);
}
.back ul {
    padding:0;
}
.back li {
    list-style-type: none;
    padding-left: 1ex;
}
.back li i.fa {
    margin-right: 1ex;
}
#people .back {
    padding: 0.25em;
}
#people .back li {
    margin-bottom: 0.5em;
    margin-left: 0;
    line-height: 0.75em;
}
#people .back li a {
    font-family: 'Inconsolata', monospace;
    font-size: 0.875em;
}
/***********************************/
/* Flipping behavior for the cards */

i.flip {
    cursor: pointer;
    position: relative;
    top: 5px;
    left: calc((70ex - 2*1em)/3 - 4.25em);
}
.flip-container {
    perspective: 1000;
}
.flip-container.flipped .flipper {
    transform: rotateY(180deg);
}
.flipper {
    transition: 0.6s;
    transform-style: preserve-3d;
    position: relative;
    width: 100%;
    height: 100%;
}
              
            
!

JS

              
                // TEXT THAT IS GREYED OUT INDICATED A COMMENT IN THE CODE. PLEASE READ THE COMMENTS AS, IN THIS TEMPLATE, THEY ARE NOTES TO YOU ABOUT HOW TO ALTER THIS /PEOPLE CARD IN A WAY THAT WILL REMAIN COMPATIBLE WITH THE COURSE WEBSITE! 

// Add your Javascript effects here.


// Below this line, you must change the id below ('#kanyewest') to reflect the id you created in the html panel for your partner ('#yourpartner')
window.addEventListener('load', function() {
  var myCard = document.querySelector('#kanyewest');
  var flipButtons = Array.prototype.slice.call(myCard.querySelectorAll('i.flip'));
  flipButtons.forEach(function(button) {
    button.addEventListener('click', function() {
      myCard.classList.toggle('flipped');
    });
  });
});
              
            
!
999px

Console