Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SamPandey001/e3a693e6efa507be53ba291e1280a8b5 to your computer and use it in GitHub Desktop.
Save SamPandey001/e3a693e6efa507be53ba291e1280a8b5 to your computer and use it in GitHub Desktop.
Awesome Gradient Pricing Table With Glowing Effect
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="style.css" />
<link
href="https://fonts.googleapis.com/css?family=Open+Sans:800|Raleway:500&display=swap"
rel="stylesheet"
/>
<title>Awesome Pricing Table</title>
</head>
<body>
<section id="main">
<div class="row">
<div class="pricing-table">
<div class="pricing-table-header">
<h2>Personal</h2>
<h4 class="price">19$/year</h4>
<p>For small budgets</p>
</div>
<div class="pricing-table-content">
<ul>
<li>15 credits</li>
<li>60 templates</li>
<li>25 icon packs</li>
<li>Support for 1 year</li>
<li>Custom mailbox</li>
</ul>
<a href="" class="btn">Buy now</a>
</div>
</div>
<div class="pricing-table">
<div class="pricing-table-header">
<h2>Plus</h2>
<h4 class="price">29$/year</h4>
<p>The next level</p>
</div>
<div class="pricing-table-content">
<ul>
<li>35 credits</li>
<li>75 templates</li>
<li>40 icon packs</li>
<li>Support for 1 year</li>
<li>Custom mailbox</li>
</ul>
<div>
<a href="" class="btn">Buy now</a>
</div>
</div>
</div>
<div class="pricing-table">
<div class="pricing-table-header">
<h2>Expert</h2>
<h4 class="price">39$/year</h4>
<p>Most popular</p>
</div>
<div class="pricing-table-content">
<ul>
<li>60 credits</li>
<li>100 templates</li>
<li>50 icon packs</li>
<li>Support for 1 year</li>
<li>Custom mailbox</li>
</ul>
<a href="" class="btn">Buy now</a>
</div>
</div>
</div>
</section>
</body>
</html>
html,
body {
margin: 0;
padding: 0;
background: #202020;
font-family: "Raleway", sans-serif;
}
/* typography */
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: "Open Sans", sans-serif;
margin: 0;
line-height: 2;
}
a {
text-decoration: none;
}
.price {
font-size: 30px;
}
ul {
margin: 0;
padding-bottom: 30px;
text-align: left;
}
ul li {
list-style: none;
line-height: 2;
}
ul li:before {
content: "\002713";
line-height: 20px;
margin-right: 10px;
transition: all 0.2s ease-in-out;
}
ul li:hover:before {
font-size: 25px;
}
/* layouts */
#main {
display: flex;
flex-flow: row wrap;
justify-content: center;
align-content: center;
min-height: 100vh;
}
.row {
display: flex;
flex-flow: row wrap;
justify-content: center;
}
/* pricing table */
.pricing-table {
z-index: 5;
position: relative;
width: 300px;
margin: 15px;
text-align: center;
border-radius: 7px;
transition: 0.2s ease-in-out;
}
.pricing-table:hover {
transform: scale(1.08);
z-index: 15;
}
/* gradient border */
.pricing-table:before {
content: "";
position: absolute;
background: #dce35b; /* fallback for old browsers */
background: -webkit-linear-gradient(
to right bottom,
#45b649,
#dce35b
); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(
to right bottom,
#45b649,
#dce35b
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
top: -4px;
left: -4px;
right: -4px;
bottom: -4px;
z-index: -1;
border-radius: 7px;
transition: 0.2s ease-in-out;
}
.pricing-table:nth-child(2):before {
background: #7f00ff; /* fallback for old browsers */
background: -webkit-linear-gradient(
to right bottom,
#e100ff,
#7f00ff
); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(
to right bottom,
#e100ff,
#7f00ff
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
.pricing-table:nth-child(3):before {
background: #f7ff00; /* fallback for old browsers */
background: -webkit-linear-gradient(
to right bottom,
#db36a4,
#f7ff00
); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(
to right bottom,
#db36a4,
#f7ff00
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
.pricing-table:nth-child(1):hover:before {
-webkit-box-shadow: 0px 0px 50px -5px rgba(69, 182, 73, 0.7);
box-shadow: 0px 0px 50px -5px rgba(69, 182, 73, 0.7);
}
.pricing-table:nth-child(2):hover:before {
-webkit-box-shadow: 0px 0px 50px -5px rgba(225, 0, 255, 0.7);
box-shadow: 0px 0px 50px -5px rgba(225, 0, 255, 0.7);
}
.pricing-table:nth-child(3):hover:before {
-webkit-box-shadow: 0px 0px 50px -5px rgba(219, 54, 164, 0.7);
box-shadow: 0px 0px 50px -5px rgba(219, 54, 164, 0.7);
}
/* pricing table header */
.pricing-table-header {
padding: 30px 10px 0 10px;
position: relative;
overflow: hidden;
transition: 0.5s ease-in-out;
}
.pricing-table-header:before {
content: "";
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: #f2f2f2;
transform: translateY(0) scale(4) skew(320deg);
z-index: -1;
transition: 0.5s ease-in-out;
}
.pricing-table:hover .pricing-table-header {
color: #f2f2f2;
}
.pricing-table:hover .pricing-table-header:before {
top: 200%;
left: 200%;
}
/* pricing table content */
.pricing-table-content {
padding: 30px 10px 40px 10px;
background: #f2f2f2;
transition: 0.2s ease-in-out;
}
.pricing-table:hover .pricing-table-content {
border-radius: 7px;
transition-delay: 0.3s;
}
/* button */
div a.btn {
display: block;
text-align: center;
text-transform: uppercase;
font-weight: bold;
color: #202020;
width: 100%;
border-radius: 7px;
border: 1px solid transparent;
margin: auto;
padding: 15px 0;
transition: 0.2s ease-in-out;
}
.btn:hover {
width: 50%;
transform: scale(0.8);
}
.pricing-table:first-child .btn:hover {
border-color: #45b649;
}
.pricing-table:nth-child(2) .btn:hover {
border-color: #e100ff;
}
.pricing-table:nth-child(3) .btn:hover {
border-color: #db36a4;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment