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

Quick-add: + add another resource

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.

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.

              <section class="card trans">
  <article class="front">
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/11087/optimus.jpg" alt="Optimus Prime" height="100" width="100">
    <h1>Optimus Prime</h1>
    <button class="btn-one">View profile</button>
  <article class="back">
    <p><b>Optimus Prime</b> is a character from the Transformers franchise.</p>
    <p>Prime is the leader of the Autobots, a faction of transforming robots from the planet Cybertron.</p>
    <button class="btn-one">Close</button>


<section class="card ani">
  <article class="front">
      <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/11087/megatron.jpg" alt="Optimus Prime" height="100" width="100">
    <button class="btn-two">View profile</button>
  <article class="back">
    <p><b>Megatron </b> is the primary antagonist from the Transformers franchise.</p>
    <p>He is a sentient robotic lifeform from the planet Cybertron and the leader of the villainous Decepticons.</p>
    <button class="btn-three">Close</button>
              $bezier-card: cubic-bezier(.5,-0.3,.5,1.3);

@import url(https://fonts.googleapis.com/css?family=Roboto:400,300);
* { box-sizing: border-box; }

body {
  font-family: Roboto, san-serif;
  font-weight: 300;
  background-color: #f5f5f5;

h1, h3 {
  color: #333;
  font-weight: 300;

h1 {
  margin: .25rem 0 .875rem;
  text-align: center;

button {
  display: block;
  margin: 0 auto;
  background-color: #f1f1f1;
  border: none;
  outline: none;
  padding: .5rem 1rem;
  border-radius: 30px;
  font-size: 87.5%;
  font-weight: 400;

  &:hover { background-color: #f5f5f5; }
  &:active { background-color: #e5e5e5; }

hr {
  display: block;
  height: 1px;
  border: 0;   
  border-top: 1px solid #e5e5e5;
  margin: 3em 0;
  padding: 0;

.card {
  position: relative;
  margin: 2em auto;
  width: 300px;
  height: 230px;
  cursor: pointer;
  transform-style: preserve-3d;
  /* What might be added below to assist in flipping the card? */
  transform: none;
  transition: none;

  /* What might be added below to flip the card? */
  &.flip-trans { }
/*  &.flip-in-ani {
    animation: flipInAni .4s forwards $bezier-card;
  &.flip-out-ani {
    animation: flipOutAni .4s forwards $bezier-card;

  .back {
    position: absolute;
    padding: 1rem 1.25rem;
    width: 100%;
    height: 230px;
    color: #666;
    background-color: white;
    border: 1px solid #e5e5e5;
    border-radius: .375rem;
    backface-visibility: hidden;

    p {
      line-height: 1.5;

      &:first-child { margin-top: 0; }

  .front {

    figure {
      margin: 0;
      text-align: center;

      img {
        background-size: 100%;
        border-radius: 50%;
        border: 5px solid rgba(0,0,0,.05)

  .back {
    transform: rotateY(180deg);
    z-index: 0;

@keyframes flipInAni {
  from { transform: scale(1) rotateY(0); }
  50% { transform: scale(1.2); } 
  to { transform: scale(1) rotateY(180deg); } 

@keyframes flipOutAni {
  from { transform: scale(1) rotateY(180deg); }
  50% { transform: scale(1.2); } 
  to { transform: scale(1) rotateY(0); } 
              // For transition
$(".btn-one").click(function() {

// For animation
/*$(".btn-two").click(function() {

$(".btn-three").click(function() {
Loading ..................