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

              
                <h1 class="title">Click</h1>
<div class="card-container">
  <div class="card">
    <div class="card-faces back">
      <div class="logo-back">
        <i class="jedi-icon-back fas fa-jedi"></i>
      </div>
      <h4 class="back-title">l'homme Adam</h4>
      <h4 class="back-sub-title">Developer | Designer</h4>
      <h3 class="back-name">Adam <span class="wizard">Whiz</span></h3>
      <h6 class="back-sub-name">Front-end developer</h6>
      <ul class="back-list">
        <li class="back-list-item"><i class="list-icon fas fa-map-marker-alt"></i> Unit 42, 6 Example Ave, 49418 U.K</li>
        <li class="back-list-item"><i class="list-icon fas fa-mobile-alt"></i> +44 (0)7912 345678</li>
        <li class="back-list-item"><i class="list-icon far fa-envelope"></i> A.Whiz@imagine.com</li>
        <li class="back-list-item"><i class="list-icon fas fa-phone-square"></i>  0800 123 4567</li>
        <li class="back-list-item"><i class="list-icon fas fa-globe"></i> www.twiter.com/AdamTheWizard</li>
      </ul>
      <div class="blue-bar"></div>
    </div>
    <div class="card-faces front">
      <div class="logo">
        <i class="jedi-icon fas fa-jedi"></i>
      </div>
      <h4 class="front-title">l'homme adam</h4>
      <h4 class="front-sub-title">developer | designer</h4>
    </div>
  </div>
</div>
              
            
!

CSS

              
                * {
  margin:0;
  padding:0;
  
}
body {
  padding-top:100px;
  display:flex;
  justify-content:center;
  align-items:center;
  flex-wrap: wrap;
  font-family: 'Open Sans', sans-serif;
}
.title {
  position:absolute;
  bottom:100px;
  text-align:center;
  width:100%;
  font-weight:100;
}
.card-container {
  width:500px;
  height:300px;
  border-radius:15px;
  perspective: 600px;
}
.card {
  position:relative;
  width: 100%;
  height:100%;
  transition:1s ease-in-out;
  transform-style: preserve-3d;
  border-radius:5px;
  box-shadow: 0px 0px 50px #000;
  
}
.card-faces {
  position:absolute;
  height:100%;
  width:100%;
  border-radius:1px;
  backface-visibility: hidden;
    -webkit-backface-visibility: hidden; /* Safari */
}

/*  FRONT STYLES */
/* alternative background "http://www.desktopimages.org/pictures/2014/0303/1/small-black-hexagon-pattern-wallpaper-60021.jpg" */
.front {
  background-color:#000;
  background-image: url("https://i.pinimg.com/originals/db/59/4b/db594b739eb9f298a7c9dfeb64eb4e16.jpg");
  background-size:cover;
  background-position:250px 150px;
  background-repeat: no-repeat;
  box-shadow: inset 0px 200px 350px #000;
}
.logo {
  width:10%;
  height:16.5%;
  border-radius:50%;
  border-top:3px solid #3A3A3C;
  border-left:3px solid #3A3A3C;
  border-right:3px solid #00ADEF;
  border-bottom:3px solid #3A3A3C;
  display:flex;
  justify-content:center;
  align-items:center;
  position:absolute;
  top:40%;
  left:9%;
  transform: scale(1.5);
}

.jedi-icon {
  color:#00ADEF;
  font-size:150%;
}
.front-title {
  position:absolute;
  top:32%;
  left: 25%;
  text-align:center;
  color:#3A3A3C;
  font-size:188%;
  letter-spacing:2px;
  font-family: 'Open Sans', sans-serif;
  border-left:2px solid #3A3A3C;
  padding-left:1.75%;
  line-height:340%;
  align-self:flex-end;
  text-transform:uppercase;
  font-weight:800;
}

.front-sub-title {
  color:#00ADEF;
  align-self:flex-start;
  position:absolute;
  bottom:40%;
  left: 30.5%;
  font-family: 'Open Sans', sans-serif;
  letter-spacing: 3px;
  text-transform:uppercase;
  font-weight:600;
}


/*  BACK STYLES */
.back {
  background-color:#000;
  background-image: url("https://i.pinimg.com/originals/db/59/4b/db594b739eb9f298a7c9dfeb64eb4e16.jpg");
  background-size:cover;
  background-position:-250px 150px;
  background-repeat: no-repeat;
  box-shadow: inset 0px 200px 350px #000;
  transform: rotateY(180deg);
}
.logo-back {
  margin-right:10px;
  width:50px;
  height:50px;
  border-radius:50%;
  border-top:3px solid #3A3A3C;
  border-left:3px solid #3A3A3C;
  border-right:3px solid #00ADEF;
  border-bottom:3px solid #3A3A3C;
  display:flex;
  justify-content:center;
  align-items:center;
  position:absolute;
  top:20px;
  left:20px;
  transform: scale(.75);
}
.jedi-icon-back {
  color:#00ADEF;
  font-size:24px;
}
.back-title {
  position:absolute;
  top:8px;
  left: 40px;
  text-align:center;
  color:#3A3A3C;
  font-size:30px;
  letter-spacing:2px;
  font-family: 'Open Sans', sans-serif;
  border-left:2px solid #3A3A3C;
  padding-left:10px;
  line-height:80px;
  align-self:flex-end;
  text-transform:uppercase;
  backface-visibility: hidden;
  transform: scale(.75);
  font-weight:700;
}
.back-sub-title {
  color:#00ADEF;
  align-self:flex-start;
  position:absolute;
  top:54px;
  left: 62px;
  letter-spacing: 3px;
  backface-visibility: hidden;
  transform: scale(.75);
  text-transform: uppercase;
  font-weight:600;
}

.back-name {
  position:absolute;
  right:5%;
  top:35%;
  color:#fff;
  font-weight:300;
  text-transform:uppercase;
}
.wizard {
  color: #00ADEF;
}
.back-sub-name {
  position:absolute;
  right:5%;
  top:43%;
  color:#3A3A3C;
/*   font-weight:300; */
  font-size: 1em;
}

.back-list {
  list-style:none;
  position:absolute;
  right:5%;
  top: 55%;
}
.back-list-item {
  color:#fff;
  font-size:70%;
}
.list-icon {
  color:#00ADEF;
  padding:4px 5px 4px 0px;
}

.blue-bar {
  position:absolute;
  top:13%;
  right:0;
  width:10px;
  height:220px;
  background: #00ADEF;
}



.card.is-flipped {
  transform: rotateY(180deg);
}
              
            
!

JS

              
                const card = document.querySelector(".card");
const logo = document.querySelector(".logo");

// window.load = flipAuto();
  
//   function flipAuto(){
//   card.classList.add("is-flipped");
// }

document.querySelector(".card-container").onclick = function() {
  
  if (card.classList.contains("is-flipped")) {
    card.classList.remove("is-flipped");
    
  } else {
    card.classList.add("is-flipped");
  }
  
}

              
            
!
999px

Console