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="main-header">PRICING TABLE</h1>

<section id="content">
    <div class="card">
        <div class="card-content">
            <h5>Basic</h5>
            <hr>
            <h1><span>$</span>5.99</h1>
            <hr>
            <div class="card-info">
                <p><span>500 MB</span> data</p>
                <p><span>10 GB</span> storage</p>
                <p><span>3 months</span> support</p>
            </div>
            <hr>
            <button>GET IT</button>
        </div>
    </div>

    <div class="card special">

        <div class=medal>
            <div class="medal-outer">
                <div class="medal-inner"></div>
            </div>

            <div class="ribbons">
                <div class="ribbon left"></div>
                <div class="ribbon right"></div>
            </div>
        </div>

        <div class="card-header">
            <p>MOST POPULAR</p>
        </div>
        <div class="card-content">
            <h5>Regular</h5>
            <hr>
            <h1><span>$</span>10.99</h1>
            <hr>
            <div class="card-info">
                <p><span>1 GB</span> data</p>
                <p><span>20 GB</span> storage</p>
                <p><span>5 months</span> support</p>
            </div>
            <hr>
            <button>GET IT</button>
        </div>
    </div>

    <div class="card">
        <div class="card-content">
            <h5>Premium</h5>
            <hr>
            <h1><span>$</span>20.99</h1>
            <hr>
            <div class="card-info">
                <p><span>5 GB</span> data</p>
                <p><span>40 GB</span> storage</p>
                <p><span>12 months</span> support</p>
            </div>
            <hr>
            <button>GET IT</button>
        </div>
    </div>
</section>
              
            
!

CSS

              
                /*----------------*/
/*----  MAIN  ---*/
/*----------------*/
@import url('https://fonts.googleapis.com/css?family=Montserrat');

body {
  font-family: 'Montserrat', sans-serif;
  background-color: #EBEBEB;
  color: #555;
}

h1 {
  margin: 0;
  font-size: 3em;
  font-weight: bold;

  text-align: center;
}

h1 > span {
  font-size: 12px;
}

h5 {
  opacity: 0.3;
  font-size: 1.2em;
  margin: 0;

  text-align: center;
}

p {
  font-size: 1em;
  text-align: center;
}

p span {
  font-size: 1em;
}

hr {
  border: 1px solid rgba(0,0,0,0.05);
}

#content {
  width: 75%;
  margin: 0 auto;
}

.main-header {
  margin: 40px 0;
}

/*----------------*/
/*----  CARDS  ---*/
/*----------------*/

.card {
  position: relative;
  background-color: #FFF;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
  border-radius: 3px;
  width: 31%;
  float: left;
  margin-right: 3%;
  margin-bottom: 40px;

  z-index: 10;

  transition: all 150ms ease-out;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px 0 rgba(0,0,0,0.1);
}

.card-content {
  padding: 30px;
}

.card.special .card-content {
  padding-top: 0;
}

.card-header {
  background-color: #6BC7E5;
  margin-bottom: 8px;
  padding: 5px;

  border-radius: 3px 3px 0 0
}

.card-header > p {
  color: #FFF;
  margin: 0;
  font-size: 0.7em;
  font-weight: bold;
}

.card:last-child {
  margin-right: 0;
}

/*----------------*/
/*SPECIAL COLORING*/
/*----------------*/

.card:nth-child(3) .card-info span {
  color: #E96D6D;
}

.card:nth-child(3) button {
  background-color: #E96D6D;
  box-shadow: 0px 3px 0px 0px #C75D5D;
}

.card:nth-child(2) .card-info span {
  color: #6BC7E5;
}

.card:nth-child(2) button {
  background-color: #6BC7E5;
  box-shadow: 0px 3px 0px 0px #5DADC7;
}

.card:nth-child(1) .card-info span {
  color: #000000;
}

.card:nth-child(1) button {
  background-color: #444444;
  box-shadow: 0px 3px 0px 0px #000000;
}

/*----------------*/
/*---  BUTTON  --*/
/*----------------*/

button {
  width: 100%;
  margin-top: 10px;
  padding: 15px 0;
  border-radius: 5px;
  border: none;
  outline: none;

  color: white;
  font-weight: bold;
  font-size: 1em;
  cursor: pointer;
}


/*----------------*/
/*----  MEDAL  ---*/
/*----------------*/
.medal {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 20;
}

.medal-outer {
  width: 40px;
  height: 40px;
  background-color: #F5D800;
  border-radius: 100%;
  box-shadow: 0px 1px 5px 0px rgba(0,0,0,0.27);
 
}

.medal-inner {
  width: 26px;
  height: 26px;
  background-color: #FAE928;
  border-radius: 100%;
  margin: 0 auto;
  position: relative;
  top: 7px;
}

.ribbons {
  position: relative;
  left: 5px;
  top: -10px;
  z-index: -1;
}

.ribbon {
  width: 15px;
  position: relative;  
  box-shadow: 0px 1px 5px 0px rgba(0,0,0,0.27);
  transition: transform 200ms;
  float: left;
}

.ribbon.left {
  height: 30px;
  background-color: #D96666;
  transform-origin: center top;
  animation: swing-left 2s infinite;
  animation-direction: alternate;
  margin-left: 5px;
}

.ribbon.right {
  margin-left: -10px;
  height: 35px;
  opacity: 0.9;
  background-color: #E56B6B;
  transform-origin: center top;
  animation: swing-right 2s infinite;
  animation-direction: alternate;
}

/*----------------*/
/*-- ANIMATIONS  -*/
/*----------------*/

@keyframes swing-left {
  0% {
    transform: rotate(-5deg);
      
  }
  100% {
    transform: rotate(5deg);
  }
}

@keyframes swing-right {
  0% {
    transform: rotate(-7deg);
      
  }
  100% {
    transform: rotate(7deg);
  }
}

/*----------------*/
/*-- RESPONSIVE  -*/
/*----------------*/

@media (max-width: 900px){
  .card {
    width: 100%;
  }
}
              
            
!

JS

              
                /*
INSPIRED BY:
Adaptive Pricing Table
https://codepen.io/VoloshchenkoAl/pen/NABNoN
*/
              
            
!
999px

Console