Hello developers, today in this blog you'll learn to create a Responsive Pricing Card Design using HTML & CSS.
A pricing card is the flat card design of a particular product with its different prices and offers for the buyers. Pricing cards can be various products like laptops, computers, mobile phones, hosting, and others.
In this blog (Responsive Pricing Card), there is a card of pricing list with a bisect that has different offers and prices. The card has the package name and the price and duration of the product and the details of it. Below it, there is a button with a different hover effect.
Every card has different values and features for the same product. This page [Responsive Pricing Card], is made responsive by using media query.
The source code of this Responsive Pricing Card Design is given below, if you want the source code of this program, you can copy it. You can use this Responsive Pricing Card code with your creativity and can take this card to the next level.
Responsive Pricing Card [Source Code]
To make this website (Responsive Pricing Card), you need to create two files: an HTML file & a CSS file. First, create an HTML file with the name of index.html and remember, you have to create a file with a .html extension.
CSS provides style to an HTML page. To make the page attractive create a CSS file with the name style.css and remember that you have to create a file with a .css extension.
:root{
--bg-clr: #56ab2f;
--card-clr: #22161A;
--text-clr: #fdfdfd;
--partition-clr: #56ab2f;
}
*, *::before, *::after{
padding: 0;
margin: 0;
box-sizing: border-box;
}
body{
font-family: 'Nunito', sans-serif;
font-weight: 400;
background: #56ab2f;
background: -webkit-linear-gradient(to right, #a8e063, #56ab2f);
background: linear-gradient(to right, #a8e063, #56ab2f);
color: var(--text-clr);
}
.container{
margin: 2em auto;
width: 60%;
background: var(--card-clr);
padding: 5em 2em;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 12px;
display: flex;
justify-content: center;
align-items: center;
}
.basic, .pro{
padding: 1em 4em;
}
.basic{
border-right: 1px solid var(--partition-clr);
}
h2{
font-size: 2.25rem;
color:#a8e063
}
h4{
font-size: 1.5rem;
margin-top: 1em;
}
h3{
margin-top: 15px;
font-size: 1.8rem;
text-align: center;
color: #22161A;
}
h6{
font-size: 1rem;
color:#a8e063
}
ul{
font-size: 1.125rem;
margin-top: 2em;
margin-left: 1em;
line-height: 2rem;
}
.basic-btn, .pro-btn{
width: 100%;
border: none;
padding: 0.8em 1.5em;
margin: 2em 0 0 0;
background: var(--bg-clr);
color: var(--text-clr);
font-size: 1.125rem;
border-radius: 5px;
cursor: pointer;
}
.basic-btn{
background: transparent;
color: var(--bg-clr);
}
.basic-btn:hover{
background: var(--bg-clr);
color: #000;
}
.pro-btn{
color:#000;
}
.pro-btn:hover{
background: var(--card-clr);
color: var(--bg-clr);
}
@media screen and (max-width: 900px) {
.container{
flex-direction: column;
margin: 2em auto;
width: 90%;
}
.basic{
border-right:none;
border-bottom: 1px solid var(--partition-clr);
}
}
We hope you would like this Responsive Pricing Card Design using HTML & CSS.
Thank you for reading our blog. If you face any problem in creating this Responsive Pricing Card Design using HTML & CSS, then contact us or comment us. We’ll try to provide a solution to your problem as soon as possible.
Post a Comment
Thank you
Learning robo team