123

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

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.

            
              <div id="cards">  

<figure class="card card--normal">
  <div class="card__image-container">
    <img src="https://cdn.bulbagarden.net/upload/thumb/e/e2/133Eevee.png/1200px-133Eevee.png" alt="Eevee" class="card__image">   
  </div>
  
  <figcaption class="card__caption">
    <h1 class="card__name">Eevee</h1>

    <h3 class="card__type">
      normal
    </h3>

    <table class="card__stats">
      <tbody><tr>
        <th>HP</th>
        <td>55</td>
      </tr>
      <tr>
        <th>Attack</th>
        <td>55</td>
      </tr>
      
      <tr>
        <th>Defense</th>
        <td>50</td>
      </tr>

      <tr>
        <th>Special Attack</th>
        <td>45</td>
      </tr>
      <tr>
        <th>Special Defense</th>
        <td>65</td>
      </tr>
      <tr>
        <th>Speed</th>  
        <td>55</td>
      </tr>
    </tbody></table>
    
    <div class="card__abilities">
      <h4 class="card__ability">
        <span class="card__label">Ability</span>
        Run Away
      </h4>
      <h4 class="card__ability">
        <span class="card__label">Hidden Ability</span>
        Anticipation
      </h4>
    </div>
  </figcaption>
</figure>

<figure class="card card--water">
  <div class="card__image-container">
    <img src="https://cdn.bulbagarden.net/upload/thumb/f/fd/134Vaporeon.png/1200px-134Vaporeon.png" alt="Vaporeon" class="card__image">   
  </div>
  
  <figcaption class="card__caption">
    <h1 class="card__name">Vaporeon</h1>

    <h3 class="card__type">
      water
    </h3>

    <table class="card__stats">
      <tbody><tr>
        <th>HP</th>
        <td>130</td>
      </tr>
      <tr>
        <th>Attack</th>
        <td>65</td>
      </tr>
      
      <tr>
        <th>Defense</th>
        <td>60</td>
      </tr>

      <tr>
        <th>Special Attack</th>
        <td>110</td>
      </tr>
      <tr>
        <th>Special Defense</th>
        <td>95</td>
      </tr>
      <tr>
        <th>Speed</th>  
        <td>65</td>
      </tr>
    </tbody></table>
    
    <div class="card__abilities">
      <h4 class="card__ability">
        <span class="card__label">Ability</span>
        Absorb
      </h4>
      <h4 class="card__ability">
        <span class="card__label">Hidden Ability</span>
        Hydration
      </h4>
    </div>
  </figcaption>
</figure>

<figure class="card card--electric">
  <div class="card__image-container">
    <img src="https://cdn.bulbagarden.net/upload/thumb/b/bb/135Jolteon.png/1200px-135Jolteon.png" alt="Jolteon" class="card__image">   
  </div>
  
  <figcaption class="card__caption">
    <h1 class="card__name">Jolteon</h1>

    <h3 class="card__type">
      electric
    </h3>

    <table class="card__stats">
      <tbody><tr>
        <th>HP</th>
        <td>65</td>
      </tr>
      <tr>
        <th>Attack</th>
        <td>65</td>
      </tr>
      
      <tr>
        <th>Defense</th>
        <td>60</td>
      </tr>

      <tr>
        <th>Special Attack</th>
        <td>110</td>
      </tr>
      <tr>
        <th>Special Defense</th>
        <td>95</td>
      </tr>
      <tr>
        <th>Speed</th>  
        <td>130</td>
      </tr>
    </tbody></table>
    
    <div class="card__abilities">
      <h4 class="card__ability">
        <span class="card__label">Ability</span>
        Volt Absorb
      </h4>
      <h4 class="card__ability">
        <span class="card__label">Hidden Ability</span>
        Quick Feet
      </h4>
    </div>
  </figcaption>
</figure>

