Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <!--
  ©Raj Rajhans
  rajrajhans.com
  Day #2 : 30 Days CSS
-->

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
    <meta charset="utf-8">
    <title>Day #2: Pricing Tables using CSS</title>
    <link rel="stylesheet" href="themestyles.css">
    <link rel="stylesheet" href="style.css">
    <link href="https://fonts.googleapis.com/css?family=Montserrat|Poppins|Roboto" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Raleway:400,100,200,300,500,600,700,800,900" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Lato:400,100,100italic,300,300italic,400italic,700italic,700,900italic,900" rel="stylesheet">
</head>
<body>
   <h2> Design #3: Responsive Pricing Table with hover effect</h2>
    <div class="table">
        <div class="listing-item">
            <figure class="image">
            <img src="https://rajrajhans.com/wp-content/uploads/2018/07/matchstick-fire-light-striking-66267.jpeg" alt="image">
                <figcaption>
                    <div class="caption">
                        <h2>Level I</h2>
                        <div class="price_tag">
                            <span class="price">
                                    <span class="sign">₹</span>
                                    <span class="value">300</span>
                                    <span class="cent">.00</span>
                                    <span class="duration">/MON</span>
                            </span>
                        </div>
                    </div>
                </figcaption>
            </figure>
            <div class="listing">
                <ul>
                    <li><strong>Primary </strong>Feature</li>
                    <li><strong>Additional </strong>Benefit</li>
                    <li><strong>1 </strong>Bonus</li>
                </ul>
            </div>
        </div>
        <!--Level 1 End-->
        <!--Level 2 Start-->
        <div class="listing-item">
            <figure class="image">
                <img src="https://rajrajhans.com/wp-content/uploads/2018/07/matchstick-fire-light-striking-66267.jpeg" alt="image">
                <figcaption>
                    <div class="caption">
                        <h2>Level II</h2>
                        <div class="price_tag">
                            <span class="price">
                                    <span class="sign">₹</span>
                                    <span class="value">600</span>
                                    <span class="cent">.00</span>
                                    <span class="duration">/MON</span>
                            </span>
                    </div>
                </figcaption>
            </figure>
            <div class="listing">
                <ul>
                    <li><strong>Primary </strong>Feature</li>
                    <li><strong>Additional </strong>Benefit</li>
                    <li><strong>2 </strong>Bonuses</li>
                    <li><strong>4 </strong>Perks</li>
                    <li><strong>24/7 </strong> Support</li>
                </ul>
            </div>
        </div>
        <!--Level 2 End-->
        <!--Level 3 Start-->
        <div class="listing-item">
            <figure class="image">
                <img src="https://rajrajhans.com/wp-content/uploads/2018/07/matchstick-fire-light-striking-66267.jpeg" alt="image">
                <figcaption>
                    <div class="caption">
                        <h2>Level III</h2>
                        <div class="price_tag">
                            <span class="price">
                                    <span class="sign">₹</span>
                                    <span class="value">900</span>
                                    <span class="cent">.00</span>
                                    <span class="duration">/MON</span>
                            </span>
                        </div>
                </figcaption>
            </figure>
            <div class="listing">
                <ul>
                    <li><strong>Primary </strong>Feature</li>
                    <li><strong>Additional </strong>Benefit</li>
                    <li><strong>2 </strong>Bonuses</li>
                    <li><strong>4 </strong>Perks</li>
                    <li><strong>24/7 </strong> Support</li>
                    <li><strong>Separate </strong> Server</li>
                    <li><strong>Extra </strong> Feature</li>
                </ul>
            </div>
        </div>
        <!--Level 3 End-->
    </div>
</body>
      </html>
              
            
!

CSS

              
                .table{
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display:flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    max-width:800px;
    margin:0 auto;
}

.listing-item{
    display: block;
    width: 100%;
    margin-bottom: 20px;
    float: left;
    background: #ffffff;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    z-index: 0;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    -webkit-box-shadow:0px 1px 4px rgba(0,0,0,0.10) ;
    -moz-box-shadow:0px 1px 4px rgba(0,0,0,0.10) ;
    box-shadow:0px 1px 4px rgba(0,0,0,0.10) ;
}
.listing-item:hover,
.listing-item:active{
    -webkit-transform: scale(1.03);
    -moz-transform: scale(1.03);
    transform: scale(1.03);
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    z-index: 2;

}

.listing-item .listing{
    padding: 20px;
    position: relative;
}
.listing-item .listing:before{
    content:"";
    position: absolute;
    top:-15px;
    left:-moz-calc(50% - 15px);
    left:-webkit-calc(50% - 15px);
    left:calc(50% - 15px);
    border-bottom:20px solid #fff;
    border-left:20px solid transparent;
    border-right:20px solid transparent;
}
figure.image img {
         width:100%;
         border-top-left-radius: 10px;
         border-top-right-radius: 10px;
}
figure.image {
    position: relative;
    margin: 0;
    padding: 0;
}
figure.image figcaption {
    position: absolute;
    top: 0;
    width: 100%;
    text-align: center;
    bottom: 4px;
    background: rgba(0,0,0,0.6);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;

}
figcaption .caption{
    position:relative;
    top:50%;
    -moz-transform:translateY(-50%);
    -webkit-transform:translateY(-50%);
    transform:translateY(-50%);

}
figcaption h1{
    color:white;
    font-weight:bold;
    font-size:16px;
    text-transform: uppercase;
}
figcaption p{
    color:white;
    font-size:12px;
}
.sign {
    color:white;
    display: inline-block;
    font-family: "Lato", sans-serif;
    font-size: 20px;
    vertical-align: top;
}
.value{
    color:white;
    display: inline-block;
    font-family: "Lato", sans-serif;
    font-size: 40px;
    vertical-align: middle;
    letter-spacing: -2px;
    line-height: 60px;
}
.cent{
    color: #ffffff;
    display: inline-block;
    font-family: "Lato", sans-serif;
    font-size: 15px;
    vertical-align: text-bottom;
    line-height: 0;
}
.duration{
    color: #ffffff;
    display: inline-block;
    font-family: "Lato", sans-serif;
    font-size: 10px;
    vertical-align: text-bottom;
    line-height: 0;

}
.listing ul{
    margin:0;
    padding: 0;
}
.listing ul li{
    list-style: none;
    display: block;
    padding: 15px;

}

.listing ul li:nth-child(2n)
{
    background-color: #f0f0f0;
}

.listing ul li:nth-child(2n+1)
{
    background-color: #f5f5f5;
}

.listing ul li:hover{
    background-color: #e4e4e4;
    border-left: solid 2px #e62b1e;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.listing-item:hover figure.image figcaption{
    background: rgba(0,0,0,0.25);
}
@media only screen and (min-width:540px){
    .listing-item {
        display: block;
        width: -webkit-calc(100%/3);
        width: -moz-calc(100%/3);
        width: calc(100%/3);
    }
}
@media only screen and (min-width:1024px){
    .table{
        padding: 30px;
    }
}

body {
    font-family: 'Roboto Condensed', "Helvetica Neue", Helvetica, Arial, sans-serif;

    background: #0f0c29;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #24243e, #302b63, #0f0c29);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #24243e, #302b63, #0f0c29); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */

    font-size: 20px;
    line-height: 28px;
    color: #323b40;
    margin: 40px 0;
}

h1,h2,h3,h4,h5,h6 {
    font-family: 'Poppins', sans-serif;
    color:#d3d3d3;
    text-align: center;
}

h1 {
    width: 60%;
    max-width: 960px;
    margin: 0 auto 60px;
    color: white;
    text-align: left;
    font-size: 5rem;
    line-height: 5rem;
    transform: rotate(-3deg);
    text-shadow:  0 1px 0 hsl(52,7%,20%),
    0 2px 0 hsl(52,7%,18%),
    0 3px 0 hsl(52,7%,16%),
    0 4px 0 hsl(52,7%,14%),
    0 5px 0 hsl(52,7%,12%),
    0 6px 0 hsl(52,7%,10%),
    0 7px 0 hsl(52,7%,8%),
    0 8px 0 hsl(52,7%,6%),

    0 0 5px rgba(0,0,0,.05),
    0 1px 3px rgba(0,0,0,.2),
    0 3px 5px rgba(0,0,0,.2),
    0 5px 10px rgba(0,0,0,.2),
    0 10px 10px rgba(0,0,0,.2),
    0 20px 20px rgba(0,0,0,.3);

}

h1 small {
    font-size: 3rem;
    display: block;
    color: #fa90a3;
    text-shadow: none;
}
section {
    position: relative;
    padding: 25px 0;
    text-align: center;
}

              
            
!

JS

              
                
              
            
!
999px

Console