<figure class="card card--fire">
  <div class="card__image-container">
    <img src="https://cdn.bulbagarden.net/upload/thumb/d/dd/136Flareon.png/1200px-136Flareon.png" alt="Flareon" class="card__image">   
  </div>
  
  <figcaption class="card__caption">
    <h1 class="card__name">Flareon</h1>

    <h3 class="card__type">
      fire
    </h3>

    <table class="card__stats">
      <tbody><tr>
        <th>HP</th>
        <td>65</td>
      </tr>
      <tr>
        <th>Attack</th>
        <td>130</td>
      </tr>
      
      <tr>
        <th>Defense</th>
        <td>60</td>
      </tr>

      <tr>
        <th>Special Attack</th>
        <td>95</td>
      </tr>
      <tr>
        <th>Special Defense</th>
        <td>110</td>
      </tr>
      <tr>
        <th>Speed</th>  
        <td>65</td>
      </tr>
    </tbody></table>
    
    <div class="card__abilities">
      <h4 class="card__ability">
        <span class="card__label">Ability</span>
        Flash Fire
      </h4>
      <h4 class="card__ability">
        <span class="card__label">Hidden Ability</span>
        Guts
      </h4>
    </div>
  </figcaption>
</figure>

<figure class="card card--psychic">
  <div class="card__image-container">
    <img src="https://cdn.bulbagarden.net/upload/thumb/a/a7/196Espeon.png/1200px-196Espeon.png" alt="Espeon" class="card__image">   
  </div>
  
  <figcaption class="card__caption">
    <h1 class="card__name">Espeon</h1>

    <h3 class="card__type">
      psychic
    </h3>

    <table class="card__stats">
      <tbody><tr>
        <th>HP</th>
        <td>65</td>
      </tr>
      <tr>
        <th>Attack</th>
        <td>65</td>
      </tr>
      
      <tr>
        <th>Defense</th>
        <td>60</td>
      </tr>

      <tr>
        <th>Special Attack</th>
        <td>130</td>
      </tr>
      <tr>
        <th>Special Defense</th>
        <td>95</td>
      </tr>
      <tr>
        <th>Speed</th>  
        <td>110</td>
      </tr>
    </tbody></table>
    
    <div class="card__abilities">
      <h4 class="card__ability">
        <span class="card__label">Ability</span>
        Synchronize
      </h4>
      <h4 class="card__ability">
        <span class="card__label">Hidden Ability</span>
        Magic Bounce
      </h4>
    </div>
  </figcaption>
</figure>

<figure class="card card--dark">
  <div class="card__image-container">
    <img src="https://cdn.bulbagarden.net/upload/thumb/3/3d/197Umbreon.png/600px-197Umbreon.png" alt="Umbreon" class="card__image">   
  </div>
  
  <figcaption class="card__caption">
    <h1 class="card__name">Umbreon</h1>

    <h3 class="card__type">
      dark
    </h3>

    <table class="card__stats">
      <tbody><tr>
        <th>HP</th>
        <td>95</td>
      </tr>
      <tr>
        <th>Attack</th>
        <td>65</td>
      </tr>
      
      <tr>
        <th>Defense</th>
        <td>110</td>
      </tr>

      <tr>
        <th>Special Attack</th>
        <td>60</td>
      </tr>
      <tr>
        <th>Special Defense</th>
        <td>130</td>
      </tr>
      <tr>
        <th>Speed</th>  
        <td>65</td>
      </tr>
    </tbody></table>
    
    <div class="card__abilities">
      <h4 class="card__ability">
        <span class="card__label">Ability</span>
        Synchronize
      </h4>
      <h4 class="card__ability">
        <span class="card__label">Hidden Ability</span>
        Inner Focus
      </h4>
    </div>
  </figcaption>
</figure>

<figure class="card card--grass">
  <div class="card__image-container">
    <img src="https://cdn.bulbagarden.net/upload/thumb/f/f5/470Leafeon.png/600px-470Leafeon.png" alt="Leafeon" class="card__image">   
  </div>
  
  <figcaption class="card__caption">
    <h1 class="card__name">Leafeon</h1>

    <h3 class="card__type">
      grass
    </h3>

    <table class="card__stats">
      <tbody><tr>
        <th>HP</th>
        <td>65</td>
      </tr>
      <tr>
        <th>Attack</th>
        <td>110</td>
      </tr>
      
      <tr>
        <th>Defense</th>
        <td>130</td>
      </tr>

      <tr>
        <th>Special Attack</th>
        <td>60</td>
      </tr>
      <tr>
        <th>Special Defense</th>
        <td>65</td>
      </tr>
      <tr>
        <th>Speed</th>  
        <td>95</td>
      </tr>
    </tbody></table>
    
    <div class="card__abilities">
      <h4 class="card__ability">
        <span class="card__label">Ability</span>
        Leaf Guard
      </h4>
      <h4 class="card__ability">
        <span class="card__label">Hidden Ability</span>
        Chlorophyll
      </h4>
    </div>
  </figcaption>
</figure>

<figure class="card card--ice">
  <div class="card__image-container">
    <img src="https://cdn.bulbagarden.net/upload/thumb/2/23/471Glaceon.png/600px-471Glaceon.png" alt="Glaceon" class="card__image">   
  </div>
  
  <figcaption class="card__caption">
    <h1 class="card__name">Glaceon</h1>

    <h3 class="card__type">
      ice
    </h3>

    <table class="card__stats">
      <tbody><tr>
        <th>HP</th>
        <td>65</td>
      </tr>
      <tr>
        <th>Attack</th>
        <td>60</td>
      </tr>
      
      <tr>
        <th>Defense</th>
        <td>110</td>
      </tr>

      <tr>
        <th>Special Attack</th>
        <td>130</td>
      </tr>
      <tr>
        <th>Special Defense</th>
        <td>95</td>
      </tr>
      <tr>
        <th>Speed</th>  
        <td>65</td>
      </tr>
    </tbody></table>
    
    <div class="card__abilities">
      <h4 class="card__ability">
        <span class="card__label">Ability</span>
        Snow Cloak
      </h4>
      <h4 class="card__ability">
        <span class="card__label">Hidden Ability</span>
        Ice Body
      </h4>
    </div>
  </figcaption>
</figure>

<figure class="card card--fairy">
  <div class="card__image-container">
    <img src="https://cdn.bulbagarden.net/upload/thumb/e/e8/700Sylveon.png/600px-700Sylveon.png" alt="Sylveon" class="card__image">   
  </div>
  
  <figcaption class="card__caption">
    <h1 class="card__name">Sylveon</h1>

    <h3 class="card__type">
      fairy
    </h3>

    <table class="card__stats">
      <tbody><tr>
        <th>HP</th>
        <td>95</td>
      </tr>
      <tr>
        <th>Attack</th>
        <td>65</td>
      </tr>
      
      <tr>
        <th>Defense</th>
        <td>65</td>
      </tr>

      <tr>
        <th>Special Attack</th>
        <td>110</td>
      </tr>
      <tr>
        <th>Special Defense</th>
        <td>130</td>
      </tr>
      <tr>
        <th>Speed</th>  
        <td>60</td>
      </tr>
    </tbody></table>
    
    <div class="card__abilities">
      <h4 class="card__ability">
        <span class="card__label">Ability</span>
        Cute Charm
      </h4>
      <h4 class="card__ability">
        <span class="card__label">Hidden Ability</span>
        Pixilate
      </h4>
    </div>
  </figcaption>
</figure>
</div>


<script id="card-template" type="text/x-handlebars-template">
<figure class="card card--{{type}}">
  <div class="card__image-container">
    <img src="{{imageAddress}}" alt="{{name}}" class="card__image">   
  </div>
  
  <figcaption class="card__caption">
    <h1 class="card__name">{{name}}</h1>

    <h3 class="card__type">e
      {{type}}
    </h3>

    <table class="card__stats">
      <tr>
        <th>HP</th>
        <td>{{hp}}</td>
      </tr>
      <tr>
        <th>Attack</th>
        <td>{{attack}}</td>
      </tr>
      
      <tr>
        <th>Defense</th>
        <td>{{defense}}</td>
      </tr>

      <tr>
        <th>Special Attack</th>
        <td>{{spAttack}}</td>
      </tr>
      <tr>
        <th>Special Defense</th>
        <td>{{spDefense}}</td>
      </tr>
      <tr>
        <th>Speed</th>  
        <td>{{speed}}</td>
      </tr>
    </table>
    
    <div class="card__abilities">
      <h4 class="card__ability">
        <span class="card__label">Ability</span>
        {{ability1}}
      </h4>
      <h4 class="card__ability">
        <span class="card__label">Hidden Ability</span>
        {{ability2}}
      </h4>
    </div>
  </figcaption>
</figure>
</script>
  
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Open+Sans|Open+Sans+Condensed:300,700');
body {
  font-family: "Open Sans", Helvetica, sans-serif;
  text-align: center;
  margin: 20px;
}

img {
  max-height: 150px;
  margin: auto;
  display: inline-block;
}
h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: 400;
}


.card {
  display: inline-block;
  width: 300px;
  padding: 1em;
  border-radius: 15px;  
  margin: 10px;
  background: #ddd;
  text-align: left;

  &__caption {
    background-color: rgba(#ffffff, 0.65);
    padding: 1em;
    position: relative;
    border-radius: 0 0 3px 3px;
  }
  &__image-container {
    background-color: rgba(#000000, 0.7);
    text-align: center;
    padding: 1em 1em 0;
    border-radius: 3px 3px 0 0;
  }
  
  &__type {
    position: absolute;
    top: 0;
    right: 1em;
    transform: translateY(-50%);
    color: #ffffff;
    text-transform: uppercase;
    font-family: "Open Sans Condensed", "Open Sans", helvetica, sans-serif;
    letter-spacing: 0.1em;
    padding: 0.25em;
    line-height: 1;
    border-radius: 2px;
    background: #bbbbbb;
  }

  &__label {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 400;
    display: block;
    margin-bottom: 3px;
  }
  
  
  &__name {
    font-family: "Open Sans Condensed", "Open Sans", helvetica, sans-serif;
    text-align: center;
    font-size: 1.5em;    
    font-weight: 700;
    letter-spacing: 0.02em;
  }
  
  &__stats {
    margin: 1em 0;
    th {
      font-family: "Open Sans Condensed", "Open Sans", helvetica, sans-serif;
      text-align: right;
      font-weight: 300;
    }
    width: 100%;
    
    th, td {
      width: 50%;
      padding: 0.25em 0.5em 0;
    }
    
  }
  
  &__abilities {
    display: flex;
    justify-content: space-between;
  }
  &__ability {
    margin-top: 1em;
    flex: 1 0;
  }
  
  box-shadow: 0px 5px 20px -10px #111111;
  
  
  &--normal {
    background: linear-gradient(110deg, #FDBB2D 0%, #3A1C71 100%);
    box-shadow: 0px 5px 20px -10px #3A1C71;
    .card__type {
      background-color: #C08A53;
    }
  }
  
  &--water {
  background: linear-gradient(120deg, #1CB5E0 0%, #000851 100%);    
    box-shadow: 0px 5px 20px -10px #000851;
    .card__type {
      background-color: #1CB5E0;
    }
  }
  &--electric {
    
    background: linear-gradient(90deg, rgba(255,222,0,1) 34%, rgba(232,255,153,1) 83%);
    .card__type {
      background-color: #000;
    }
  }
  &--fire {
    background: linear-gradient(0deg, rgba(199,24,0,1) 10%, rgba(252,194,69,1) 100%);
    .card__type {
      background-color: rgba(199,24,0,1);
    }
  }
  
  &--psychic {
    
    background: linear-gradient(140deg, rgba(255,167,249,1) 0%, rgba(255,44,195,1) 39%, rgba(255,227,167,1) 100%);
    .card__type {
      background: #ff2cc3;
    }
  }
  
  &--dark {
    background: linear-gradient(20deg, rgba(25,25,25,1) 0%, rgba(16,11,50,1) 33%, rgba(92,2,73,1) 100%);
    .card__type {
      background: #5c0249;
    }
  }
  &--grass {
    background: linear-gradient(140deg, rgba(196,218,61,1) 0%, rgba(110,127,14,1) 69%, rgba(39,80,9,1) 100%);

    .card__type {
      background: #6e7f0e;
    }
  }
  
  &--ice {
    background: linear-gradient(230deg, rgba(202,234,246,1) 0%, rgba(160,234,241,1) 46%, rgba(111,184,235,1) 100%);
    .card__type {
      background: #6fb8eb;
    }
  }
  
  &--fairy {
    background: linear-gradient(45deg, rgba(255,230,240,1) 0%, rgba(255,197,224,1) 34%, rgba(255,166,185,1) 71%, rgba(255,138,149,1) 100%);
    
    .card__type {
      background: #ff8a95;
    }
  }
  
  position: relative;  
  transition: 0.4s;

  @for $i from 1 through 9 {
    &:nth-child(#{$i}) {
      $rotation: (5 - random(10)) + deg;
      transform: translateY(0px) rotate($rotation);      
    }
  }

  &:hover {
    z-index: 5;
    box-shadow: 0px 13px 30px -15px #000000;
    transform:translateY(-10px);
  }
  
}


            
          
!
            
              // var source   = document.getElementById("card-template").innerHTML;
// var template = Handlebars.compile(source);

// var eveelutions = [
//   {
//     name: "Eevee", 
//     imageAddress: "https://cdn.bulbagarden.net/upload/thumb/e/e2/133Eevee.png/1200px-133Eevee.png", 
//     type: "normal",
//     hp: 55,
//     attack: 55,
//     defense: 50,
//     spAttack: 45,
//     spDefense: 65,
//     speed: 55,
//     ability1: "Run Away",
//     ability2: "Anticipation"
//   },
//   {
//     name: "Vaporeon", 
//     imageAddress: "https://cdn.bulbagarden.net/upload/thumb/f/fd/134Vaporeon.png/1200px-134Vaporeon.png", 
//     type: "water",
//     hp: 130,
//     attack: 65,
//     defense: 60,
//     spAttack: 110,
//     spDefense: 95,
//     speed: 65,
//     ability1: "Absorb",
//     ability2: "Hydration"
//   },
//   {
//     name: "Jolteon", 
//     imageAddress: "https://cdn.bulbagarden.net/upload/thumb/b/bb/135Jolteon.png/1200px-135Jolteon.png", 
//     type: "electric",
//     hp: 65,
//     attack: 65,
//     defense: 60,
//     spAttack: 110,
//     spDefense: 95,
//     speed: 130,
//     ability1: "Volt Absorb",
//     ability2: "Quick Feet"
//   },
//     {
//     name: "Flareon", 
//     imageAddress: "https://cdn.bulbagarden.net/upload/thumb/d/dd/136Flareon.png/1200px-136Flareon.png", 
//     type: "fire",
//     hp: 65,
//     attack: 130,
//     defense: 60,
//     spAttack: 95,
//     spDefense: 110,
//     speed: 65,
//     ability1: "Flash Fire",
//     ability2: "Guts"
//   },
//   {
//     name: "Espeon", 
//     imageAddress: "https://cdn.bulbagarden.net/upload/thumb/a/a7/196Espeon.png/1200px-196Espeon.png", 
//     type: "psychic",
//     hp: 65,
//     attack: 65,
//     defense: 60,
//     spAttack: 130,
//     spDefense: 95,
//     speed: 110,
//     ability1: "Synchronize",
//     ability2: "Magic Bounce"
//   },
//   {
//     name: "Umbreon", 
//     imageAddress: "https://cdn.bulbagarden.net/upload/thumb/3/3d/197Umbreon.png/600px-197Umbreon.png", 
//     type: "dark",
//     hp: 95,
//     attack: 65,
//     defense: 110,
//     spAttack: 60,
//     spDefense: 130,
//     speed: 65,
//     ability1: "Synchronize",
//     ability2: "Inner Focus"
//   },
//   {
//     name: "Leafeon", 
//     imageAddress: "https://cdn.bulbagarden.net/upload/thumb/f/f5/470Leafeon.png/600px-470Leafeon.png", 
//     type: "grass",
//     hp: 65,
//     attack: 110,
//     defense: 130,
//     spAttack: 60,
//     spDefense: 65,
//     speed: 95,
//     ability1: "Leaf Guard",
//     ability2: "Chlorophyll"
//   },
//   {
//     name: "Glaceon", 
//     imageAddress: "https://cdn.bulbagarden.net/upload/thumb/2/23/471Glaceon.png/600px-471Glaceon.png", 
//     type: "ice",
//     hp: 65,
//     attack: 60,
//     defense: 110,
//     spAttack: 130,
//     spDefense: 95,
//     speed: 65,
//     ability1: "Snow Cloak",
//     ability2: "Ice Body"
//   },
//   {
//     name: "Sylveon", 
//     imageAddress: "https://cdn.bulbagarden.net/upload/thumb/e/e8/700Sylveon.png/600px-700Sylveon.png", 
//     type: "fairy",
//     hp: 95,
//     attack: 65,
//     defense: 65,
//     spAttack: 110,
//     spDefense: 130,
//     speed: 60,
//     ability1: "Cute Charm",
//     ability2: "Pixilate"
//   }
// ];

// var container = document.getElementById("cards");

// for (var i = 0; i < eveelutions.length; i++) {
//   var html    = template(eveelutions[i]);
//   container.insertAdjacentHTML("beforeend", html);
// }





            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console